-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli.html
More file actions
539 lines (469 loc) · 15.4 KB
/
Copy pathcli.html
File metadata and controls
539 lines (469 loc) · 15.4 KB
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
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>设备资产中心 - 终端模式</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.12.2/lottie.min.js"></script>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
/* 深邃的黑底,带有极暗的绿色调 */
background: #020806;
color: #39C5BB;
/* 强制等宽字体,经典终端感 */
font-family: "Courier New", Courier, monospace;
padding: 24px;
overflow-x: hidden;
text-shadow: 0 0 4px rgba(57, 197, 187, 0.5); /* CRT 荧光溢出效应 */
}
/* 强化的 CRT 扫描线 */
body::before {
content: "";
position: fixed;
inset: 0;
pointer-events: none;
background: linear-gradient(
rgba(18, 16, 16, 0) 50%,
rgba(0, 0, 0, 0.25) 50%),
linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
background-size: 100% 4px, 3px 100%;
z-index: 999;
opacity: 0.6;
}
/* 屏幕轻微闪烁动画 */
body::after {
content: "";
position: fixed;
inset: 0;
pointer-events: none;
background: rgba(57, 197, 187, 0.02);
animation: flicker 0.15s infinite;
z-index: 998;
}
@keyframes flicker {
0% { opacity: 0.9; }
100% { opacity: 1; }
}
/* 标题:加上括号模拟纯文本 UI */
.header {
text-align: left;
margin-bottom: 24px;
border-bottom: 2px dashed #39C5BB;
padding-bottom: 10px;
}
h1 {
font-size: 28px;
text-transform: uppercase;
}
h1::before { content: "SYS.INIT_> "; }
#time {
margin-top: 8px;
color: #237A74;
font-size: 14px;
}
/* 统一的 Dashboard 顶部面板 */
.dashboard-top {
display: grid;
grid-template-columns: 2fr 1fr 1fr 1fr;
gap: 16px;
margin-bottom: 24px;
}
.dash-card {
background: #000;
border: 1px solid #39C5BB;
padding: 20px 24px;
display: flex;
flex-direction: column;
justify-content: center;
position: relative;
/* 移除平滑过渡,恢复生硬感 */
transition: none;
}
/* 悬浮时色彩反转,老式光标效果 */
.dash-card:hover {
background: #39C5BB;
color: #000;
text-shadow: none;
}
.dash-card:hover .label,
.dash-card:hover .value,
.dash-card:hover .coreTitle,
.dash-card:hover .support-card .title {
color: #000;
}
/* 核心枢纽专属样式 */
.core-card {
border: 2px solid #39C5BB;
box-shadow: inset 0 0 15px rgba(57, 197, 187, 0.2);
}
.dash-card .label {
font-size: 12px;
color: #237A74;
margin-bottom: 8px;
text-transform: uppercase;
}
.dash-card .label::before { content: "[ "; }
.dash-card .label::after { content: " ]"; }
.dash-card .value {
font-size: 36px;
font-weight: bold;
color: #39C5BB;
line-height: 1.2;
}
.core-card .coreTitle {
font-size: 18px;
font-weight: bold;
color: #39C5BB;
margin-bottom: 6px;
text-transform: uppercase;
}
/* Lottie 动画容器 - 强制单色绿化滤镜 */
#lottie-core {
position: absolute;
right: 24px;
top: 50%;
transform: translateY(-50%);
width: 80px;
height: 80px;
pointer-events: none;
/* 通过滤镜将原本的彩色 fufu 变成老旧终端的单色荧光绿 */
filter: sepia(1) hue-rotate(125deg) saturate(300%) brightness(0.8) contrast(1.5) drop-shadow(0 0 5px #39C5BB);
}
/* 独立处理保障组织的字号结构 */
.support-card .title {
font-size: 14px;
font-weight: bold;
color: #39C5BB;
margin-bottom: 8px;
}
.support-card .value {
font-size: 14px;
}
/* 设备网格 */
.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
gap: 16px;
}
.card {
background: #000;
padding: 20px;
border: 1px solid #237A74;
transition: none; /* 去除动画 */
}
.card:hover {
border: 1px solid #39C5BB;
background: #39C5BB;
color: #000;
text-shadow: none;
}
.card:hover .status,
.card:hover .type,
.card:hover .days,
.card:hover .runtime,
.card:hover .date,
.card:hover .childType,
.card:hover .childDay,
.card:hover .dot {
color: #000 !important;
border-color: #000;
background: transparent;
box-shadow: none;
}
.top {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
border-bottom: 1px solid #237A74;
padding-bottom: 5px;
}
.card:hover .top {
border-bottom-color: #000;
}
.status {
display: flex;
align-items: center;
gap: 6px;
font-size: 12px;
text-transform: uppercase;
color: #39C5BB;
}
/* 方形状态灯 */
.dot {
width: 8px;
height: 8px;
border: 1px solid #39C5BB;
}
.green {
background: #39C5BB;
}
.gray {
background: transparent;
border-color: #237A74;
}
.type {
font-size: 12px;
color: #237A74;
}
.name {
font-size: 20px;
font-weight: bold;
margin-bottom: 12px;
margin-top: 10px;
}
.name::before { content: "> "; }
.days {
font-size: 40px;
font-weight: bold;
color: #39C5BB;
display: block;
}
.runtime {
font-size: 14px;
color: #237A74;
margin-top: 5px;
}
.date {
font-size: 12px;
margin-top: 16px;
line-height: 1.5;
color: #237A74;
}
/* 子设备 */
.childBox {
margin-top: 15px;
padding-top: 12px;
border-top: 1px dashed #237A74;
}
.card:hover .childBox { border-top-color: #000; }
.child {
padding: 5px 0;
margin-top: 4px;
display: flex;
justify-content: space-between;
align-items: center;
}
.child::before {
content: "+-- ";
color: inherit;
}
.childType {
font-size: 12px;
color: #237A74;
display: none; /* 简化显示 */
}
.childName {
font-size: 14px;
flex-grow: 1;
margin-left: 5px;
}
.childDay {
font-size: 12px;
color: #237A74;
}
/* 页脚 */
.footer {
text-align: center;
margin-top: 30px;
color: #237A74;
font-size: 12px;
border-top: 2px dashed #237A74;
padding-top: 10px;
}
.footer::after {
content: " _";
animation: blink 1s step-end infinite;
}
@keyframes blink {
50% { opacity: 0; }
}
/* 响应式 */
@media(max-width: 1100px) {
.dashboard-top { grid-template-columns: 1fr 1fr; }
.core-card { grid-column: span 2; }
}
@media(max-width: 600px) {
.dashboard-top { grid-template-columns: 1fr; }
.core-card { grid-column: span 1; }
#lottie-core { opacity: 0.2; }
}
</style>
</head>
<body>
<div class="header">
<h1>设备资产中心</h1>
<div id="time"></div>
</div>
<div class="dashboard-top">
<div class="dash-card core-card">
<div class="label">主控节点系统</div>
<div class="coreTitle">生物认知推理与中央运算枢纽</div>
<div class="value" id="coreRuntime"></div>
<div id="lottie-core"></div>
</div>
<div class="dash-card support-card">
<div class="label">保障组织</div>
<div class="title">下属运行保障组织</div>
<div class="value" id="humanDays"></div>
</div>
<div class="dash-card">
<div class="label">在编设备总数</div>
<div class="value" id="count"></div>
</div>
<div class="dash-card">
<div class="label">系统平均服役时间</div>
<div class="value" id="avg"></div>
</div>
</div>
<div id="board" class="grid"></div>
<div class="footer">
Personal Digital Infrastructure Runtime Center
</div>
<script>
// 初始化 Lottie 动画
lottie.loadAnimation({
container: document.getElementById('lottie-core'),
renderer: 'svg',
loop: true,
autoplay: true,
path: 'fufu.json'
});
const devices = [
{
type: "工作站",
name: "x86兼容平台工作站",
start: "2025-07-11",
children: [
{ type: "SSD", name: "Samsung 990 EVO Plus 1TB", start: "2025-07-11" },
{ type: "HDD", name: "WDC WD40EFPX-68C6CN0", start: "2025-01-11" }
]
},
{
type: "移动工作站",
name: "Blade Stealth 13 Shift Late 2019",
start: "2019-09-10",
children: [
{ type: "SSD", name: "LITEON CA5-8D512 512GB", start: "2019-09-10" }
]
},
{
type: "移动工作终端",
name: "iPad Air 2013",
start: "2019-03-01",
end: "2026-03-29"
},
{
type: "移动工作终端",
name: "iPad Pro(M5) 2025",
start: "2026-03-29"
},
{
type: "移动工作终端",
name: "HUAWEI P60",
start: "2023-07-20",
end: "2025-09-07"
},
{
type: "移动工作终端",
name: "vivo X200s",
start: "2025-09-07"
},
{
type: "拍摄设备",
name: "DJI ACTION 5 PRO",
start: "2025-05-28",
children: [
{ type: "MicroSD", name: "SanDisk Extreme QXA1 512GB", start: "2025-05-28" }
]
},
{
type: "移动高速存储",
name: "ROG STRIX Arion feat. Miku",
start: "2025-10-22",
children: [
{ type: "SSD", name: "Samsung 990 EVO Plus 2TB", start: "2025-10-22" }
]
}
];
const coreStart = new Date("2010-11-19");
function calc(device) {
const now = new Date();
const start = new Date(device.start);
const end = device.end ? new Date(device.end) : now;
const realEnd = end < now ? end : now;
let days = Math.floor((realEnd - start) / 86400000);
if (days < 0) days = 0;
const y = Math.floor(days / 365);
const m = Math.floor((days % 365) / 30);
const d = (days % 365) % 30;
return {
days,
runtime: `${y}Y ${m}M ${d}D`, // 改为短写,更符合终端感
active: now >= start && (!device.end || now < new Date(device.end))
};
}
function updateCore(total) {
const now = new Date();
const days = Math.floor((now - coreStart) / 86400000);
document.getElementById("coreRuntime").innerText = days + " DAYS";
document.getElementById("humanDays").innerText = "UPTIME: " + days + " D";
}
function render() {
let total = 0;
const board = document.getElementById("board");
board.innerHTML = "";
devices.forEach(device => {
const data = calc(device);
total += data.days;
board.innerHTML += `
<div class="card">
<div class="top">
<div class="status">
<div class="dot ${data.active ? "green" : "gray"}"></div>
${data.active ? "ONLINE" : "OFFLINE"}
</div>
<div class="type">[${device.type}]</div>
</div>
<div class="name">${device.name}</div>
<div class="days">${data.days} D</div>
<div class="runtime">RUNTIME: ${data.runtime}</div>
<div class="date">
INIT: ${device.start}
${device.end ? `<br>TERM: ${device.end}` : ""}
</div>
${device.children ? `
<div class="childBox">
${device.children.map(x => {
const c = calc(x);
return `
<div class="child">
<div class="childName">${x.name}</div>
<div class="childDay">${c.days} D</div>
</div>
`;
}).join("")}
</div>
` : ""}
</div>
`;
});
document.getElementById("count").innerText = devices.length;
document.getElementById("avg").innerText = Math.floor(total / devices.length) + " DAYS";
updateCore(total);
}
function clock() {
// 时间显示加入毫秒级闪烁感
document.getElementById("time").innerText = "SYS.TIME: " + new Date().toLocaleString("zh-CN", { hour12: false });
}
render();
clock();
setInterval(clock, 1000);
</script>
</body>
</html>