-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
76 lines (70 loc) · 2.49 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Menu</title>
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
rel="stylesheet"
/>
<style>
.menu-button {
padding-top: 3rem !important;
padding-bottom: 3rem !important;
}
</style>
</head>
<body class="bg-white">
<nav class="navbar bg-primary">
<div class="container-fluid">
<div class="w-100 text-center">
<button
class="btn btn-danger"
style="width: 50%"
id="logout-btn"
>
LOGOUT
</button>
</div>
</div>
</nav>
<div class="container mt-4">
<h2 class="text-center mb-4">Menu</h2>
<div class="row g-4">
<div class="col-md-6">
<a
class="btn btn-primary w-100 menu-button"
href="/employees/"
>
<h3 class="m-0">Employees</h3>
</a>
</div>
<div class="col-md-6">
<a
class="btn btn-primary w-100 menu-button"
href="/departments/"
>
<h3 class="m-0">Departments</h3>
</a>
</div>
<div class="col-md-6 mx-auto">
<a class="btn btn-primary w-100 menu-button" href="/jobs/">
<h3 class="m-0">Jobs</h3>
</a>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<script type="module">
import { logout, isAuthenticated } from './auth/assets/js/auth.js';
document.addEventListener('DOMContentLoaded', () => {
if (!isAuthenticated()) {
window.location.href = '/auth/#.html';
}
const logoutBtn = document.querySelector('#logout-btn');
logoutBtn.addEventListener('click', logout);
});
</script>
</body>
</html>