-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
328 lines (275 loc) · 10.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
<!DOCTYPE html>
<html lang="zh-TW">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>首頁-後台管理-六角西餐廳</title>
<link rel="stylesheet" href="./scss/all.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
</head>
<body class="vsc-initialized ">
<div class="d-flex">
<!--側欄選單-->
<aside class="sidebar vh-100 border-end pt-3 d-flex flex-column bg-white ">
<!-- 1. 後台名稱 -->
<div class="px-4">
<strong>六角西餐廳</strong>
- 後台管理
</div>
<!-- 2. 選單 -->
<div class="overflow-auto mt-3">
<!-- 首頁-不包含子選單 -->
<div>
<a class="sidebar-link active" href="index.html" role="button">
<div class="px-4">
<i class="bi bi-house me-2"></i> 首頁
</div>
</a>
</div>
<!-- 訂單管理-包含子選項 "collapse"-->
<div>
<a class="sidebar-link" data-bs-toggle="collapse" href="#menu-order" role="button" >
<div class="d-flex justify-content-between px-4">
<p class="mb-0">
<i class="bi bi-card-checklist me-2"></i>訂單管理
</p>
<i class="bi bi-caret-down"></i>
</div>
</a>
<div class="collapse show" id="menu-order" >
<a href="orders.html" class="d-block ps-5 text-dark text-decoration-none sidebar-link" role="button">
訂單列表
</a>
<a href="order.html" class="d-block ps-5 text-dark text-decoration-none sidebar-link" role="button">
單一訂單細節
</a>
</div>
</div>
<!-- 參考連結-不包含子選單 -->
<div>
<a class="sidebar-link" href="index.html" role="button">
<div class="px-4">
<i class="bi bi-list-stars me-2"></i> 參考連結
</div>
</a>
</div>
</div>
<!-- 3. 登出按鈕 -->
<a href="#" class="mt-auto sidebar-link ">
<div class="px-4">
<i class="bi bi-box-arrow-in-right me-2"></i>登出
</div>
</a>
</aside>
<!--主要區塊-->
<main class="main">
<!-- 側欄收合按鈕 -->
<div class="bg-white border-bottom sticky-top w-100">
<a href="#"
class="d-inline-block py-3 px-4 border-end" id="toggle-btn">
<i class="bi bi-arrows-angle-expand"></i>
</a>
</div>
<!-- 主要內容 -->
<!-- 在線人數、訂單數、營業額-->
<div class="p-4">
<div class="row g-4 row-cols-lg-3 mb-4 d-flex">
<div class="col ">
<div class="card shadow-sm h-100">
<div class="card-body text-end ">
<h2 class="display-6 text-nowrap">在線人數</h2>
<p class="display-4 mb-0">3,123</p>
</div>
</div>
</div>
<div class="col ">
<div class="card shadow-sm h-100">
<div class="card-body text-end">
<h2 class="display-6 text-nowrap">訂單數</h2>
<p class="display-4 mb-0 ">1,092</p>
</div>
</div>
</div>
<div class="col">
<div class="card shadow-sm h-100">
<div class="card-body text-end">
<h2 class="display-6 text-nowrap">營業額</h2>
<p class="mb-0 text-success text-nowrap">
<span class="fs-3">NT$</span>
<span class="display-4">204,432</span>
</p>
</div>
</div>
</div>
</div>
<!--圖表部分-->
<div class="row g-4 mb-4">
<div class="col-lg-4">
<div class="card shadow-sm h-100">
<div class="card-body">
<canvas id="pie-chart" class="img-fluid"></canvas>
</div>
</div>
</div>
<div class="col">
<div class="card shadow-sm h-100">
<div class="card-body">
<canvas id="bar-chart" class="img-fluid "></canvas>
</div>
</div>
</div>
</div>
<!-- 圖表部分的javascript程式碼 -->
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
(() => {
const chartColors = {
red: 'rgb(255, 99, 132)',
orange: 'rgb(255, 159, 64)',
yellow: 'rgb(255, 205, 86)',
green: 'rgb(75, 192, 192)',
blue: 'rgb(54, 162, 235)',
purple: 'rgb(153, 102, 255)',
grey: 'rgb(201, 203, 207)'
};
var randomScalingFactor = function () {
return Math.round(Math.random() * 2000000);
};
const pieCtx = document.getElementById('pie-chart').getContext('2d');
const barCtx = document.getElementById('bar-chart').getContext('2d');
const config = {
type: 'pie',
data: {
datasets: [{
data: [
randomScalingFactor(),
randomScalingFactor(),
randomScalingFactor(),
randomScalingFactor(),
randomScalingFactor(),
randomScalingFactor(),
],
backgroundColor: [
chartColors.red,
chartColors.orange,
chartColors.yellow,
chartColors.green,
chartColors.blue,
],
label: 'Dataset 1'
}],
labels: [
'大麥克全餐',
'肥宅快樂水',
'太爽啦義大利麵',
'薯條加大吃不完',
'兒童餐椅不給坐',
]
},
options: {
responsive: true
}
};
const barConfig = {
type: 'bar',
data: {
datasets: [{
data: [
randomScalingFactor(),
randomScalingFactor(),
randomScalingFactor(),
randomScalingFactor(),
randomScalingFactor(),
randomScalingFactor(),
],
backgroundColor: [
chartColors.red,
chartColors.orange,
chartColors.yellow,
chartColors.green,
chartColors.blue,
chartColors.purple,
],
label: 'Dataset 1'
}],
labels: [
'一月',
'二月',
'三月',
'四月',
'五月',
'六月',
]
},
options: {
responsive: true
}
};
const pieChart = new Chart(pieCtx, config);
const barChart = new Chart(barCtx, barConfig);
})();
</script>
<!--小表格部分-->
<div class="card shadow-sm">
<!-- 搜尋 -->
<div class="card-header bg-transparent">
<div class="input-group">
<span class="input-group-text border-0 bg-transparent pe-0">
<i class="bi bi-search"></i>
</span>
<input type="search" class="form-control border-0 shadow-none" placeholder="Search">
</div>
</div>
<!-- 表格運用 -->
<div class="card-body p-0">
<div class="table-responsive" >
<table class="table table-hover mb-0">
<thead class="table-light" >
<tr class="align-middle">
<th scope="col" class="py-3 ps-4">訂單編號</th>
<th scope="col">Email</th>
<th scope="col">用戶姓名</th>
<th scope="col">購買品項</th>
<th scope="col">付款狀態</th>
<th scope="col">購買金額</th>
<th scope="col" class="pe-4">編輯</th>
</tr>
</thead>
<tbody class="text-nowrap">
<tr>
<td scope="row" class="ps-4">TX123456789</td>
<td >[email protected]</td>
<td>卡小伯</td>
<td>六角西餐:大麥克全家餐</td>
<td><div class="text-muted">尚未付款</div></td>
<td class="text-end">900</td>
<td class="text-end pe-4">
<a href="#" class="btn btn-sm btn-outline-dark me-2">
編輯 <i class="bi bi-pen"></i>
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- 表尾-分頁器 -->
<div class="card-footer bg-transparent py-3">
<nav aria-label="Page navigation example">
<ul class="pagination justify-content-end mb-0">
<li class="page-item"><a class="page-link" href="#">Previous</a></li>
<li class="page-item"><a class="page-link" href="#">1</a></li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item"><a class="page-link" href="#">Next</a></li>
</ul>
</nav>
</div>
</div>
</div>
</main>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" crossorigin="anonymous"></script>
<script src="./javascripts/all.js"></script>
</body>
</html>