-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
85 lines (74 loc) · 2.72 KB
/
index.html
File metadata and controls
85 lines (74 loc) · 2.72 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script>
(function () {
const prefersDark = localStorage.getItem("dark-mode");
if (prefersDark === "true") {
document.documentElement.classList.add("dark");
}
})();
</script>
<link rel="stylesheet" href="styles/index.css">
<link rel="stylesheet" href="styles/toast.css">
<link rel="stylesheet" href="styles/dark-toggle.css">
<link rel="stylesheet" href="styles/index-media.css">
<title>Admin start-Up</title>
</head>
<body>
<div class="user-info" id="user-info"></div>
<button id="theme-toggle" class="toggle-mode"></button>
<h1>🛍 Product Admin Dashboard</h1>
<!-- Product Form -->
<form id="add-product-form">
<input type="text" id="name" placeholder="Product Name" required />
<input type="number" id="price" step="0.01" min="0" placeholder="Price" required />
<select id="category">
<option value="all">All Categories</option>
<option value="electronics">Electronics</option>
<option value="fashion">Fashion</option>
<option value="books">Books</option>
<option value="appliances">Appliances</option>
<option value="food">Food</option>
</select>
<input type="file" id="image" placeholder="Image URL" accept="image/*" required />
<img id="image-preview" src="" alt="Preview" style="max-width: 50px; display: none; margin-top: 10px;">
<button type="submit">Add Product</button>
</form>
<input type="text" id="admin-search" placeholder="Search by name">
<select id="admin-category">
<option value="all">All Categories</option>
<option value="electronics">Electronics</option>
<option value="fashion">Fashion</option>
<option value="books">Books</option>
<option value="appliances">Appliances</option>
<option value="food">Food</option>
<!-- Add more based on your products -->
</select>
<!-- Product Grid -->
<div id="product-list"></div>
<div id="preview-modal" class="modal hidden">
<div class="modal-content">
<span id="close-preview" class="close-btn">×</span>
<img id="preview-image" src="" alt="">
<h2 id="preview-name"></h2>
<p id="preview-category"></p>
<p id="preview-price"></p>
</div>
</div>
<div id="confirm-modal" class="modal hidden">
<div class="modal-content">
<p>Are you sure you want to delete this product?</p>
<div class="modal-buttons">
<button id="confirm-yes">Yes</button>
<button id="confirm-no">No</button>
</div>
</div>
</div>
<div id="toast-container"></div>
<button class="logout-btn" id="logout-btn">Logout</button>
<script type="module" src="index.js"></script>
</body>
</html>