-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
531 lines (487 loc) · 19.9 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
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
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
<!DOCTYPE html>
<html>
<head>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="css/materialize.min.css" media="screen,projection" />
<link type="text/css" rel="stylesheet" href="css/main.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Webstats | Admin Page</title>
<link rel="shortcut icon" type="image/png" href="img/favicon.png">
</head>
<body class="grey lighten-3">
<!-- NAVIGATION -->
<nav class="red darken-2">
<div class="container">
<div class="nav-wrapper">
<a href="#" class="brand-logo">WebStats</a>
<a href="#" data-activates="side-nav" class="button-collapse show-on-small left">
<i class="material-icons">menu</i>
</a>
<ul class="right hide-on-med-and-down">
<li class="active">
<a href="#">Dashboard</a>
</li>
<li>
<a href="#">Users</a>
</li>
<li>
<a href="#">Posts</a>
</li>
<li>
<a href="#">Comments</a>
</li>
<li>
<a href="#">Reports</a>
</li>
<a href="#" class="btn large white red-text">
<strong>LOG OUT</strong>
</a>
</ul>
<!-- SIDE NAV -->
<ul id="side-nav" class="side-nav">
<li>
<div class="user-view">
<div class="background">
<img src="img/user-background.jpeg" alt="Side navigation background">
</div>
<a href="#">
<img src="img/person2.jpg" alt="Admin avatar" class="circle">
</a>
<a href="#">
<span class="name white-text">John Doe</span>
</a>
<a href="#">
<span class="text white-text">Administrator</span>
</a>
</div>
</li>
<li>
<a href="#">Dashboard</a>
</li>
<li>
<a href="#">Users</a>
</li>
<li>
<a href="#">Posts</a>
</li>
<li>
<a href="#">Comments</a>
</li>
<li>
<a href="#">Reports</a>
</li>
<a href="#" class="btn large white red-text">
<strong>LOG OUT</strong>
</a>
</ul>
</div>
</div>
</nav>
<!-- DAILY STATS SECTION -->
<section class="section section-daily-stats center">
<div class="row">
<div class="col l3 m6 s12">
<div class="card-panel red lighten-1 white-text center">
<i class="material-icons medium">show_chart</i>
<h5>Visitors Today</h5>
<h3 class="count">114893</h3>
<div class="progress grey lighten-1">
<div class="determinate white" style="width:60%;"></div>
</div>
</div>
</div>
<div class="col l3 m6 s12">
<div class="card-panel red lighten-5 center">
<i class="material-icons medium">person_add</i>
<h5>New Users</h5>
<h3 class="count">1203</h3>
<div class="progress grey lighten-1">
<div class="determinate red lighten-1" style="width:35%;"></div>
</div>
</div>
</div>
<div class="col l3 m6 s12">
<div class="card-panel red lighten-1 white-text center">
<i class="material-icons medium">assignment</i>
<h5>New Posts</h5>
<h3 class="count">2867</h3>
<div class="progress grey lighten-1">
<div class="determinate white" style="width:80%;"></div>
</div>
</div>
</div>
<div class="col l3 m6 s12">
<div class="card-panel red lighten-5 center">
<i class="material-icons medium">comment</i>
<h5>New Comments</h5>
<h3 class="count">6931</h3>
<div class="progress grey lighten-1">
<div class="determinate red lighten-1" style="width:50%;"></div>
</div>
</div>
</div>
</div>
</section>
<!-- GRAPH FOR MONTHLY VISITORS AND PENDING POSTS -->
<section class="section section-visitors-posts">
<div class="row">
<!-- GRAPH -->
<div class="col l8 m6 s12">
<div class="card-panel">
<div id="usersChart" style="height:370px; width:100%;"></div>
</div>
</div>
<!-- PENDING POSTS -->
<div class="col l4 m6 s12">
<ul class="collection with-header pending-posts">
<li class="collection-header">
<h5>Posts Waiting For Approval</h5>
</li>
<li class="collection-item avatar">
<img src="img/person1.jpeg" alt="Avatar 1" class="circle">
<span class="title">Jane Doe</span>
<p class="truncate">Lorem ipsum dolor sit amet consectetur adipisicing elit. Autem libero sunt non error animi quibusdam velit eos
ut soluta blanditiis, et eius minima repellat nostrum, in perferendis porro? Rerum, voluptate.</p>
<a href="#" class="view blue-text">View</a> |
<a href="#" class="approve green-text">Approve</a> |
<a href="#" class="deny red-text">Deny</a>
</li>
<li class="collection-item avatar">
<img src="img/person2.jpg" alt="Avatar 1" class="circle">
<span class="title">Alan Taylor</span>
<p class="truncate">Lorem ipsum dolor sit amet consectetur adipisicing elit. Autem libero sunt non error animi quibusdam velit eos
ut soluta blanditiis, et eius minima repellat nostrum, in perferendis porro? Rerum, voluptate.</p>
<a href="#" class="view blue-text">View</a> |
<a href="#" class="approve green-text">Approve</a> |
<a href="#" class="deny red-text">Deny</a>
</li>
<li class="collection-item avatar">
<img src="img/person3.jpeg" alt="Avatar 1" class="circle">
<span class="title">Susan Doe</span>
<p class="truncate">Lorem ipsum dolor sit amet consectetur adipisicing elit. Autem libero sunt non error animi quibusdam velit eos
ut soluta blanditiis, et eius minima repellat nostrum, in perferendis porro? Rerum, voluptate.</p>
<a href="#" class="view blue-text">View</a> |
<a href="#" class="approve green-text">Approve</a> |
<a href="#" class="deny red-text">Deny</a>
</li>
<li class="collection-item avatar">
<img src="img/person3.jpeg" alt="Avatar 1" class="circle">
<span class="title">Susan Doe</span>
<p class="truncate">Lorem ipsum dolor sit amet consectetur adipisicing elit. Autem libero sunt non error animi quibusdam velit eos
ut soluta blanditiis, et eius minima repellat nostrum, in perferendis porro? Rerum, voluptate.</p>
<a href="#" class="view blue-text">View</a> |
<a href="#" class="approve green-text">Approve</a> |
<a href="#" class="deny red-text">Deny</a>
</li>
</ul>
</div>
</div>
</section>
<!-- REPORTED USERS AND REVENUE GRAPH -->
<section class="section section-reports-revenue">
<div class="row">
<!-- REPORTED USERS -->
<div class="col l4 m6 s12">
<ul class="collection with-header pending-posts">
<li class="collection-header">
<h5>Reported users</h5>
</li>
<li class="collection-item avatar">
<img src="img/person1.jpeg" alt="Avatar 1" class="circle">
<span class="title">Jane Doe</span>
<p class="truncate">Lorem ipsum dolor sit amet consectetur adipisicing elit. Autem libero sunt non error animi quibusdam velit eos
ut soluta blanditiis, et eius minima repellat nostrum, in perferendis porro? Rerum, voluptate.</p>
<a href="#" class="view-report blue-text">View report</a> |
<a href="#" class="dismiss-report green-text">Dismiss</a> |
<a href="#" class="ban-user red-text">Ban</a>
</li>
<li class="collection-item avatar">
<img src="img/person2.jpg" alt="Avatar 1" class="circle">
<span class="title">Alan Taylor</span>
<p class="truncate">Lorem ipsum dolor sit amet consectetur adipisicing elit. Autem libero sunt non error animi quibusdam velit eos
ut soluta blanditiis, et eius minima repellat nostrum, in perferendis porro? Rerum, voluptate.</p>
<a href="#" class="view-report blue-text">View report</a> |
<a href="#" class="dismiss-report green-text">Dismiss</a> |
<a href="#" class="ban-user red-text">Ban</a>
</li>
<li class="collection-item avatar">
<img src="img/person3.jpeg" alt="Avatar 1" class="circle">
<span class="title">Susan Doe</span>
<p class="truncate">Lorem ipsum dolor sit amet consectetur adipisicing elit. Autem libero sunt non error animi quibusdam velit eos
ut soluta blanditiis, et eius minima repellat nostrum, in perferendis porro? Rerum, voluptate.</p>
<a href="#" class="view-report blue-text">View report</a> |
<a href="#" class="dismiss-report green-text">Dismiss</a> |
<a href="#" class="ban-user red-text">Ban</a>
</li>
<li class="collection-item avatar">
<img src="img/person3.jpeg" alt="Avatar 1" class="circle">
<span class="title">Susan Doe</span>
<p class="truncate">Lorem ipsum dolor sit amet consectetur adipisicing elit. Autem libero sunt non error animi quibusdam velit eos
ut soluta blanditiis, et eius minima repellat nostrum, in perferendis porro? Rerum, voluptate.</p>
<a href="#" class="view-report blue-text">View report</a> |
<a href="#" class="dismiss-report green-text">Dismiss</a> |
<a href="#" class="ban-user red-text">Ban</a>
</li>
</ul>
</div>
<!-- REVENUE -->
<div class="col l8 m6 s12">
<div class="card-panel">
<div id="revenueChart" style="height:370px; width:100%;"></div>
</div>
</div>
</div>
</section>
<!-- INBOX AND TODO LIST -->
<section class="section secion-inbox-todo">
<div class="row">
<div class="col l6 m6 s12">
<ul class="collection with-header inbox">
<li class="collection-header">
<h5>Inbox</h5>
</li>
<li class="collection-item avatar">
<img src="img/person1.jpeg" alt="Avatar 1" class="circle">
<span class="title">Jane Doe</span>
<p class="truncate">Lorem ipsum dolor sit amet consectetur adipisicing elit. Autem libero sunt non error animi quibusdam velit eos
ut soluta blanditiis, et eius minima repellat nostrum, in perferendis porro? Rerum, voluptate.</p>
<a href="#" class="read-message blue-text">Read</a> |
<a href="#" class="delete-message red-text">Delete</a>
</li>
<li class="collection-item avatar">
<img src="img/person2.jpg" alt="Avatar 1" class="circle">
<span class="title">Alan Taylor</span>
<p class="truncate">Lorem ipsum dolor sit amet consectetur adipisicing elit. Autem libero sunt non error animi quibusdam velit eos
ut soluta blanditiis, et eius minima repellat nostrum, in perferendis porro? Rerum, voluptate.</p>
<a href="#" class="read-message blue-text">Read</a> |
<a href="#" class="delete-message red-text">Delete</a>
</li>
<li class="collection-item avatar">
<img src="img/person3.jpeg" alt="Avatar 1" class="circle">
<span class="title">Susan Doe</span>
<p class="truncate">Lorem ipsum dolor sit amet consectetur adipisicing elit. Autem libero sunt non error animi quibusdam velit eos
ut soluta blanditiis, et eius minima repellat nostrum, in perferendis porro? Rerum, voluptate.</p>
<a href="#" class="read-message blue-text">Read</a> |
<a href="#" class="delete-message red-text">Delete</a>
</li>
<li class="collection-item avatar">
<img src="img/person3.jpeg" alt="Avatar 1" class="circle">
<span class="title">Susan Doe</span>
<p class="truncate">Lorem ipsum dolor sit amet consectetur adipisicing elit. Autem libero sunt non error animi quibusdam velit eos
ut soluta blanditiis, et eius minima repellat nostrum, in perferendis porro? Rerum, voluptate.</p>
<a href="#" class="read-message blue-text">Read</a> |
<a href="#" class="delete-message red-text">Delete</a>
</li>
<li class="collection-item avatar">
<img src="img/person3.jpeg" alt="Avatar 1" class="circle">
<span class="title">Susan Doe</span>
<p class="truncate">Lorem ipsum dolor sit amet consectetur adipisicing elit. Autem libero sunt non error animi quibusdam velit eos
ut soluta blanditiis, et eius minima repellat nostrum, in perferendis porro? Rerum, voluptate.</p>
<a href="#" class="read-message blue-text">Read</a> |
<a href="#" class="delete-message red-text">Delete</a>
</li>
</ul>
</div>
<div class="col l6 m6 s12">
<div class="card">
<div class="card-content">
<span class="card-title">Todo List</span>
<form id="todo-form">
<div class="input-field">
<input type="text" id="todo" placeholder="Add Task...">
</div>
</form>
<ul class="collection todos">
<li class="collection-item">
<div>Todo One
<a href="#!" class="secondary-content delete">
<i class="material-icons red-text">close</i>
</a>
</div>
</li>
<li class="collection-item">
<div>Todo Two
<a href="#!" class="secondary-content delete">
<i class="material-icons red-text">close</i>
</a>
</div>
</li>
<li class="collection-item">
<div>Todo Three
<a href="#!" class="secondary-content delete">
<i class="material-icons red-text">close</i>
</a>
</div>
</li>
<li class="collection-item">
<div>Todo Four
<a href="#!" class="secondary-content delete">
<i class="material-icons red-text">close</i>
</a>
</div>
</li>
<li class="collection-item">
<div>Todo Five
<a href="#!" class="secondary-content delete">
<i class="material-icons red-text">close</i>
</a>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
</section>
<!-- FOOTER -->
<footer class="section red darken-2 white-text center">
<p>WebStats Copyright © 2018</p>
</footer>
<!-- FAB -->
<div class="fixed-action-btn">
<a class="btn-floating btn-large red">
<i class="material-icons">add</i>
</a>
<ul>
<li>
<a href="#modal-announcment" class="modal-trigger btn-floating yellow darken-3">
<i class="material-icons">mode_edit</i>
</a>
</li>
</ul>
</div>
<!-- ANNOUCNMENT MODAL -->
<div id="modal-announcment" class="modal">
<div class="modal-content">
<h4>Add Announcment</h4>
<form>
<div class="input-field">
<input type="text" id="title">
<label for="title">Title</label>
</div>
<div class="input-field">
<select>
<option value="" selected disabled>Select Option</option>
<option value="1">General announcment</option>
<option value="2">News</option>
<option value="3">Promotions</option>
<option value="4">Other</option>
</select>
<label>Category</label>
</div>
<div class="input-field">
<textarea name="body" id="body" class="materialize-textarea"></textarea>
<label for="body"></label>
</div>
</form>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close btn yellow darken-3 black-text">Submit</a>
</div>
</div>
</div>
<!-- PRELOADER -->
<div class="loader preloader-wrapper big active">
<div class="spinner-layer spinner-red only">
<div class="circle-clipper left">
<div class="circle"></div>
</div>
<div class="gap-patch">
<div class="circle"></div>
</div>
<div class="circle-clipper right">
<div class="circle"></div>
</div>
</div>
</div>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="js/materialize.min.js"></script>
<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
<script src="https://cdn.ckeditor.com/4.8.0/standard/ckeditor.js"></script>
<script src="js/charts.js"></script>
<script>
// HIDE EVERYTHING ON OPEN
$(".section").hide();
setTimeout(() => {
$(document).ready(() => {
// SHOW HIDDEN SECTIONS
$(".section").fadeIn();
// PRELOADER
$(".loader").fadeOut();
// SIDE DRAWER
$(".button-collapse").sideNav();
// MODAL
$(".modal").modal();
// SELECT
$(".select").material_select();
// COUNTER - Animates the Daily Stats section
$(".count").each(function () {
$(this).prop("Counter", 0).animate({
Counter: $(this).text()
}, {
duration: 1000,
easing: "swing",
step: function (now) {
$(this).text(Math.ceil(now));
}
});
});
// PENDING POSTS
$(".view").click(function (e) {
Materialize.toast("Here is the comment", 3000);
e.preventDefault();
});
$(".approve").click(function (e) {
Materialize.toast("Comment Approved", 3000);
e.preventDefault();
});
$(".deny").click(function (e) {
Materialize.toast("Comment Denied", 3000);
e.preventDefault();
});
// USER REPORTS
$(".view-report").click(function (e) {
Materialize.toast("Here is the report", 3000);
e.preventDefault();
});
$(".dismiss-report").click(function (e) {
Materialize.toast("Report dismissed", 3000);
e.preventDefault();
});
$(".ban-user").click(function (e) {
Materialize.toast("User banned!", 3000);
e.preventDefault();
});
// INBOX
$(".read-message").click(function (e) {
Materialize.toast("Here is your message", 3000);
e.preventDefault();
});
$(".delete-message").click(function (e) {
Materialize.toast("Message deleted!", 3000);
e.preventDefault();
});
// TODO LIST
$("#todo-form").submit(function (e) {
const output = `
<li class="collection-item">
<div>${$("#todo").val()}
<a href="#!" class="secondary-content delete">
<i class="material-icons red-text">close</i>
</a>
</div>
</li>`;
$(".todos").append(output);
Materialize.toast("Todo Added", 3000);
e.preventDefault();
});
// DELETE TODO ITEM
$(".todos").on("click", ".delete", function (e) {
$(this).parent().parent().remove();
Materialize.toast("Todo Removed", 3000);
e.preventDefault();
});
CKEDITOR.replace("body");
});
}, 1000);
</script>
</body>