forked from Kamona-WD/starter-dashboard-layout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
893 lines (869 loc) · 41.7 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
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<title>Starter Dashboard Layout</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/Chart.min.css" />
<link rel="stylesheet" href="public/build/tailwind.css" />
<script src="https://cdn.jsdelivr.net/gh/alpinejs/[email protected]/dist/alpine.min.js" defer></script>
</head>
<body class="antialiased text-gray-900 bg-white">
<div
class="flex h-screen overflow-y-hidden bg-white"
x-data="setup()"
x-init="$refs.loading.classList.add('hidden')"
>
<!-- Loading screen -->
<div
x-ref="loading"
class="fixed inset-0 z-50 flex items-center justify-center text-white bg-black bg-opacity-50"
style="backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px)"
>
Loading.....
</div>
<!-- Sidebar backdrop -->
<div
x-show.in.out.opacity="isSidebarOpen"
class="fixed inset-0 z-10 bg-black bg-opacity-20 lg:hidden"
style="backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px)"
></div>
<!-- Sidebar -->
<aside
x-transition:enter="transition transform duration-300"
x-transition:enter-start="-translate-x-full opacity-30 ease-in"
x-transition:enter-end="translate-x-0 opacity-100 ease-out"
x-transition:leave="transition transform duration-300"
x-transition:leave-start="translate-x-0 opacity-100 ease-out"
x-transition:leave-end="-translate-x-full opacity-0 ease-in"
class="fixed inset-y-0 z-10 flex flex-col flex-shrink-0 w-64 max-h-screen overflow-hidden transition-all transform bg-white border-r shadow-lg lg:z-auto lg:static lg:shadow-none"
:class="{'-translate-x-full lg:translate-x-0 lg:w-20': !isSidebarOpen}"
>
<!-- sidebar header -->
<div class="flex items-center justify-between flex-shrink-0 p-2" :class="{'lg:justify-center': !isSidebarOpen}">
<span class="p-2 text-xl font-semibold leading-8 tracking-wider uppercase whitespace-nowrap">
K<span :class="{'lg:hidden': !isSidebarOpen}">-WD</span>
</span>
<button @click="toggleSidbarMenu()" class="p-2 rounded-md lg:hidden">
<svg
class="w-6 h-6 text-gray-600"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
</svg>
</button>
</div>
<!-- Sidebar links -->
<nav class="flex-1 overflow-hidden hover:overflow-y-auto">
<ul class="p-2 overflow-hidden">
<li>
<a
href="#"
class="flex items-center p-2 space-x-2 rounded-md hover:bg-gray-100"
:class="{'justify-center': !isSidebarOpen}"
>
<span>
<svg
class="w-6 h-6 text-gray-400"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"
/>
</svg>
</span>
<span :class="{ 'lg:hidden': !isSidebarOpen }">Dashboard</span>
</a>
</li>
<!-- Sidebar Links... -->
</ul>
</nav>
<!-- Sidebar footer -->
<div class="flex-shrink-0 p-2 border-t max-h-14">
<button
class="flex items-center justify-center w-full px-4 py-2 space-x-1 font-medium tracking-wider uppercase bg-gray-100 border rounded-md focus:outline-none focus:ring"
>
<span>
<svg
class="w-6 h-6"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"
/>
</svg>
</span>
<span :class="{'lg:hidden': !isSidebarOpen}"> Logout </span>
</button>
</div>
</aside>
<div class="flex flex-col flex-1 h-full overflow-hidden">
<!-- Navbar -->
<header class="flex-shrink-0 border-b">
<div class="flex items-center justify-between p-2">
<!-- Navbar left -->
<div class="flex items-center space-x-3">
<span class="p-2 text-xl font-semibold tracking-wider uppercase lg:hidden">K-WD</span>
<!-- Toggle sidebar button -->
<button @click="toggleSidbarMenu()" class="p-2 rounded-md focus:outline-none focus:ring">
<svg
class="w-4 h-4 text-gray-600"
:class="{'transform transition-transform -rotate-180': isSidebarOpen}"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 5l7 7-7 7M5 5l7 7-7 7" />
</svg>
</button>
</div>
<!-- Mobile search box -->
<div
x-show.transition="isSearchBoxOpen"
class="fixed inset-0 z-10 bg-black bg-opacity-20"
style="backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px)"
>
<div
@click.away="isSearchBoxOpen = false"
class="absolute inset-x-0 flex items-center justify-between p-2 bg-white shadow-md"
>
<div class="flex items-center flex-1 px-2 space-x-2">
<!-- search icon -->
<span>
<svg
<<<<<<<
HEAD
class="w-6 h-6 text-gray-500"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
/>
</svg>
</span>
<input
type="text"
placeholder="Search"
class="w-full px-4 py-3 text-gray-600 rounded-md focus:bg-gray-100 focus:outline-none"
/>
</div>
<!-- close button -->
<button @click="isSearchBoxOpen = false" class="flex-shrink-0 p-4 rounded-md">
<svg
class="w-4 h-4 text-gray-500"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
</svg>
</button>
</div>
</div>
<!-- Desktop search box -->
<div class="items-center hidden px-2 space-x-2 md:flex-1 md:flex md:mr-auto md:ml-5">
<!-- search icon -->
<span>
<svg
class="w-5 h-5 text-gray-500"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
/>
</svg>
</span>
<input
type="text"
placeholder="Search"
class="px-4 py-3 rounded-md hover:bg-gray-100 lg:max-w-sm md:py-2 md:flex-1 focus:outline-none md:focus:bg-gray-100 md:focus:shadow md:focus:border"
/>
</div>
<!-- Navbar right -->
<div class="relative flex items-center space-x-3">
<!-- Search button -->
<button
@click="isSearchBoxOpen = true"
class="p-2 bg-gray-100 rounded-full md:hidden focus:outline-none focus:ring hover:bg-gray-200"
>
<svg
class="w-6 h-6 text-gray-500"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
/>
</svg>
</button>
<div class="items-center hidden space-x-3 md:flex">
<!-- Notification Button -->
<div class="relative" x-data="{ isOpen: false }">
<!-- red dot -->
<div class="absolute right-0 p-1 bg-red-400 rounded-full animate-ping"></div>
<div class="absolute right-0 p-1 bg-red-400 border rounded-full"></div>
<button
@click="isOpen = !isOpen"
class="p-2 bg-gray-100 rounded-full hover:bg-gray-200 focus:outline-none focus:ring"
>
<svg
class="w-6 h-6 text-gray-500"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"
/>
</svg>
</button>
<!-- Dropdown card -->
<div
@click.away="isOpen = false"
x-show.transition.opacity="isOpen"
class="absolute w-48 max-w-md mt-3 transform bg-white rounded-md shadow-lg z-10 -translate-x-3/4 min-w-max"
>
<div class="p-4 font-medium border-b">
<span class="text-gray-800">Notification</span>
</div>
<ul class="flex flex-col p-2 my-2 space-y-1">
<li>
<a href="#" class="block px-2 py-1 transition rounded-md hover:bg-gray-100">Link</a>
</li>
<li>
<a href="#" class="block px-2 py-1 transition rounded-md hover:bg-gray-100">Another Link</a>
</li>
</ul>
<div class="flex items-center justify-center p-4 text-blue-700 underline border-t">
<a href="#">See All</a>
</div>
</div>
</div>
<!-- Services Button -->
<div x-data="{ isOpen: false }">
<button
@click="isOpen = !isOpen"
class="p-2 bg-gray-100 rounded-full hover:bg-gray-200 focus:outline-none focus:ring"
>
<svg
class="w-6 h-6 text-gray-500"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"
/>
</svg>
</button>
<!-- Dropdown -->
<div
@click.away="isOpen = false"
@keydown.escape="isOpen = false"
x-show.transition.opacity="isOpen"
class="absolute mt-3 transform bg-white rounded-md shadow-lg z-10 -translate-x-3/4 min-w-max"
>
<div class="p-4 text-lg font-medium border-b">Web apps & services</div>
<ul class="flex flex-col p-2 my-3 space-y-3">
<li>
<a href="#" class="flex items-start px-2 py-1 space-x-2 rounded-md hover:bg-gray-100">
<span class="block mt-1">
<svg
class="w-6 h-6 text-gray-500"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path fill="#fff" d="M12 14l9-5-9-5-9 5 9 5z" />
<path
fill="#fff"
d="M12 14l6.16-3.422a12.083 12.083 0 01.665 6.479A11.952 11.952 0 0012 20.055a11.952 11.952 0 00-6.824-2.998 12.078 12.078 0 01.665-6.479L12 14z"
/>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 14l9-5-9-5-9 5 9 5zm0 0l6.16-3.422a12.083 12.083 0 01.665 6.479A11.952 11.952 0 0012 20.055a11.952 11.952 0 00-6.824-2.998 12.078 12.078 0 01.665-6.479L12 14zm-4 6v-7.5l4-2.222"
/>
</svg>
</span>
<span class="flex flex-col">
<span class="text-lg">Atlassian</span>
<span class="text-sm text-gray-400">Lorem ipsum dolor sit.</span>
</span>
</a>
</li>
<li>
<a href="#" class="flex items-start px-2 py-1 space-x-2 rounded-md hover:bg-gray-100">
<span class="block mt-1">
<svg
class="w-6 h-6 text-gray-500"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207"
/>
</svg>
</span>
<span class="flex flex-col">
<span class="text-lg">Slack</span>
<span class="text-sm text-gray-400"
>Lorem ipsum, dolor sit amet consectetur adipisicing elit.</span
>
</span>
</a>
</li>
</ul>
<div class="flex items-center justify-center p-4 text-blue-700 underline border-t">
<a href="#">Show all apps</a>
</div>
</div>
</div>
<!-- Options Button -->
<div class="relative" x-data="{ isOpen: false }">
<button
@click="isOpen = !isOpen"
class="p-2 bg-gray-100 rounded-full hover:bg-gray-200 focus:outline-none focus:ring"
>
<svg
class="w-6 h-6 text-gray-500"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4"
/>
</svg>
</button>
<!-- Dropdown card -->
<div
@click.away="isOpen = false"
x-show.transition.opacity="isOpen"
class="absolute w-40 max-w-sm mt-3 transform bg-white rounded-md shadow-lg z-10 -translate-x-3/4 min-w-max"
>
<div class="p-4 font-medium border-b">
<span class="text-gray-800">Options</span>
</div>
<ul class="flex flex-col p-2 my-2 space-y-1">
<li>
<a href="#" class="block px-2 py-1 transition rounded-md hover:bg-gray-100">Link</a>
</li>
<li>
<a href="#" class="block px-2 py-1 transition rounded-md hover:bg-gray-100">Another Link</a>
</li>
</ul>
<div class="flex items-center justify-center p-4 text-blue-700 underline border-t">
<a href="#">See All</a>
</div>
</div>
</div>
</div>
<!-- avatar button -->
<div class="relative" x-data="{ isOpen: false }">
<button @click="isOpen = !isOpen" class="p-1 bg-gray-200 rounded-full focus:outline-none focus:ring">
<img
class="object-cover w-8 h-8 rounded-full"
src="https://avatars0.githubusercontent.com/u/57622665?s=460&u=8f581f4c4acd4c18c33a87b3e6476112325e8b38&v=4"
alt="Ahmed Kamel"
/>
</button>
<!-- green dot -->
<div class="absolute right-0 p-1 bg-green-400 rounded-full bottom-3 animate-ping"></div>
<div class="absolute right-0 p-1 bg-green-400 border border-white rounded-full bottom-3"></div>
<!-- Dropdown card -->
<div
@click.away="isOpen = false"
x-show.transition.opacity="isOpen"
class="absolute mt-3 transform -translate-x-full bg-white rounded-md shadow-lg min-w-max z-10"
>
<div class="flex flex-col p-4 space-y-1 font-medium border-b">
<span class="text-gray-800">Ahmed Kamel</span>
<span class="text-sm text-gray-400">[email protected]</span>
</div>
<ul class="flex flex-col p-2 my-2 space-y-1">
<li>
<a href="#" class="block px-2 py-1 transition rounded-md hover:bg-gray-100">Link</a>
</li>
<li>
<a href="#" class="block px-2 py-1 transition rounded-md hover:bg-gray-100">Another Link</a>
</li>
</ul>
<div class="flex items-center justify-center p-4 text-blue-700 underline border-t">
<a href="#">Logout</a>
</div>
</div>
</div>
</div>
</div>
</header>
<!-- Main content -->
<main class="flex-1 max-h-full p-5 overflow-hidden overflow-y-scroll">
<!-- Main content header -->
<div
class="flex flex-col items-start justify-between pb-6 space-y-4 border-b lg:items-center lg:space-y-0 lg:flex-row"
>
<h1 class="text-2xl font-semibold whitespace-nowrap">Dashboard</h1>
<a
href="https://github.com/Kamona-WD/starter-dashboard-layout"
target="_blank"
class="inline-flex items-center justify-center px-4 py-1 space-x-1 bg-gray-200 rounded-md shadow hover:bg-opacity-20"
>
<span>
<svg class="w-4 h-4 text-gray-500" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true">
<path
fill-rule="evenodd"
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"
></path>
</svg>
</span>
<span>View on Github</span>
</a>
</div>
<!-- Start Content -->
<!-- Chart cards (Four columns grid) -->
<div class="grid grid-cols-1 gap-6 mt-6 md:grid-cols-2 lg:grid-cols-4">
<!-- Users chart card -->
<a href="#" class="p-4 transition-shadow border rounded-lg shadow-sm hover:shadow-lg">
<div class="flex items-start">
<div class="flex flex-col flex-shrink-0 space-y-2">
<span class="text-gray-400">Total Users</span>
<span class="text-lg font-semibold">100,221</span>
</div>
<div class="relative min-w-0 ml-auto h-14">
<canvas id="usersChart"></canvas>
</div>
</div>
<div>
<span class="inline-block px-2 text-sm text-white bg-green-300 rounded">14%</span>
<span>from 2019</span>
</div>
</a>
<!-- Sessions chart card -->
<a href="#" class="p-4 transition-shadow border rounded-lg shadow-sm hover:shadow-lg">
<div class="flex items-start">
<div class="flex flex-col flex-shrink-0 space-y-2">
<span class="text-gray-400">Sessions</span>
<span class="text-lg font-semibold">40%</span>
</div>
<div class="relative min-w-0 ml-auto h-14">
<canvas id="sessionsChart"></canvas>
</div>
</div>
<div>
<span class="inline-block px-2 text-sm text-white bg-green-300 rounded">1.2%</span>
<span>from 2019</span>
</div>
</a>
<!-- Vists chart card -->
<a href="#" class="p-4 transition-shadow border rounded-lg shadow-sm hover:shadow-lg">
<div class="flex items-start">
<div class="flex flex-col flex-shrink-0 space-y-2">
<span class="text-gray-400">Vists</span>
<span class="text-lg font-semibold">300,527</span>
</div>
<div class="relative min-w-0 ml-auto h-14">
<canvas id="vistsChart"></canvas>
</div>
</div>
<div>
<span class="inline-block px-2 text-sm text-white bg-green-300 rounded">10%</span>
<span>from 2019</span>
</div>
</a>
<!-- Articles chart card -->
<a href="#" class="p-4 transition-shadow border rounded-lg shadow-sm hover:shadow-lg">
<div class="flex items-start">
<div class="flex flex-col flex-shrink-0 space-y-2">
<span class="text-gray-400">Articles</span>
<span class="text-lg font-semibold">600,429</span>
</div>
<div class="relative min-w-0 ml-auto h-14">
<canvas id="articlesChart"></canvas>
</div>
</div>
<div>
<span class="inline-block px-2 text-sm text-white bg-green-300 rounded">30%</span>
<span>from 2019</span>
</div>
</a>
</div>
<!-- Two columns grid -->
<div class="grid grid-cols-1 gap-6 mt-6 lg:grid-cols-2 xl:grid-cols-4">
<!-- Import data card -->
<div class="border rounded-lg shadow-sm">
<!-- Card header -->
<div class="flex items-center justify-between px-4 py-2 border-b">
<h5 class="font-semibold">Import Data</h5>
<!-- Dots button -->
<button class="p-2 rounded-full">
<svg
class="w-6 h-6 text-gray-600"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"
/>
</svg>
</button>
</div>
<p class="px-4 py-6 text-gray-600">See and talk to your users and import them into your platform.</p>
<ul class="px-4 pb-4 space-y-4 divide-y">
<h5 class="font-semibold">Import Users from:</h5>
<li class="flex items-start justify-between pt-4">
<div class="flex items-start space-x-3">
<!-- Twitter icon -->
<span class="flex items-center pt-1">
<svg fill="currentColor" class="w-5 h-5 text-blue-500">
<path
d="M6.29 18.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0020 3.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.073 4.073 0 01.8 7.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 010 16.407a11.616 11.616 0 006.29 1.84"
></path>
</svg>
</span>
<div>
<h5 class="font-semibold">Twitter</h5>
<span class="text-sm font-medium text-gray-400">Users</span>
</div>
</div>
<a href="#" class="flex items-center px-2 py-1 space-x-2 text-sm text-white bg-blue-600 rounded-md">
<span>Launch</span>
<span class="">
<svg
class="w-4 h-4"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
/>
</svg>
</span>
</a>
</li>
<li class="flex items-start justify-between pt-4">
<div class="flex items-start space-x-3">
<!-- Github icon -->
<span class="flex items-center pt-1">
<svg width="24" height="24" fill="currentColor" class="text-black">
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M12 2C6.477 2 2 6.463 2 11.97c0 4.404 2.865 8.14 6.839 9.458.5.092.682-.216.682-.48 0-.236-.008-.864-.013-1.695-2.782.602-3.369-1.337-3.369-1.337-.454-1.151-1.11-1.458-1.11-1.458-.908-.618.069-.606.069-.606 1.003.07 1.531 1.027 1.531 1.027.892 1.524 2.341 1.084 2.91.828.092-.643.35-1.083.636-1.332-2.22-.251-4.555-1.107-4.555-4.927 0-1.088.39-1.979 1.029-2.675-.103-.252-.446-1.266.098-2.638 0 0 .84-.268 2.75 1.022A9.606 9.606 0 0112 6.82c.85.004 1.705.114 2.504.336 1.909-1.29 2.747-1.022 2.747-1.022.546 1.372.202 2.386.1 2.638.64.696 1.028 1.587 1.028 2.675 0 3.83-2.339 4.673-4.566 4.92.359.307.678.915.678 1.846 0 1.332-.012 2.407-.012 2.734 0 .267.18.577.688.48C19.137 20.107 22 16.373 22 11.969 22 6.463 17.522 2 12 2z"
></path>
</svg>
</span>
<div>
<h5 class="font-semibold">Github</h5>
<span class="text-sm font-medium text-gray-400">Users</span>
</div>
</div>
<a href="#" class="flex items-center px-2 py-1 space-x-2 text-sm text-white bg-blue-600 rounded-md">
<span>Launch</span>
<span class="">
<svg
class="w-4 h-4"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
/>
</svg>
</span>
</a>
</li>
<li class="pt-4 text-sm font-medium text-gray-400">
<p>
Or you can
<a href="#" class="font-normal text-blue-500 hover:underline whitespace-nowrap"
>sync data to your dashboard</a
>
to ensure data is always up to date.
</p>
</li>
</ul>
</div>
<!-- Monthly chart card -->
<div class="border rounded-lg shadow-sm xl:col-span-3">
<!-- Card header -->
<div class="flex items-center justify-between px-4 py-2 border-b">
<h5 class="font-semibold">Monthly Expenses</h5>
<!-- Dots button -->
<button class="p-2 rounded-full">
<svg
class="w-6 h-6 text-gray-600"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"
/>
</svg>
</button>
</div>
<!-- Card content -->
<div class="flex items-center p-4 space-x-4">
<span class="text-3xl font-medium">45%</span>
<span class="flex items-center px-2 space-x-2 text-sm text-green-800 bg-green-100 rounded">
<span>
<svg viewBox="0 0 20 20" fill="currentColor" class="w-4 h-4">
<path
fill-rule="evenodd"
d="M12 7a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0V8.414l-4.293 4.293a1 1 0 01-1.414 0L8 10.414l-4.293 4.293a1 1 0 01-1.414-1.414l5-5a1 1 0 011.414 0L11 10.586 14.586 7H12z"
clip-rule="evenodd"
></path>
</svg>
</span>
<span>39.2%</span>
</span>
</div>
<!-- Chart -->
<div class="relative min-w-0 p-4 h-80">
<canvas id="updatingMonthlyChart"></canvas>
</div>
</div>
</div>
<!-- Table see (https://tailwindui.com/components/application-ui/lists/tables) -->
<h3 class="mt-6 text-xl">Users</h3>
<div class="flex flex-col mt-6">
<div class="-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8">
<div class="overflow-hidden border-b border-gray-200 rounded-md shadow-md">
<table class="min-w-full overflow-x-scroll divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th
scope="col"
class="px-6 py-3 text-xs font-medium tracking-wider text-left text-gray-500 uppercase"
>
Name
</th>
<th
scope="col"
class="px-6 py-3 text-xs font-medium tracking-wider text-left text-gray-500 uppercase"
>
Title
</th>
<th
scope="col"
class="px-6 py-3 text-xs font-medium tracking-wider text-left text-gray-500 uppercase"
>
Status
</th>
<th
scope="col"
class="px-6 py-3 text-xs font-medium tracking-wider text-left text-gray-500 uppercase"
>
Role
</th>
<th scope="col" class="relative px-6 py-3">
<span class="sr-only">Edit</span>
</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<template x-for="i in 10" :key="i">
<tr class="transition-all hover:bg-gray-100 hover:shadow-lg">
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 w-10 h-10">
<img
class="w-10 h-10 rounded-full"
src="https://avatars0.githubusercontent.com/u/57622665?s=460&u=8f581f4c4acd4c18c33a87b3e6476112325e8b38&v=4"
alt=""
/>
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Ahmed Kamel</div>
<div class="text-sm text-gray-500">[email protected]</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">Regional Paradigm Technician</div>
<div class="text-sm text-gray-500">Optimization</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span
class="inline-flex px-2 text-xs font-semibold leading-5 text-green-800 bg-green-100 rounded-full"
>
Active
</span>
</td>
<td class="px-6 py-4 text-sm text-gray-500 whitespace-nowrap">Admin</td>
<td class="px-6 py-4 text-sm font-medium text-right whitespace-nowrap">
<a href="#" class="text-indigo-600 hover:text-indigo-900">Edit</a>
</td>
</tr>
</template>
</tbody>
</table>
</div>
</div>
</div>
</div>
</main>
<!-- Main footer -->
<footer class="flex items-center justify-between flex-shrink-0 p-4 border-t max-h-14">
<div>K-WD © 2020</div>
<div class="text-sm">
Made by
<a
class="text-blue-400 underline"
href="https://github.com/Kamona-WD"
target="_blank"
rel="noopener noreferrer"
>Ahmed Kamel</a
>
</div>
<div>
<!-- Github svg -->
<a
href="https://github.com/Kamona-WD/starter-dashboard-layout"
target="_blank"
class="flex items-center space-x-1"
>
<svg class="w-6 h-6 text-gray-400" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true">
<path
fill-rule="evenodd"
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"
></path>
</svg>
<span class="hidden text-sm md:block">View on Github</span>
</a>
</div>
</footer>
</div>
<!-- Setting panel button -->
<div>
<button
@click="isSettingsPanelOpen = true"
class="fixed right-0 px-4 py-2 text-sm font-medium text-white uppercase transform rotate-90 translate-x-8 bg-gray-600 top-1/2 rounded-b-md"
>
Settings
</button>
</div>
<!-- Settings panel -->
<div
x-show="isSettingsPanelOpen"
@click.away="isSettingsPanelOpen = false"
x-transition:enter="transition transform duration-300"
x-transition:enter-start="translate-x-full opacity-30 ease-in"
x-transition:enter-end="translate-x-0 opacity-100 ease-out"
x-transition:leave="transition transform duration-300"
x-transition:leave-start="translate-x-0 opacity-100 ease-out"
x-transition:leave-end="translate-x-full opacity-0 ease-in"
class="fixed inset-y-0 right-0 flex flex-col bg-white shadow-lg bg-opacity-20 w-80"
style="backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px)"
>
<div class="flex items-center justify-between flex-shrink-0 p-2">
<h6 class="p-2 text-lg">Settings</h6>
<button @click="isSettingsPanelOpen = false" class="p-2 rounded-md focus:outline-none focus:ring">
<svg
class="w-6 h-6 text-gray-600"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
</svg>
</button>
</div>
<div class="flex-1 max-h-full p-4 overflow-hidden hover:overflow-y-scroll">
<span>Settings Content</span>
<!-- Settings Panel Content ... -->
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/Chart.bundle.min.js"></script>
<script src="public/build/script.js"></script>
<script>
const setup = () => {
return {
loading: true,
isSidebarOpen: false,
toggleSidbarMenu() {
this.isSidebarOpen = !this.isSidebarOpen
},
isSettingsPanelOpen: false,
isSearchBoxOpen: false,
}
}
</script>
</body>
</html>