-
-
Notifications
You must be signed in to change notification settings - Fork 252
/
dashboard.html
390 lines (350 loc) · 25.5 KB
/
dashboard.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
<!doctype html>
<html lang="id" data-bs-theme="light">
<head>
<!-- Common -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Dashboard Ulems">
<title>Dashboard Ulems</title>
<!-- Appearance -->
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="Dashboard Ulems">
<meta name="theme-color" content="#000000">
<meta name="color-scheme" content="dark light">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="shortcut icon" type="image/x-icon" href="https://ulems.my.id/assets/favicon.ico">
<link rel="apple-touch-icon" sizes="192x192" href="https://ulems.my.id/assets/images/icon-192x192.png">
<link rel="icon" type="image/x-icon" href="https://ulems.my.id/assets/favicon.ico">
<!-- Preconnect CDN -->
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net">
<link rel="dns-prefetch" href="https://fonts.googleapis.com">
<link rel="dns-prefetch" href="https://fonts.gstatic.com">
<link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin="anonymous">
<link rel="preconnect" href="https://fonts.googleapis.com" crossorigin="anonymous">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<!-- Preload Resources -->
<link rel="preload" href="https://cdn.jsdelivr.net/npm/normalize.css@8.0.1/normalize.css" integrity="sha256-WAgYcAck1C1/zEl5sBl5cfyhxtLgKGdpI3oKyJffVRI=" crossorigin="anonymous" as="style">
<link rel="preload" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" integrity="sha256-PI8n5gCcz9cQqQXm3PEtDuPG8qx9oFsFctPg0S5zb8g=" crossorigin="anonymous" as="style">
<link rel="preload" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.1/css/all.min.css" integrity="sha256-wiz7ZSCn/btzhjKDQBms9Hx4sSeUYsDrTLg7roPstac=" crossorigin="anonymous" as="style">
<link rel="preload" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha256-CDOy6cOibCWEdsRiZuaHf8dSGGJRYuBGC+mjoJimHGw=" crossorigin="anonymous" as="script">
<!-- Font -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Josefin+Sans&display=swap">
<!-- Dependencies CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/normalize.css@8.0.1/normalize.css" integrity="sha256-WAgYcAck1C1/zEl5sBl5cfyhxtLgKGdpI3oKyJffVRI=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" integrity="sha256-PI8n5gCcz9cQqQXm3PEtDuPG8qx9oFsFctPg0S5zb8g=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.1/css/all.min.css" integrity="sha256-wiz7ZSCn/btzhjKDQBms9Hx4sSeUYsDrTLg7roPstac=" crossorigin="anonymous">
<link rel="stylesheet" href="./css/dashboard.css">
</head>
<!-- Data theme ['auto', 'dark', 'light'] -->
<body data-url="https://api.ulems.my.id/" data-theme="auto">
<!-- Nav bottom -->
<nav class="navbar bg-light navbar-expand fixed-bottom rounded-top-4 border-top d-md-none d-lg-none d-xl-none p-0">
<ul class="navbar-nav nav-justified w-100 align-items-center">
<li class="nav-item">
<button class="nav-link active" onclick="admin.navbar.buttonNavHome(this)" id="button-mobile-home">
<i class="fa-solid fa-house"></i>
<span class="d-block" style="font-size: 0.75rem;">Home</span>
</button>
</li>
<li class="nav-item">
<button class="nav-link" onclick="admin.navbar.buttonNavSetting(this)" id="button-mobile-setting">
<i class="fa-solid fa-gear"></i>
<span class="d-block" style="font-size: 0.75rem;">Setting</span>
</button>
</li>
</ul>
</nav>
<!-- Main -->
<main class="container mt-4 mb-5">
<!-- Header -->
<div class="d-none d-sm-flex justify-content-between align-items-center mt-4 mb-5 pt-1">
<h4 class="m-0 p-0 flex-grow-1 fw-bold">Undangan<i class="fa-solid fa-fire text-danger ms-2"></i></h4>
<div class="m-0 p-0 flex-grow-1 text-end" id="dashboard-name" style="font-size: 1.4rem;">
<div class="placeholder-wave">
<span class="placeholder col-6 rounded-4"></span>
</div>
</div>
</div>
<!-- Body -->
<div class="row">
<!-- Menu -->
<div class="col-md-3 d-none d-md-block">
<div class="pe-3">
<ul class="nav flex-column w-100 nav-pills" role="tablist">
<li class="nav-item" role="presentation">
<button class="btn-theme-dark nav-link w-100 text-start fw-semibold mb-1 rounded-4 shadow-sm active" data-bs-toggle="pill" data-bs-target="#pills-home" id="button-home" type="button" role="tab" aria-controls="pills-home" aria-selected="true">
<i class="fa-solid fa-house ms-3 me-2"></i>Home
</button>
</li>
<li class="nav-item" role="presentation">
<button class="btn-theme-dark nav-link w-100 text-start fw-semibold my-1 rounded-4 shadow-sm" data-bs-toggle="pill" data-bs-target="#pills-setting" id="button-setting" type="button" role="tab" aria-controls="pills-setting" aria-selected="false">
<i class="fa-solid fa-gear ms-3 me-2"></i>Setting
</button>
</li>
<li class="nav-item" role="presentation">
<hr class="my-2" aria-hidden="true">
</li>
<li class="nav-item" role="presentation">
<button class="btn-theme-dark logout nav-link w-100 text-start fw-semibold mt-1 rounded-4 shadow-sm" onclick="admin.logout()" type="button" role="tab" aria-selected="false">
<i class="fa-solid fa-right-from-bracket ms-3 me-2"></i>Logout
</button>
</li>
</ul>
</div>
</div>
<!-- Content -->
<div class="col-md-9">
<div class="tab-content">
<!-- Home -->
<section class="tab-pane fade show active" id="pills-home" role="tabpanel" tabindex="0">
<!-- Sub Header -->
<div class="rounded-4 p-2 mb-4 shadow" style="background-color: var(--bs-gray-200)">
<div class="d-flex justify-content-between">
<h5 class="fw-semibold m-1" style="color: var(--bs-gray-900);"><i class="fa-solid fa-home mx-2"></i>Home</h5>
<div class="d-flex">
<button class="btn btn-success rounded-3 btn-sm shadow-sm my-0 ms-0 me-2 pb-0" onclick="admin.download(this)" data-offline-disabled="false" aria-label="Download comment">
<i class="fa-solid fa-download"></i><span class="d-none d-sm-inline ms-2">Download</span>
</button>
<button class="btn btn-secondary rounded-3 btn-sm shadow-sm m-0 pb-0" onclick="theme.change()" aria-label="Change theme">
<i class="fa-solid fa-circle-half-stroke"></i><span class="d-none d-sm-inline ms-2">Theme</span>
</button>
</div>
</div>
</div>
<!-- Stats -->
<div class="row">
<div class="col col-xl-3 col-6 mb-3">
<div class="rounded-4 shadow p-3 border-0" style="background: #8D9EFF;">
<div class="row align-items-center" style="color: var(--bs-gray-100);">
<div class="col-9">
<p class="fw-bold m-0 p-0">Comments</p>
<div class="fw-bold m-0 p-0" id="count-comment">
<div class="placeholder-wave">
<span class="placeholder col-8 rounded-3"></span>
</div>
</div>
</div>
<div class="col-3 p-0">
<div class="d-md-none d-lg-none d-xl-none">
<i class="fa-solid fa-comments me-2" style="font-size: 1.5rem;"></i>
</div>
<div class="d-none d-md-block d-lg-block d-xl-block">
<i class="fa-solid fa-comments fa-2x me-2"></i>
</div>
</div>
</div>
</div>
</div>
<div class="col col-xl-3 col-6 mb-3">
<div class="rounded-4 shadow p-3 border-0" style="background: #8D72E1;">
<div class="row align-items-center" style="color: var(--bs-gray-100);">
<div class="col-9">
<p class="fw-bold m-0 p-0">Present</p>
<div class="fw-bold m-0 p-0" id="count-present">
<div class="placeholder-wave">
<span class="placeholder col-8 rounded-3"></span>
</div>
</div>
</div>
<div class="col-3 p-0">
<div class="d-md-none d-lg-none d-xl-none">
<i class="fa-solid fa-circle-check me-2" style="font-size: 1.5rem;"></i>
</div>
<div class="d-none d-md-block d-lg-block d-xl-block">
<i class="fa-solid fa-circle-check fa-2x me-2"></i>
</div>
</div>
</div>
</div>
</div>
<div class="col col-xl-3 col-6 mb-3">
<div class="rounded-4 shadow p-3 border-0" style="background: #7766CF;">
<div class="row align-items-center" style="color: var(--bs-gray-100);">
<div class="col-9">
<p class="fw-bold m-0 p-0">Absent</p>
<div class="fw-bold m-0 p-0" id="count-absent">
<div class="placeholder-wave">
<span class="placeholder col-8 rounded-3"></span>
</div>
</div>
</div>
<div class="col-3 p-0">
<div class="d-md-none d-lg-none d-xl-none">
<i class="fa-solid fa-circle-xmark me-2" style="font-size: 1.5rem;"></i>
</div>
<div class="d-none d-md-block d-lg-block d-xl-block">
<i class="fa-solid fa-circle-xmark fa-2x me-2"></i>
</div>
</div>
</div>
</div>
</div>
<div class="col col-xl-3 col-6 mb-3">
<div class="rounded-4 shadow p-3 border-0" style="background: #6C4AB6;">
<div class="row align-items-center" style="color: var(--bs-gray-100);">
<div class="col-9">
<p class="fw-bold m-0 p-0">Likes</p>
<div class="fw-bold m-0 p-0" id="count-like">
<div class="placeholder-wave">
<span class="placeholder col-8 rounded-3"></span>
</div>
</div>
</div>
<div class="col-3 p-0">
<div class="d-md-none d-lg-none d-xl-none">
<i class="fa-solid fa-heart me-2" style="font-size: 1.5rem;"></i>
</div>
<div class="d-none d-md-block d-lg-block d-xl-block">
<i class="fa-solid fa-heart fa-2x me-2"></i>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Form -->
<div class="bg-theme-light p-3 mt-2 rounded-4 shadow">
<label for="form-comment" class="form-label fw-bold"><i class="fa-solid fa-comment me-1"></i>Comment</label>
<textarea class="form-control shadow-sm mb-3 rounded-4" id="form-comment" name="form-comment" rows="3" placeholder="Type to comment" data-offline-disabled="false"></textarea>
<div class="d-flex justify-content-end mb-0">
<button onclick="comment.send(this)" class="btn btn-primary btn-sm rounded-4 shadow-sm" data-offline-disabled="false"><i class="fa-solid fa-paper-plane me-1"></i>Send</button>
</div>
</div>
<!-- Comments -->
<div class="my-2 pt-3" id="comments" data-loading="false"></div>
<!-- Pagination -->
<nav class="d-flex d-none justify-content-center py-3 mb-4" id="pagination">
<ul class="pagination mb-2 shadow-sm rounded-4">
<li class="page-item disabled" id="previous">
<button class="page-link rounded-start-4" onclick="comment.pagination.previous(this)" data-offline-disabled="false">
<i class="fa-solid fa-circle-left me-1"></i>Prev
</button>
</li>
<li class="page-item disabled">
<span class="page-link text-dark" id="page">1</span>
</li>
<li class="page-item" id="next">
<button class="page-link rounded-end-4" onclick="comment.pagination.next(this)" data-offline-disabled="false">
Next<i class="fa-solid fa-circle-right ms-1"></i>
</button>
</li>
</ul>
</nav>
</section>
<!-- Setting -->
<section class="tab-pane fade" id="pills-setting" role="tabpanel" tabindex="0">
<!-- Sub Header -->
<div class="rounded-4 p-2 mb-4 shadow" style="background-color: var(--bs-gray-200)">
<h5 class="fw-semibold m-1" style="color: var(--bs-gray-900);"><i class="fa-solid fa-gear mx-2"></i>Setting</h5>
</div>
<!-- Email -->
<div class="p-3 bg-theme-light mb-3 rounded-4 shadow">
<p class="mx-0 mt-0 mb-1 p-0 fw-bold"><i class="fa-solid fa-envelope me-1"></i>Email</p>
<p class="m-0 p-0" id="dashboard-email"></p>
</div>
<!-- Name -->
<div class="p-3 bg-theme-light mb-3 rounded-4 shadow">
<p class="mx-0 mt-0 mb-1 p-0 fw-bold"><i class="fa-solid fa-person me-1"></i>Name</p>
<form>
<div class="mb-3">
<input type="text" class="form-control form-control-sm rounded-4 shadow-sm" id="form-name" name="form-name" oninput="admin.enableButtonName()" data-offline-disabled="false">
</div>
</form>
<div class="d-flex justify-content-end">
<button type="button" class="btn btn-sm btn-primary rounded-4 shadow-sm" id="button-change-name" onclick="admin.changeName(this)" disabled data-offline-disabled="false">Change</button>
</div>
</div>
<!-- Access Key -->
<div class="p-3 bg-theme-light mb-3 rounded-4 shadow">
<p class="mx-0 mt-0 mb-1 p-0 fw-bold"><i class="fa-solid fa-key me-1"></i>Access Key</p>
<div class="input-group input-group-sm rounded-4 mb-3">
<input type="text" class="form-control form-control-sm rounded-start-4 shadow-sm" id="dashboard-accesskey" readonly>
<button class="btn btn-sm btn-outline-secondary rounded-end-4 shadow-sm" type="button" data-copy="" onclick="util.copy(this)" id="button-copy-accesskey" data-offline-disabled="false"><i class="fa-solid fa-copy"></i></button>
</div>
<div class="d-flex justify-content-end">
<button type="button" class="btn btn-sm btn-primary rounded-4 shadow-sm" onclick="admin.regenerate(this)" data-offline-disabled="false">Regenerate</button>
</div>
</div>
<!-- Toggle -->
<div class="p-3 bg-theme-light mb-3 rounded-4 shadow">
<p class="mx-0 mt-0 mb-1 p-0 fw-bold"><i class="fa-solid fa-sliders me-1"></i>Control</p>
<div class="form-check form-switch mb-1">
<input class="form-check-input shadow-sm" style="cursor:pointer;" type="checkbox" role="switch" id="filterBadWord" onchange="admin.changeFilterBadWord(this)" data-offline-disabled="false">
<label class="form-check-label" style="cursor:pointer;" for="filterBadWord">Filter Bad Word</label>
</div>
<div class="form-check form-switch mb-1">
<input class="form-check-input shadow-sm" style="cursor:pointer;" type="checkbox" role="switch" id="replyComment" onchange="admin.replyComment(this)" data-offline-disabled="false">
<label class="form-check-label" style="cursor:pointer;" for="replyComment">Can Reply Comment</label>
</div>
<div class="form-check form-switch mb-1">
<input class="form-check-input shadow-sm" style="cursor:pointer;" type="checkbox" role="switch" id="editComment" onchange="admin.editComment(this)" data-offline-disabled="false">
<label class="form-check-label" style="cursor:pointer;" for="editComment">Can Edit Comment</label>
</div>
<div class="form-check form-switch mb-1">
<input class="form-check-input shadow-sm" style="cursor:pointer;" type="checkbox" role="switch" id="deleteComment" onchange="admin.deleteComment(this)" data-offline-disabled="false">
<label class="form-check-label" style="cursor:pointer;" for="deleteComment">Can Delete Comment</label>
</div>
</div>
<!-- Change Password -->
<div class="p-3 bg-theme-light mb-3 rounded-4 shadow">
<p class="mx-0 mt-0 mb-1 p-0 fw-bold"><i class="fa-solid fa-lock me-1"></i>Change Password</p>
<form>
<input hidden type="text" name="username" autocomplete="username" value="...">
<div class="my-2">
<input type="password" class="form-control form-control-sm rounded-4 shadow-sm" id="old_password" name="old_password" placeholder="Old Password" autocomplete="current-password" data-offline-disabled="false">
</div>
<div class="mb-3">
<input type="password" class="form-control form-control-sm rounded-4 shadow-sm" id="new_password" name="new_password" oninput="admin.enableButtonPassword()" placeholder="New Password" autocomplete="new-password" data-offline-disabled="false">
</div>
</form>
<div class="d-flex justify-content-end">
<button type="button" class="btn btn-sm btn-primary rounded-4 shadow-sm" id="button-change-password" onclick="admin.changePassword(this)" disabled data-offline-disabled="false">Change</button>
</div>
</div>
<!-- Logout -->
<div class="d-md-none d-lg-none d-xl-none">
<div class="p-3 bg-theme-light mb-3 rounded-4 shadow">
<button type="button" class="btn btn-danger btn-sm w-100 text-center fw-semibold rounded-4 shadow-sm" onclick="admin.logout()">
<i class="fa-solid fa-right-from-bracket me-2"></i>Logout
</button>
</div>
</div>
<div class="p-3 bg-theme-light mb-4 rounded-4 shadow">
<p class="mx-0 mt-0 mb-1 p-0 fw-bold"><i class="fa-solid fa-heart me-1"></i>Project</p>
<p class="m-0 p-0">
If you want to support me, consider <a target="_blank" href="https://saweria.co/dewanakl">buying me a coffee</a><i class="fa-solid fa-mug-hot ms-1"></i>
</p>
</div>
</section>
</div>
</div>
</div>
</main>
<!-- Offline -->
<div class="fixed-top" id="offline-mode" style="opacity: 0; z-index: 1057; pointer-events: none;"></div>
<!-- Modal login -->
<div class="modal fade" id="mainModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-label="Modal Login" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content rounded-4">
<div class="modal-body">
<form>
<div class="mb-3">
<label for="loginEmail" class="form-label"><i class="fa-solid fa-envelope me-1"></i>Email</label>
<input type="email" class="form-control shadow-sm rounded-4" id="loginEmail" placeholder="Masukkan email Anda" required autocomplete="email" autofocus>
</div>
<div class="mb-3">
<label for="loginPassword" class="form-label"><i class="fa-solid fa-lock me-1"></i>Password</label>
<input type="password" class="form-control shadow-sm rounded-4" id="loginPassword" placeholder="Masukkan password Anda" required autocomplete="current-password">
</div>
<div class="d-grid">
<button type="submit" class="btn btn-primary shadow-sm rounded-4" onclick="admin.auth.login(this)"><i class="fa-solid fa-right-to-bracket me-1"></i>Login</button>
</div>
</form>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha256-CDOy6cOibCWEdsRiZuaHf8dSGGJRYuBGC+mjoJimHGw=" crossorigin="anonymous"></script>
<script src="./js/dashboard.js" type="module"></script>
</body>
</html>