-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.html
91 lines (90 loc) · 2.9 KB
/
home.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Hary - Javascript Assignment</title>
<link rel="shortcut icon" href="https://hary-portfolio.000webhostapp.com/assets/img/icon-nama.png" type="image/x-icon">
<link rel="stylesheet" href="./src/css/nav.css" />
<link rel="stylesheet" href="./src/css/wishlist.css" />
</head>
<body>
<header>
<nav class="nav">
<div class="container-nav">
<div class="nav-left">
<img
class="nav-image"
src="https://cdn.pixabay.com/photo/2016/04/15/18/05/computer-1331579_1280.png"
alt="Image-user"
/>
</div>
<div class="nav-user">
<p id="user-name"></p>
<p id="login-status"></p>
</div>
</div>
<div class="nav-right">
<button class="nav-button" id="logout-button">Logout</button>
</div>
</nav>
</header>
<main>
<section class="header-container">
<div class="header">
<h3>Buat Wish List 2024 Kamu :</h3>
<form id="new-wish-form">
<div class="form-input">
<input
type="text"
name="new-wish-input"
id="new-wish-input"
placeholder="Apa Harapan Kamu di 2024"
required
/>
<input
type="text"
name="new-solution-input"
id="new-solution-input"
placeholder="Solusi dari Harapan Kamu?"
required
/>
</div>
<input type="submit" id="new-wish-submit" value="Add Wish" />
</form>
</div>
</section>
<section class="wish-list">
<h2>Daftar Wish Kamu :</h2>
<div id="wishs">
<!-- <div class="task">
<div class="content">
<input type="text" class="text" value="A new task" readonly />
<input type="text" class="price" placeholder="Price" />
<input type="text" class="image-url" placeholder="Image URL" />
</div>
<div class="actions">
<button class="edit">Edit</button>
<button class="delete">Delete</button>
</div>
</div> -->
</div>
</section>
</main>
<script src="./src/js/admin.js"></script>
<script src="./src/js/wishlist.js"></script>
<script>
// check logged in user
function checkLoggedInUser() {
const loggedInUser = localStorage.getItem("loggedInUser");
const user = JSON.parse(loggedInUser);
if (user.status_login == "on") {
if (user.role !== "user") {
window.location.href = "index.html";
}
}
}
checkLoggedInUser();
</script>
</body>
</html>