-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdashboard.html
More file actions
48 lines (44 loc) · 1.5 KB
/
dashboard.html
File metadata and controls
48 lines (44 loc) · 1.5 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Dashboard | Appointment App</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<label class="toggle-switch">
<input type="checkbox" id="darkModeToggle">
<span class="slider"></span>
</label>
<div class="container">
<h2>Book Appointment</h2>
<form id="bookingForm">
<select id="service">
<option value="">Select Service</option>
<option value="Dental Checkup">Dental Checkup</option>
<option value="Haircut">Haircut</option>
<option value="Eye Test">Eye Test</option>
</select>
<input type="date" id="date" required />
<input type="time" id="time" required />
<button type="submit">Book Now</button>
<button type="button" onclick="logoutUser()" class="btn btn-logout">Logout</button>
</form>
<h3>Previous Appointments</h3>
<ul id="appointmentList"></ul>
</div>
<script src="booking.js"></script>
<script>
const toggle = document.getElementById('darkModeToggle');
if (localStorage.getItem('darkMode') === 'enabled') {
document.body.classList.add('dark-mode');
toggle.checked = true;
}
toggle?.addEventListener('change', () => {
document.body.classList.toggle('dark-mode');
localStorage.setItem('darkMode', document.body.classList.contains('dark-mode') ? 'enabled' : 'disabled');
});
</script>
</body>
</html>