-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdashboard_ch10.html
416 lines (388 loc) · 19 KB
/
dashboard_ch10.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
<!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>DashBoard Chapter 9 Bootstrap</title>
<!-- Bootstrap 4 CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<!-- Фонт Awesome -->
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"
integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<!-- Плагин Switchery -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/switchery/0.8.2/switchery.min.css"
integrity="sha256-2kJr1Z0C1y5z0jnhr/mCu46J3R6Uud+qCQHA39i1eYo=" crossorigin="anonymous" />
<link rel="stylesheet" href="CSS/base_ch10.css">
</head>
<body>
<!-- Блок скрытия загрузки страницы -->
<div class="loading">
</div>
<!-- Навигационная панель -->
<!-- В B4 используется класс .sticky-top вместо .navbar-fixed-top для фиксации навпанели вверху экрана -->
<nav class="navbar sticky-top navbar-expand-sm navbar-light bg-light">
<!-- В B-4 не нужно помещать содержимое navbar в контейнер -->
<div class="col-sm-3 top-left-menu d-flex">
<!-- Класс .navbar-header в B3 это просто плавающий блок float: left -->
<!-- В B4 убрать ??? -->
<!-- <div class="navbar-header"> -->
<a href="#" class="navbar-brand">
<h1>dashboard</h1>
</a>
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#nav-menu"
aria-controls="nav-menu" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<!-- Значок Refresh - обновление в навигации -->
<a href="#" class="header-buttons ml-auto btn btn-link" role="button"
data-toggle="tooltip" data-placement="bottom" data-delay="500" title="Refresh data">
<!-- B-4 рекомендует использовать span вместо i в font-awesome -->
<span class="fa fa-repeat"></span>
</a>
<!-- Значок поиска в навигации для малых экранов -->
<!-- Порядок вывода изменен, т.к. значок поиска появляется только на малых экранах -->
<a href="#" id="search-icon" class="header-buttons ml-3 btn btn-link d-sm-none"
title="Display search bar" data-toggle="tooltip" data-placement="bottom" data-delay="500">
<span class="fa fa-search" aria-hidden="true"></span>
</a>
</div>
<!-- Нельзя использовать d-none, т.к. оно с !important -->
<form id="search" class="col-sm-3 d-sm-block" role="search">
<!-- Псевдокласс CSS :focus-within меняет стиль родительского элемента, если внутри него какой-либо элемент получает фокус -->
<!-- Только новые браузеры !!! -->
<div class="input-group transition">
<div class="input-group-prepend">
<!-- Для центрирования нужно убрать display: inline-block, который находиться в классе .fa ,
и вернуть display: flex , который был в классе .input-group-text -->
<span class="fa fa-search input-group-text d-flex" aria-hidden="true" id="search-addon1"></span>
</div>
<input type="text" class="form-control transition" placeholder="Search..." id="input-search"
aria-label="Search" aria-describedby="search-addon1">
</div>
</form>
<div id="nav-menu" class="collapse navbar-collapse justify-content-end">
<ul class="nav navbar-nav">
<li class="nav-item">
<div id="btn-notifications" class="btn-group d-flex flex-wrap">
<button type="button" class="btn btn-link dropdown-toggle caret-off align-self-start"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span>Notifications</span>
</button>
<span class="badge badge-pill badge-danger align-self-start">3</span>
<!-- Класс .dropdown-menu-right - меню расположено справа, т.е. выпадение левее -->
<ul id="notification-list" class="dropdown-menu dropdown-menu-right">
<li>
<a href="#">
<span class="badge badge-pill badge-danger"></span>
<img src="imgs/laika.jpg" alt="" class="rounded-circle">
<div class="notification-message">
<strong>Laika</strong>
<p>Hey! How are you?</p>
<em class="since">2h ago</em>
</div>
</a>
</li>
<li>
<a href="#">
<span class="badge badge-pill badge-danger"></span>
<img src="imgs/cat.jpg" alt="" class="rounded-circle">
<div class="notification-message">
<strong>Devil cat</strong>
<p>I will never forgive you...</p>
<em class="since">6h ago</em>
</div>
</a>
</li>
<li>
<a href="#">
<span class="badge badge-pill badge-danger"></span>
<img src="imgs/doge.jpg" alt="" class="rounded-circle">
<div class="notification-message">
<strong>Doge</strong>
<p>What are you doing? So scare. It's alright now.</p>
<em class="since">yesterday</em>
</div>
</a>
</li>
</ul>
</div>
</li>
</ul>
<div id="nav-profile" class="btn-group d-flex">
<button type="button" class="btn btn-link dropdown-toggle caret-off d-none d-sm-block"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img src="imgs/jon.png" alt="Jon" class="img-thumbnail rounded-circle">
</button>
<ul class="dropdown-menu dropdown-menu-right">
<li>
<a href="#" class="transition">Profile</a>
</li>
<li>
<a href="#" class="transition">Settings</a>
</li>
<li class="dropdown-divider"></li>
<li>
<a href="#" class="transition">Logout</a>
</li>
</ul>
<!-- Для сверхмалых экранов -->
<!-- Дополнительно проще добавить сюда и ссылки бокового меню -->
<ul class="d-sm-none nav navbar-nav">
<li>
<a href="#" class="transition">Audience</a>
</li>
<li>
<a href="#" class="transition">Finances</a>
</li>
<li>
<a href="#" class="transition">Realtime</a>
</li>
<li>
<a href="#" class="transition">Projects</a>
</li>
<li class="dropdown-divider"></li>
<li>
<a href="#" class="transition">Profile</a>
</li>
<li>
<a href="#" class="transition">Settings</a>
</li>
<li>
<a href="#" class="transition">Logout</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- Основной раздел -->
<div class="container-fluid">
<div class="row">
<div id="side-menu" class="col-sm-3 d-none d-sm-block">
<div class="leftside-block">
<div class="profile-block">
<img src="imgs/jon.png" alt="Jon" class="rounded-circle">
<h4 class="profile-title">Jonny Doo <small>@jonnydoo</small></h4>
</div>
<ul class="nav nav-pills flex-column">
<li class="nav-item">
<a href="#" class="nav-link transition">
<span class="fa fa-home fa-fw" aria-hidden="true"></span>
Overview
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link transition">
<span class="fa fa-user fa-fw" aria-hidden="true"></span>
Audience
</a>
</li>
<li class="nav-item">
<a href="#finances-opts" class="nav-link transition" role="button"
data-toggle="collapse" aria-expanded="false" aria-controls="finances-opts">
<span class="fa fa-usd fa-fw" aria-hidden="true"></span>
Finances
<span class="fa fa-chevron-right transition pull-right" aria-hidden="true"></span>
</a>
<ul class="collapse list-unstyled" id="finances-opts">
<li>
<a href="#" class="transition">Incomes</a>
</li>
<li>
<a href="#" class="transition">Outcomes</a>
</li>
</ul>
</li>
<li class="nav-item">
<a href="#" class="nav-link transition">
<span class="fa fa-clock-o fa-flip-horizontal fa-fw" aria-hidden="true"></span>
Real time
<span class="badge badge-pill badge-success pull-right">12</span>
</a>
</li>
<li class="dropdown-divider"></li>
<li class="nav-item">
<a href="#projects-opts" class="nav-link transition" role="button"
data-toggle="collapse" aria-expanded="false" aria-controls="projects-opts">
<span class="fa fa-briefcase fa-fw" aria-hidden="true"></span>
Projects
<span class="fa fa-chevron-right transition pull-right" aria-hidden="true"></span>
</a>
<ul id="projects-opts" class="collapse list-unstyled">
<li>
<a href="#" class="transition">
Free ration nation
</a>
</li>
<li>
<a href="#" class="transition">
Cats going crazy
</a>
</li>
</ul>
</li>
</ul>
</div>
</div> <!-- end of #side-menu -->
<div id="main" class="col-sm-9">
<!-- Дополнительный div для выравнивания flex-элементов .card при растягивании левого меню #side-menu -->
<div id="main-block">
<!-- Модуль Easy Pie Chart -->
<div id="pie-charts" class="card">
<div class="card-block">
<h2>Overall analysis</h2>
<div class="round-chart" data-percent="42">
<span>
42
<small>
% <br>
recurring
</small>
</span>
</div>
<div class="round-chart" data-percent="87">
<span>
87
<small>
% <br>
aware
</small>
</span>
</div>
</div>
</div>
<div id="quick-info" class="card">
<div class="card-block">
<h2>Quick stats</h2>
<div class="quick-stats">
<strong>Today:</strong>
<span>78</span>
</div>
<div class="quick-stats">
<strong>This month:</strong>
<span>459</span>
</div>
<div class="quick-stats">
<strong>Bounce rate:</strong>
<span>81.08%</span>
</div>
<div class="quick-stats">
<strong>Session duration:</strong>
<span>00:01:41</span>
</div>
<div class="quick-stats">
<strong>New session:</strong>
<span>63.86%</span>
</div>
</div> <!-- end of .card-block -->
</div> <!-- end of #quick-info -->
<!-- Радиальная диаграмма Highcharts -->
<div id="performance-eval" class="card">
<div class="card-block">
<h2>Performance evaluation</h2>
<div class="spider-chart"></div>
</div>
</div>
<!-- Линейная диаграмма и флажки switchery -->
<div id="ration-stock" class="card">
<div class="card-block">
<h2>Ration stock info</h2>
<div class="stacked-area"></div>
<div class="switch">
View main stocks
<input type="checkbox" class="switchery" checked>
<div class="clearfix"></div>
</div>
<div class="switch">
Hide empty stocks
<input type="checkbox" class="switchery">
<div class="clearfix"></div>
</div>
</div>
</div>
<!-- Карточка с информацией в режиме реального времени -->
<div id="real-time" class="card">
<div class="card-block">
<h2>Real time information</h2>
<ul class="list-unstyled">
<li>
Active doge:
<span class="badge badge-warning pull-right">255</span>
</li>
<li>
Silo status:
<span class="badge badge-pill ok pull-right">
<span class="fa fa-check" aria-hidden="true"></span>
</span>
</li>
<li>
Usage level:
<div class="progress">
<!-- Цвета .progress-bar-success заменены на .bg-success -->
<div class="progress-bar bg-success" role="progressbar"
aria-valuenow="25" aria-valuemin="0" aria-valuemax="100" style="width: 25%">
<span class="sr-only">25%</span>
</div>
<!-- Анимация .active заменена на .progress-bar-animated -->
<div class="progress-bar bg-warning progress-bar-striped progress-bar-animated" role="progressbar"
aria-valuenow="38" aria-valuemin="0" aria-valuemax="100" style="width: 38%">
<span class="sr-only">38% alocated</span>
</div>
<div class="progress-bar bg-danger" role="progressbar"
aria-valuenow="5" aria-valuemin="0" aria-valuemax="100" style="width: 5%">
<span class="sr-only">5% reserved</span>
</div>
</div>
</li>
<li>
Free space:
<span id="free-space" class="pull-right"> 32%</span>
</li>
</ul>
</div>
</div>
<!-- Круговая диаграмма Highcharts -->
<div id="daily-usage" class="card">
<div class="card-block">
<h2>Daily usage</h2>
<div class="area-chart"></div>
</div>
</div>
</div> <!-- end of .main-block -->
</div> <!-- end of #main -->
</div> <!-- end of .row основного раздела-->
</div> <!-- end of .container-fluid основного раздела -->
<!-- ------------------------------- Скрипты ------------------------------- -->
<!-- jQuery -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous">
</script>
<!-- Модальные панели и всплывающие подсказки -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous">
</script>
<!-- Скрипты Bootstrap 4 -->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous">
</script>
<!-- Круговые диаграммы Easy Pie Chart -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/easy-pie-chart/2.1.6/jquery.easypiechart.min.js"
integrity="sha256-stt+EnBNy0H+ealqfrCPgW4loW3U+pe7JuZhh4ngy4o=" crossorigin="anonymous"></script>
<!-- Радиальные диаграммы Highcharts -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/highcharts/7.2.0/highcharts.js"
integrity="sha256-pWlJ6y5bcww1f1YFl+ak3DjzWUFtLTiy1u1amuLuSfA=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highcharts/7.2.0/highcharts-more.js"
integrity="sha256-OwtUS01uzj8BVU3iLGBwTLx6kE8+s0o/89Ce/nZMfKg=" crossorigin="anonymous"></script>
<!-- Плагин Swichery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/switchery/0.8.2/switchery.min.js"
integrity="sha256-CgrKEb54KXipsoTitWV+7z/CVYrQ0ZagFB3JOvq2yjo=" crossorigin="anonymous"></script>
<!-- Скрипт Font Awesome -->
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/js/all.js"
integrity="sha256-2JRzNxMJiS0aHOJjG+liqsEOuBb6++9cY4dSOyiijX4=" crossorigin="anonymous"></script> -->
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/js/fontawesome.js"
integrity="sha256-CfCEIeLBlKY5VZMluECsaKs5O74E/lSeRag1WJe1Pzs=" crossorigin="anonymous"></script> -->
<!-- Рабочий скрипт -->
<script src="JS/main_dashboard_ch10.js"></script>
</body>
</html>