forked from tailwindtoolbox/Minimal-Admin-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
517 lines (428 loc) · 21.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
<!--This template is based on: https://dribbble.com/shots/6531694-Marketing-Dashboard by Gregoire Vella -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Tailwind Starter Template - Minimal Admin Template: Tailwind Toolbox</title>
<meta name="description" content="description here">
<meta name="keywords" content="keywords,here">
<link href="https://fonts.googleapis.com/css?family=Nunito:400,700,800" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<link rel="stylesheet" href="https://unpkg.com/tailwindcss@2.2.19/dist/tailwind.min.css"/>
<!--Replace with your tailwind.css once created-->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/chartist.js/latest/chartist.min.css">
<style>
.nunito {
font-family: 'nunito', font-sans;
}
.border-b-1 {
border-bottom-width: 1px;
}
.border-l-1 {
border-left-width: 1px;
}
hover\:border-none:hover {
border-style: none;
}
#sidebar {
transition: ease-in-out all .3s;
z-index: 9999;
}
#sidebar span {
opacity: 0;
position: absolute;
transition: ease-in-out all .1s;
}
#sidebar:hover {
width: 150px;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
/*shadow-2xl*/
}
#sidebar:hover span {
opacity: 1;
}
</style>
</head>
<body class="flex h-screen bg-gray-100 font-sans">
<!-- Side bar-->
<div id="sidebar" class="h-screen w-16 menu bg-white text-white px-4 flex items-center nunito static fixed shadow">
<ul class="list-reset ">
<li class="my-2 md:my-0">
<a href="#" class="block py-1 md:py-3 pl-1 align-middle text-gray-600 no-underline hover:text-indigo-400">
<i class="fas fa-home fa-fw mr-3"></i><span class="w-full inline-block pb-1 md:pb-0 text-sm">Home</span>
</a>
</li>
<li class="my-2 md:my-0 ">
<a href="#" class="block py-1 md:py-3 pl-1 align-middle text-gray-600 no-underline hover:text-indigo-400">
<i class="fas fa-tasks fa-fw mr-3"></i><span class="w-full inline-block pb-1 md:pb-0 text-sm">Tasks</span>
</a>
</li>
<li class="my-2 md:my-0">
<a href="#" class="block py-1 md:py-3 pl-1 align-middle text-gray-600 no-underline hover:text-indigo-400">
<i class="fa fa-envelope fa-fw mr-3"></i><span class="w-full inline-block pb-1 md:pb-0 text-sm">Messages</span>
</a>
</li>
<li class="my-2 md:my-0">
<a href="#" class="block py-1 md:py-3 pl-1 align-middle text-gray-600 no-underline hover:text-indigo-400">
<i class="fas fa-chart-area fa-fw mr-3 text-indigo-400"></i><span class="w-full inline-block pb-1 md:pb-0 text-sm">Analytics</span>
</a>
</li>
<li class="my-2 md:my-0">
<a href="#" class="block py-1 md:py-3 pl-1 align-middle text-gray-600 no-underline hover:text-indigo-400">
<i class="fa fa-wallet fa-fw mr-3"></i><span class="w-full inline-block pb-1 md:pb-0 text-sm">Payments</span>
</a>
</li>
</ul>
</div>
<div class="flex flex-row flex-wrap flex-1 flex-grow content-start pl-16">
<div class="h-40 lg:h-20 w-full flex flex-wrap">
<nav id="header" class="bg-gray-200 w-full lg:max-w-sm flex items-center border-b-1 border-gray-300 order-2 lg:order-1">
<div class="px-2 w-full">
<select name="" class="bg-gray-300 border-2 border-gray-200 rounded-full w-full py-3 px-4 text-gray-500 font-bold leading-tight focus:outline-none focus:bg-white focus:shadow-md" id="form-field2">
<option value="Default">default</option>
<option value="A">report a</option>
<option value="B">report b</option>
<option value="C">report c</option>
</select>
</div>
</nav>
<nav id="header1" class="bg-gray-100 w-auto flex-1 border-b-1 border-gray-300 order-1 lg:order-2">
<div class="flex h-full justify-between items-center">
<!--Search-->
<div class="relative w-full max-w-3xl px-6">
<div class="absolute h-10 mt-1 left-0 top-0 flex items-center pl-10">
<svg class="h-4 w-4 fill-current text-gray-600" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
<path d="M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"></path>
</svg>
</div>
<input id="search-toggle" type="search" placeholder="search" class="block w-full bg-gray-200 focus:outline-none focus:bg-white focus:shadow-md text-gray-700 font-bold rounded-full pl-12 pr-4 py-3" onkeyup="updateSearchResults(this.value);">
</div>
<!-- / Search-->
<!--Menu-->
<div class="flex relative inline-block pr-6">
<div class="relative text-sm">
<button id="userButton" class="flex items-center focus:outline-none mr-3">
<img class="w-8 h-8 rounded-full mr-4" src="http://i.pravatar.cc/300" alt="Avatar of User"> <span class="hidden md:inline-block">Hi, User </span>
<svg class="pl-2 h-2" version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 129 129" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 129 129">
<g>
<path d="m121.3,34.6c-1.6-1.6-4.2-1.6-5.8,0l-51,51.1-51.1-51.1c-1.6-1.6-4.2-1.6-5.8,0-1.6,1.6-1.6,4.2 0,5.8l53.9,53.9c0.8,0.8 1.8,1.2 2.9,1.2 1,0 2.1-0.4 2.9-1.2l53.9-53.9c1.7-1.6 1.7-4.2 0.1-5.8z"></path>
</g>
</svg>
</button>
<div id="userMenu" class="bg-white nunito rounded shadow-md mt-2 absolute mt-12 top-0 right-0 min-w-full overflow-auto z-30 invisible">
<ul class="list-reset">
<li><a href="#" class="px-4 py-2 block text-gray-900 hover:bg-indigo-400 hover:text-white no-underline hover:no-underline">My account</a></li>
<li><a href="#" class="px-4 py-2 block text-gray-900 hover:bg-indigo-400 hover:text-white no-underline hover:no-underline">Notifications</a></li>
<li>
<hr class="border-t mx-2 border-gray-400">
</li>
<li><a href="#" class="px-4 py-2 block text-gray-900 hover:bg-indigo-400 hover:text-white no-underline hover:no-underline">Logout</a></li>
</ul>
</div>
</div>
</div>
<!-- / Menu -->
</div>
</nav>
</div>
<!--Dash Content -->
<div id="dash-content" class="bg-gray-200 py-6 lg:py-0 w-full lg:max-w-sm flex flex-wrap content-start">
<div class="w-1/2 lg:w-full">
<div class="border-2 border-gray-400 border-dashed hover:border-transparent hover:bg-white hover:shadow-xl rounded p-6 m-2 md:mx-10 md:my-6">
<div class="flex flex-col items-center">
<div class="flex-shrink pr-4">
<div class="rounded-full p-3 bg-gray-300"><i class="fa fa-wallet fa-fw fa-inverse text-indigo-500"></i></div>
</div>
<div class="flex-1">
<h3 class="font-bold text-3xl">$3249 <span class="text-green-500"><i class="fas fa-caret-up"></i></span></h3>
<h5 class="font-bold text-gray-500">Total Revenue</h5>
</div>
</div>
</div>
</div>
<div class="w-1/2 lg:w-full">
<div class="border-2 border-gray-400 border-dashed hover:border-transparent hover:bg-white hover:shadow-xl rounded p-6 m-2 md:mx-10 md:my-6">
<div class="flex flex-col items-center">
<div class="flex-shrink pr-4">
<div class="rounded-full p-3 bg-gray-300"><i class="fas fa-users fa-fw fa-inverse text-indigo-500"></i></div>
</div>
<div class="flex-1">
<h3 class="font-bold text-3xl">249 <span class="text-orange-500"><i class="fas fa-exchange-alt"></i></span></h3>
<h5 class="font-bold text-gray-500">Total Users</h5>
</div>
</div>
</div>
</div>
<div class="w-1/2 lg:w-full">
<div class="border-2 border-gray-400 border-dashed hover:border-transparent hover:bg-white hover:shadow-xl rounded p-6 m-2 md:mx-10 md:my-6">
<div class="flex flex-col items-center">
<div class="flex-shrink pr-4">
<div class="rounded-full p-3 bg-gray-300"><i class="fas fa-user-plus fa-fw fa-inverse text-indigo-500"></i></div>
</div>
<div class="flex-1">
<h3 class="font-bold text-3xl">2 <span class="text-yellow-600"><i class="fas fa-caret-up"></i></span></h3>
<h5 class="font-bold text-gray-500">New Users</h5>
</div>
</div>
</div>
</div>
<div class="w-1/2 lg:w-full">
<div class="border-2 border-gray-400 border-dashed hover:border-transparent hover:bg-white hover:shadow-xl rounded p-6 m-2 md:mx-10 md:my-6">
<div class="flex flex-col items-center">
<div class="flex-shrink pr-4">
<div class="rounded-full p-3 bg-gray-300"><i class="fas fa-server fa-fw fa-inverse text-indigo-500"></i></div>
</div>
<div class="flex-1">
<h3 class="font-bold text-3xl">152 days</h3>
<h5 class="font-bold text-gray-500">Server Uptime</h5>
</div>
</div>
</div>
</div>
</div>
<!--Graph Content -->
<div id="main-content" class="w-full flex-1">
<div class="flex flex-1 flex-wrap">
<div class="w-full xl:w-2/3 p-6 xl:max-w-6xl">
<!--"Container" for the graphs"-->
<div class="max-w-full lg:max-w-3xl xl:max-w-5xl">
<!--Graph Card-->
<div class="border-b p-3">
<h5 class="font-bold text-black">Graph</h5>
</div>
<div class="p-5">
<div class="ct-chart ct-golden-section" id="chart1"></div>
</div>
<!--/Graph Card-->
<!--Table Card-->
<div class="p-3">
<div class="border-b p-3">
<h5 class="font-bold text-black">Table</h5>
</div>
<div class="p-5">
<table class="w-full p-5 text-gray-700">
<thead>
<tr>
<th class="text-left text-blue-900">Name</th>
<th class="text-left text-blue-900">Side</th>
<th class="text-left text-blue-900">Role</th>
</tr>
</thead>
<tbody>
<tr>
<td>Obi Wan Kenobi</td>
<td>Light</td>
<td>Jedi</td>
</tr>
<tr>
<td>Greedo</td>
<td>South</td>
<td>Scumbag</td>
</tr>
<tr>
<td>Darth Vader</td>
<td>Dark</td>
<td>Sith</td>
</tr>
</tbody>
</table>
<p class="py-2"><a href="#">See More issues...</a></p>
</div>
</div>
<!--/table Card-->
</div>
</div>
<div class="w-full xl:w-1/3 p-6 xl:max-w-4xl border-l-1 border-gray-300">
<!--"Container" for the graphs"-->
<div class="max-w-sm lg:max-w-3xl xl:max-w-5xl">
<!--Graph Card-->
<div class="border-b p-3">
<h5 class="font-bold text-black">Graph</h5>
</div>
<div class="p-5">
<div class="ct-chart ct-golden-section" id="chart2"></div>
</div>
<!--/Graph Card-->
<!--Graph Card-->
<div class="border-b p-3">
<h5 class="font-bold text-black">Graph</h5>
</div>
<div class="p-5">
<div class="ct-chart ct-golden-section" id="chart3"></div>
</div>
<!--/Graph Card-->
<!--Graph Card-->
<div class="border-b p-3">
<h5 class="font-bold text-black">Graph</h5>
</div>
<div class="p-5">
<div class="ct-chart ct-golden-section" id="chart4"></div>
</div>
<!--/Graph Card-->
<!--Template Card-->
<div class="p-3">
<div class="border-b p-3">
<h5 class="font-bold text-black">Template</h5>
</div>
<div class="p-5">
</div>
</div>
<!--/Template Card-->
</div>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/chartist.js/latest/chartist.min.js"></script>
<script>
/* Refer to https://gionkunz.github.io/chartist-js/examples.html for setting up the graphs */
var mainChart = new Chartist.Line('#chart1', {
labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
series: [
[1, 5, 2, 5, 4, 3],
[2, 3, 4, 8, 1, 2],
[5, 4, 3, 2, 1, 0.5]
]
}, {
low: 0,
showArea: true,
showPoint: false,
fullWidth: true
});
mainChart.on('draw', function(data) {
if (data.type === 'line' || data.type === 'area') {
data.element.animate({
d: {
begin: 1000 * data.index,
dur: 1000,
from: data.path.clone().scale(1, 0).translate(0, data.chartRect.height()).stringify(),
to: data.path.clone().stringify(),
easing: Chartist.Svg.Easing.easeOutQuint
}
});
}
});
var chartScatter = new Chartist.Line('#chart2', {
labels: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
series: [
[12, 9, 7, 8, 5, 4, 6, 2, 3, 3, 4, 6],
[4, 5, 3, 7, 3, 5, 5, 3, 4, 4, 5, 5],
[5, 3, 4, 5, 6, 3, 3, 4, 5, 6, 3, 4],
[3, 4, 5, 6, 7, 6, 4, 5, 6, 7, 6, 3]
]
}, {
low: 0
});
chartScatter.on('draw', function(data) {
if (data.type === 'line' || data.type === 'area') {
data.element.animate({
d: {
begin: 500 * data.index,
dur: 1000,
from: data.path.clone().scale(1, 0).translate(0, data.chartRect.height()).stringify(),
to: data.path.clone().stringify(),
easing: Chartist.Svg.Easing.easeOutQuint
}
});
}
});
var chartBar = new Chartist.Bar('#chart3', {
labels: ['Q1', 'Q2', 'Q3', 'Q4'],
series: [
[800000, 1200000, 1400000, 1300000],
[200000, 400000, 500000, 300000],
[100000, 200000, 400000, 600000]
]
}, {
stackBars: true,
axisY: {
labelInterpolationFnc: function(value) {
return (value / 1000) + 'k';
}
}
})
chartBar.on('draw', function(data) {
if (data.type === 'bar') {
data.element.attr({
style: 'stroke-width: 30px'
}),
data.element.animate({
y2: {
dur: '0.5s',
from: data.y1,
to: data.y2
}
});
}
});
var chartPie = new Chartist.Pie('#chart4', {
series: [10, 20, 50, 20, 5, 50, 15],
labels: [1, 2, 3, 4, 5, 6, 7]
}, {
donut: true,
showLabel: true
});
chartPie.on('draw', function(data) {
if (data.type === 'slice') {
var pathLength = data.element._node.getTotalLength();
data.element.attr({
'stroke-dasharray': pathLength + 'px ' + pathLength + 'px'
});
var animationDefinition = {
'stroke-dashoffset': {
id: 'anim' + data.index,
dur: 200,
from: -pathLength + 'px',
to: '0px',
easing: Chartist.Svg.Easing.easeOutQuint,
fill: 'freeze'
}
};
if (data.index !== 0) {
animationDefinition['stroke-dashoffset'].begin = 'anim' + (data.index - 1) + '.end';
}
data.element.attr({
'stroke-dashoffset': -pathLength + 'px'
});
data.element.animate(animationDefinition, false);
}
});
</script>
<script>
/*Toggle dropdown list*/
/*https://gist.github.com/slavapas/593e8e50cf4cc16ac972afcbad4f70c8*/
var userMenuDiv = document.getElementById("userMenu");
var userMenu = document.getElementById("userButton");
document.onclick = check;
function check(e) {
var target = (e && e.target) || (event && event.srcElement);
//User Menu
if (!checkParent(target, userMenuDiv)) {
// click NOT on the menu
if (checkParent(target, userMenu)) {
// click on the link
if (userMenuDiv.classList.contains("invisible")) {
userMenuDiv.classList.remove("invisible");
} else {
userMenuDiv.classList.add("invisible");
}
} else {
// click both outside link and outside menu, hide menu
userMenuDiv.classList.add("invisible");
}
}
}
function checkParent(t, elm) {
while (t.parentNode) {
if (t == elm) {
return true;
}
t = t.parentNode;
}
return false;
}
</script>
</body>
</html>