-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocumentation.html
More file actions
726 lines (622 loc) · 23.3 KB
/
Copy pathdocumentation.html
File metadata and controls
726 lines (622 loc) · 23.3 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
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
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ColorFulCraft | 技术文档中心</title>
<link rel="icon" href="pictures/favicon.ico">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css">
<style>
:root {
--pink: #e84f9b;
--blue: #1d9fd7;
--green: #4f9a35;
--purple: #8b5cf6;
--ink: #28324a;
--muted: #6b7280;
--panel: rgba(255, 252, 245, 0.88);
--panel-strong: rgba(255, 255, 255, 0.96);
--sidebar-bg: rgba(255, 252, 245, 0.92);
--border-color: rgba(40, 50, 74, 0.14);
--code-bg: rgba(244, 239, 255, 0.78);
--shadow: rgba(85, 54, 120, 0.18);
--pixel-shadow: 0 8px 0 rgba(82, 57, 107, 0.16), 0 18px 42px rgba(87, 66, 126, 0.20);
--radius: 24px;
--theme-color: var(--pink);
--primary-color: var(--pink);
--secondary-color: var(--blue);
--text-color: var(--ink);
}
.dark-mode {
--ink: #f7f1ff;
--muted: #c9c3df;
--panel: rgba(31, 28, 54, 0.86);
--panel-strong: rgba(39, 35, 68, 0.96);
--sidebar-bg: rgba(30, 28, 52, 0.94);
--border-color: rgba(255, 255, 255, 0.16);
--code-bg: rgba(18, 18, 35, 0.74);
--shadow: rgba(0, 0, 0, 0.34);
--text-color: var(--ink);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body, #app { min-height: 100%; }
body {
min-height: 100vh;
font-family: "Nunito", "M PLUS Rounded 1c", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
color: var(--text-color);
background: #fff4cf;
overflow-x: hidden;
transition: background 0.35s ease, color 0.35s ease;
}
body::before,
body::after {
content: '';
position: fixed;
left: 0;
width: 100%;
pointer-events: none;
}
body::before {
inset: 0;
z-index: -3;
background-image:
linear-gradient(rgba(255,255,255,0.34) 1px, transparent 1px),
linear-gradient(90deg, rgba(255,255,255,0.34) 1px, transparent 1px);
background-size: 34px 34px;
mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent 76%);
}
body::after {
bottom: 0;
height: 96px;
z-index: -2;
background:
linear-gradient(90deg, rgba(255,255,255,0.18) 0 12px, transparent 12px 24px) 0 0 / 48px 18px,
linear-gradient(#7ec850 0 20px, #6ab33f 20px 32px, #a06d3f 32px 66px, #81512d 66px 96px);
box-shadow: inset 0 10px 0 rgba(255,255,255,0.14);
}
body.dark-mode { background: #15152c; }
body.dark-mode::before {
background-image:
linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
}
body.dark-mode::after {
background:
linear-gradient(90deg, rgba(255,255,255,0.07) 0 12px, transparent 12px 24px) 0 0 / 48px 18px,
linear-gradient(#355d37 0 20px, #27482b 20px 32px, #5c3a26 32px 66px, #38271f 66px 96px);
}
.gradient-bg {
position: fixed;
inset: 0;
background:
radial-gradient(circle at 15% 16%, rgba(255, 122, 182, 0.34), transparent 28%),
radial-gradient(circle at 86% 12%, rgba(85, 214, 255, 0.32), transparent 30%),
radial-gradient(circle at 70% 82%, rgba(126, 200, 80, 0.24), transparent 32%),
linear-gradient(135deg, #ffe8f3 0%, #e6f8ff 48%, #fff7d1 100%);
background-size: 145% 145%;
animation: dreamyDocsSky 16s ease-in-out infinite alternate;
z-index: -4;
transition: filter 0.35s ease;
}
@keyframes dreamyDocsSky {
from { background-position: 0% 42%; }
to { background-position: 100% 58%; }
}
.dark-mode .gradient-bg { filter: brightness(0.62) saturate(1.25) hue-rotate(28deg); }
.content-overlay {
position: fixed;
inset: 0;
background:
linear-gradient(90deg, rgba(255,255,255,0.18) 1px, transparent 1px),
linear-gradient(rgba(255,255,255,0.18) 1px, transparent 1px);
background-size: 24px 24px;
backdrop-filter: blur(2px);
z-index: -1;
transition: background 0.35s ease;
}
.dark-mode .content-overlay {
background:
linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px),
linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
}
.theme-toggle-btn {
border: 3px solid rgba(40, 50, 74, 0.16);
background: var(--panel-strong);
color: var(--ink);
backdrop-filter: blur(16px) saturate(1.12);
box-shadow: 0 7px 0 rgba(44, 38, 66, 0.14), 0 12px 26px var(--shadow);
cursor: pointer;
transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}
.theme-toggle-btn:hover,
.theme-toggle-btn:focus-visible {
transform: translateY(-3px);
box-shadow: 0 10px 0 rgba(44, 38, 66, 0.12), 0 18px 34px var(--shadow);
outline: none;
}
.theme-toggle-btn {
position: fixed;
right: 22px;
bottom: 22px;
width: 54px;
height: 54px;
border-radius: 18px;
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
font-size: 1.45rem;
}
#app {
position: relative;
z-index: 1;
min-height: 100vh;
padding: 88px 18px 52px;
}
.markdown-section {
position: relative;
max-width: 980px !important;
margin: 0 auto !important;
padding: clamp(26px, 4vw, 46px) !important;
color: var(--text-color) !important;
background:
linear-gradient(var(--panel), var(--panel)) padding-box,
linear-gradient(135deg, rgba(232,79,155,0.66), rgba(29,159,215,0.58), rgba(126,200,80,0.46), rgba(139,92,246,0.62)) border-box !important;
border: 4px solid transparent !important;
border-radius: var(--radius) !important;
box-shadow: var(--pixel-shadow) !important;
backdrop-filter: blur(18px) saturate(1.14) !important;
}
.markdown-section::before {
content: '📚 ColorFulCraft Docs';
position: absolute;
top: -18px;
left: 28px;
padding: 8px 16px;
border: 3px solid var(--border-color);
border-radius: 999px;
background: var(--panel-strong);
color: var(--pink);
font-weight: 1000;
font-size: 0.86rem;
box-shadow: 0 6px 0 rgba(232,79,155,0.14);
}
.markdown-section h1,
.markdown-section h2,
.markdown-section h3,
.markdown-section h4,
.markdown-section h5,
.markdown-section h6,
.markdown-section p,
.markdown-section li,
.markdown-section td,
.markdown-section th,
.markdown-section blockquote {
color: var(--text-color) !important;
}
.markdown-section h1,
.markdown-section h2 {
border-bottom: 3px dashed rgba(232,79,155,0.24) !important;
}
.markdown-section h1 { font-weight: 1000 !important; letter-spacing: 0.02em !important; }
.markdown-section h1 a,
.markdown-section h2 a,
.markdown-section h3 a { color: inherit !important; }
.markdown-section a {
color: var(--blue) !important;
font-weight: 800 !important;
text-decoration: none !important;
transition: color 0.2s ease, background 0.2s ease !important;
}
.markdown-section a:hover { color: var(--pink) !important; text-decoration: underline !important; }
.markdown-section code {
background: var(--code-bg) !important;
color: var(--pink) !important;
padding: 3px 7px !important;
border: 1px solid var(--border-color) !important;
border-radius: 8px !important;
font-weight: 800 !important;
}
.markdown-section pre {
background: var(--code-bg) !important;
border: 2px solid var(--border-color) !important;
border-radius: 18px !important;
color: var(--text-color) !important;
box-shadow: inset 0 -5px 0 rgba(0,0,0,0.04) !important;
}
.markdown-section pre code {
color: var(--text-color) !important;
border: none !important;
background: transparent !important;
}
.markdown-section blockquote {
border-left: 5px solid var(--pink) !important;
background: rgba(232, 79, 155, 0.08) !important;
border-radius: 0 16px 16px 0 !important;
}
.markdown-section table {
border-collapse: separate !important;
border-spacing: 0 !important;
overflow: hidden !important;
border: 2px solid var(--border-color) !important;
border-radius: 16px !important;
}
.markdown-section table th {
background: rgba(232, 79, 155, 0.10) !important;
font-weight: 1000 !important;
}
.markdown-section table td,
.markdown-section table th { border-color: var(--border-color) !important; }
.markdown-section img {
border-radius: 18px !important;
border: 3px solid rgba(255,255,255,0.58) !important;
box-shadow: 0 8px 0 rgba(44, 38, 66, 0.12), 0 16px 30px var(--shadow) !important;
}
.sidebar {
background: var(--sidebar-bg) !important;
backdrop-filter: blur(18px) saturate(1.12) !important;
border-right: 4px solid rgba(232,79,155,0.20) !important;
color: var(--text-color) !important;
}
.app-name,
.app-name-link {
color: var(--text-color) !important;
font-weight: 1000 !important;
}
.sidebar ul li a,
.sidebar-nav a,
.sidebar-nav p {
color: var(--text-color) !important;
border-radius: 13px !important;
font-weight: 800 !important;
transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease !important;
}
.sidebar ul li a:hover,
.sidebar ul li.active > a,
.sidebar-nav a:hover {
color: var(--pink) !important;
background: rgba(232, 79, 155, 0.10) !important;
transform: translateX(4px);
}
.sidebar-toggle {
background: var(--panel-strong) !important;
border: 3px solid var(--border-color) !important;
border-left: none !important;
border-radius: 0 14px 14px 0 !important;
box-shadow: 6px 8px 18px var(--shadow) !important;
}
.sidebar-toggle span {
background-color: var(--pink) !important;
height: 3px !important;
}
.search {
position: relative !important;
z-index: 1001 !important;
border-bottom: 2px dashed rgba(232,79,155,0.18) !important;
}
.search input {
background: rgba(255,255,255,0.62) !important;
color: var(--text-color) !important;
border: 2px solid var(--border-color) !important;
border-radius: 16px !important;
font-weight: 800 !important;
backdrop-filter: blur(12px) !important;
}
.dark-mode .search input { background: rgba(255,255,255,0.08) !important; }
.search input::placeholder { color: var(--muted) !important; }
.search .results-panel {
background: var(--panel-strong) !important;
border: 2px solid var(--border-color) !important;
border-radius: 18px !important;
color: var(--text-color) !important;
box-shadow: var(--pixel-shadow) !important;
overflow: hidden !important;
}
.search .matching-post { border-bottom: 1px solid var(--border-color) !important; }
.search .matching-post a { color: var(--text-color) !important; }
.search .matching-post a:hover { color: var(--pink) !important; background: rgba(232, 79, 155, 0.10) !important; }
.app-nav,
.anchor { color: var(--text-color) !important; }
.dark-mode pre[class*="language-"] { text-shadow: none !important; }
.medium-zoom-overlay,
.medium-zoom-image--opened {
background: rgba(12, 12, 24, 0.92) !important;
z-index: 9999 !important;
}
.sidebar::-webkit-scrollbar,
.markdown-section::-webkit-scrollbar { width: 7px; }
.sidebar::-webkit-scrollbar-track,
.markdown-section::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb,
.markdown-section::-webkit-scrollbar-thumb {
background: rgba(232, 79, 155, 0.35);
border-radius: 999px;
}
@media (max-width: 768px) {
#app { padding: 78px 10px 28px; }
.markdown-section {
margin: 0 auto !important;
padding: 28px 18px !important;
border-radius: 22px !important;
}
.markdown-section::before {
left: 18px;
font-size: 0.74rem;
}
.theme-toggle-btn {
top: 10px;
right: 10px;
width: 46px;
height: 46px;
border-radius: 16px;
font-size: 1.22rem;
}
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.001ms !important;
animation-iteration-count: 1 !important;
scroll-behavior: auto !important;
transition-duration: 0.001ms !important;
}
}
</style>
</head>
<body>
<div class="gradient-bg"></div>
<div class="content-overlay"></div>
<!-- 主题切换按钮 -->
<button class="theme-toggle-btn" id="themeToggle">🌙</button>
<div id="app">正在加载文档系统...</div>
<script>
// 🎯 从主页同步主题
function syncThemeFromHomePage() {
try {
// 1. 首先检查URL参数
const urlParams = new URLSearchParams(window.location.search);
const themeFromUrl = urlParams.get('theme');
// 2. 检查localStorage(主页使用的键名)
const themeFromStorage = localStorage.getItem('theme');
// 3. 检查主页通过localStorage传递的主题
const themeFromHome = localStorage.getItem('cfc-theme-sync');
let parsedTheme = null;
if (themeFromHome) {
try {
parsedTheme = JSON.parse(themeFromHome);
} catch(e) { /* 忽略解析错误 */ }
}
// 优先级:URL参数 > 主页同步 > localStorage存储
let theme = themeFromUrl ||
(parsedTheme && parsedTheme.theme) ||
themeFromStorage ||
'dark'; // 默认暗色模式
console.log('🎨 主题同步:', {
themeFromUrl,
themeFromStorage,
parsedTheme,
finalTheme: theme
});
setTheme(theme);
// 保存主题到主页可能使用的键名,确保一致性
localStorage.setItem('theme', theme);
localStorage.setItem('cfc-theme-sync', JSON.stringify({
type: 'theme-change',
theme: theme,
timestamp: Date.now(),
source: 'documentation-page'
}));
} catch (e) {
console.warn('主题同步失败:', e);
setTheme('dark');
}
}
function setTheme(theme) {
const body = document.body;
const themeToggle = document.getElementById('themeToggle');
if (theme === 'dark') {
body.classList.add('dark-mode');
themeToggle.textContent = '☀️';
} else {
body.classList.remove('dark-mode');
themeToggle.textContent = '🌙';
}
// 保存主题设置
localStorage.setItem('theme', theme);
localStorage.setItem('cfc-docs-theme', theme);
console.log('🎨 主题已设置为:', theme);
}
// 主题切换功能
function toggleTheme() {
const isDark = document.body.classList.contains('dark-mode');
const newTheme = isDark ? 'light' : 'dark';
setTheme(newTheme);
// 发送主题变化事件到主页
const themeEvent = {
type: 'theme-change',
theme: newTheme,
timestamp: Date.now(),
source: 'documentation-toggle'
};
localStorage.setItem('docs-theme-update', JSON.stringify(themeEvent));
localStorage.setItem('cfc-theme-sync', JSON.stringify(themeEvent));
// 触发 storage 事件,让主页监听
window.dispatchEvent(new StorageEvent('storage', {
key: 'docs-theme-update',
newValue: JSON.stringify(themeEvent)
}));
// 3秒后清理
setTimeout(() => {
localStorage.removeItem('docs-theme-update');
}, 3000);
}
function adjustBackButtonPosition() {
// 返回主页按钮已移除,保留空函数避免旧监听报错。
}
// 🎯 docsify 配置 - 修复的关键部分
window.$docsify = {
name: '🏛️ ColorFulCraft 技术文档中心',
repo: 'ColorFulCraft/CFCHistory',
// 📁 文档配置 - 修复路径设置
basePath: './docs/', // 改为相对路径
loadSidebar: true,
subMaxLevel: 3,
auto2top: true,
homepage: 'README.md', // 明确指定首页
alias: {
'/.*/_sidebar.md': '/_sidebar.md',
'/docs/(.*)': '/$1',
'/docs/history/(.*)': '/history/$1',
'/history/(.*)': '/history/$1',
'/': '/README.md',
'': '/README.md'
},
// 🔍 搜索配置
search: {
paths: 'auto',
placeholder: '🔍 搜索文档...',
noData: '😅 没有找到相关结果',
depth: 3,
namespace: 'cfc-docs',
hideOtherSidebarContent: false
},
// 📄 侧边栏配置
sidebarDisplayLevel: 2,
loadNavbar: false,
// 📖 封面页配置
coverpage: false,
notFoundPage: '404.md',
// ⚙️ 插件配置 - 完全简化,让 docsify 处理路由
plugins: [
function(hook, vm) {
hook.init(function() {
// 从主页同步主题
syncThemeFromHomePage();
});
hook.beforeEach(function(content, next) {
const file = (vm.route.file || 'README.md').replace(/^\/?docs\//, '');
// 修复编辑链接
const editUrl = `https://github.com/ColorFulCraft/CFCHistory/blob/main/docs/${file}`;
// 添加页脚信息(所有页面都添加)
content += '\n\n---\n\n' +
'> **📂 文档信息** | 最后更新: ' + new Date().toLocaleDateString('zh-CN') +
' | [在 GitHub 上编辑此页](' + editUrl + ')\n';
next(content);
});
hook.mounted(function() {
// 添加主题切换按钮事件
document.getElementById('themeToggle').addEventListener('click', toggleTheme);
// 初始化调整按钮位置
setTimeout(() => {
adjustBackButtonPosition();
// 监听搜索框的出现
const observer = new MutationObserver(() => {
adjustBackButtonPosition();
});
observer.observe(document.body, {
childList: true,
subtree: true
});
}, 500);
});
hook.doneEach(function() {
// 确保所有文字颜色正确
document.querySelectorAll('.markdown-section *').forEach(el => {
if (getComputedStyle(el).color === 'rgb(51, 51, 51)' ||
getComputedStyle(el).color === 'rgb(68, 68, 68)' ||
getComputedStyle(el).color === 'rgb(0, 0, 0)') {
el.style.color = 'var(--text-color)';
}
});
// 动态调整返回按钮位置
setTimeout(adjustBackButtonPosition, 100);
// 为图片添加主题适配
document.querySelectorAll('.markdown-section img').forEach(img => {
img.style.maxWidth = '100%';
img.style.borderRadius = '8px';
img.style.boxShadow = '0 2px 8px rgba(0,0,0,0.1)';
});
// 为外部链接添加标识
document.querySelectorAll('.markdown-section a[href^="http"]').forEach(link => {
if (!link.href.includes(window.location.hostname)) {
link.target = '_blank';
link.rel = 'noopener noreferrer';
if (!link.querySelector('.external-icon')) {
link.innerHTML += ' <span style="font-size:0.8em;">↗</span>';
}
}
});
// 移除之前的链接修复逻辑,让 docsify 处理
// 只添加一个简单的404处理
setTimeout(() => {
const markdownSection = document.querySelector('.markdown-section');
if (markdownSection && markdownSection.textContent.includes('找不到该页面')) {
console.log('检测到404页面');
// 可以在这里添加自定义404处理
}
}, 500);
});
hook.afterEach(function() {
// 文档切换时重新调整按钮位置
setTimeout(() => {
adjustBackButtonPosition();
}, 300);
});
}
]
};
// 页面加载
document.addEventListener('DOMContentLoaded', function() {
console.log('📚 文档页面加载 - 当前URL:', window.location.href);
console.log('当前哈希:', location.hash);
// 同步主题
syncThemeFromHomePage();
// 设置主题切换按钮事件
document.getElementById('themeToggle').addEventListener('click', toggleTheme);
// 监听窗口大小变化
window.addEventListener('resize', adjustBackButtonPosition);
// 监听侧边栏切换
document.addEventListener('click', function(e) {
if (e.target.closest('.sidebar-toggle')) {
setTimeout(adjustBackButtonPosition, 500);
}
});
// 监听来自主页的主题变化
window.addEventListener('storage', function(e) {
if (e.key === 'cfc-theme-sync') {
try {
const themeData = JSON.parse(e.newValue);
if (themeData && themeData.theme && themeData.source !== 'documentation-page') {
console.log('📱 收到主页主题更新:', themeData.theme);
setTheme(themeData.theme);
}
} catch (error) {
console.warn('主题同步解析错误:', error);
}
}
});
// 初始调整按钮位置
setTimeout(adjustBackButtonPosition, 1000);
// 简化初始加载逻辑
function ensureInitialLoad() {
const hash = location.hash;
console.log('初始加载检查 - 当前哈希:', hash);
// 只在完全为空时才重定向到首页
if (!hash || hash === '#' || hash === '') {
console.log('空哈希,重定向到首页');
location.hash = '#/README.md';
}
}
// 延迟执行,确保 docsify 已初始化
setTimeout(ensureInitialLoad, 100);
// 监听哈希变化,用于调试
window.addEventListener('hashchange', function() {
console.log('哈希变化到:', location.hash);
});
});
</script>
<!-- 📚 Docsify 核心库 -->
<script src="https://cdn.jsdelivr.net/npm/docsify@4"></script>
<script src="https://cdn.jsdelivr.net/npm/docsify@4/lib/plugins/search.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/docsify@4/lib/plugins/zoom-image.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/docsify-copy-code@2"></script>
</body>
</html>