-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path404.html
More file actions
754 lines (656 loc) · 29.6 KB
/
Copy path404.html
File metadata and controls
754 lines (656 loc) · 29.6 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
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>酱姆(≧∇≦)ノ - 404 - 页面不存在</title>
<!-- 引入 Tailwind CSS -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- 引入 MathJax 脚本 -->
<script src="/Static-Blog/styles/mathjax-full/es5/tex-mml-chtml.js"></script>
<!-- 引入 Font Awesome -->
<link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
<!-- 配置 Tailwind -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Comic+Neue:wght@400;700&display=swap" rel="stylesheet">
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#34d399', // 活力的绿色
secondary: '#fbbf24', // 黄色
accent: '#ec4899', // 粉色
dark: '#1e293b',
light: '#f8fafc'
},
fontFamily: {
sans: ['Inter', 'system-ui', 'sans-serif'],
mono: ['Fira Code', 'monospace']
}
}
}
}
</script>
<style type="text/tailwindcss">
@layer utilities {
.content-auto {
content-visibility: auto;
}
.text-balance {
text-wrap: balance;
}
.transition-custom {
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
}
</style>
</head>
<body class="font-sans bg-light text-dark antialiased">
<!-- 引入独立页眉 -->
<header class="bg-gradient-to-r from-primary to-secondary text-white sticky top-0 z-50 shadow-lg transition-all duration-300 relative overflow-visible">
<!-- 粒子容器 -->
<div class="header-particles absolute inset-0 z-0"></div>
<div class="container mx-auto px-4 py-3 max-w-6xl relative z-10">
<!-- 导航栏容器:移动端换行,桌面端不换行 -->
<div class="flex items-center justify-between w-full flex-wrap md:flex-nowrap gap-2">
<!-- Logo区域(第一行左侧 - 移动端和桌面端一致) -->
<div class="flex items-center gap-3 flex-shrink-0 order-1 md:order-1">
<div class="w-10 h-10 rounded-lg overflow-hidden shadow-lg transform hover:scale-105 transition-transform duration-300"
style="box-shadow: 0 4px 12px rgba(22, 93, 255, 0.3);">
<canvas id="logo-canvas" width="128" height="128"
style="width: 40px; height: 40px; display: block;"></canvas>
</div>
<a href="/Static-Blog/" class="text-xl font-bold tracking-tight whitespace-nowrap">
酱姆(≧∇≦)ノ
</a>
</div>
<!-- 搜索框:移动端第二行,桌面端中间 -->
<div class="search-container
w-full max-w-[90%] mx-auto <!-- 移动端:占满第二行,居中 -->
md:w-auto md:flex-1 md:mx-4 md:order-2 <!-- 桌面端:中间弹性宽度 -->
relative order-3">
<div class="relative group">
<input type="text" id="search-input" placeholder="搜索..."
class="w-full bg-white/15 backdrop-blur-sm border border-white/30 rounded-full py-2 pl-8 sm:pl-10 pr-4 text-white text-sm
placeholder-white/60 focus:outline-none focus:ring-2 focus:ring-white/50
transition-all duration-300 group-hover:bg-white/20">
<i class="fa fa-search absolute left-3 sm:left-4 top-1/2 transform -translate-y-1/2 text-white/80 group-hover:text-white transition-colors"></i>
<span class="absolute right-4 top-1/2 transform -translate-y-1/2 w-2 h-2 bg-white/60 rounded-full opacity-0 group-hover:opacity-100 animate-ping"></span>
</div>
<!-- 搜索结果容器 -->
<div id="search-results" class="search-results mt-1 bg-white/95 dark:bg-gray-800/95 rounded-xl shadow-2xl p-2 absolute
z-500 hidden max-h-96 overflow-y-auto overflow-x-hidden
border border-gray-200 dark:border-gray-700">
</div>
</div>
<!-- 右侧功能区:移动端第一行右侧,桌面端右侧 -->
<div class="flex items-center gap-2 flex-shrink-0
order-2 md:order-3 <!-- 移动端:第一行右侧;桌面端:第三顺位(最右侧) -->
justify-end"> <!-- 确保内容靠右对齐 -->
<!-- 菜单按钮(仅移动端显示) -->
<button id="menu-toggle" class="md:hidden text-white p-2 rounded-full hover:bg-white/10 transition-colors active:bg-white/20 active:scale-95">
<i class="fa fa-bars text-xl"></i>
</button>
<!-- 桌面端导航菜单(仅桌面端显示) -->
<nav id="main-nav" class="hidden md:flex space-x-1">
<a href="/Static-Blog/" class="px-4 py-2 rounded-full text-sm font-medium
hover:bg-white/10 transition-all duration-300 flex items-center gap-1">
<i class="fa fa-home"></i>
<span class="hidden sm:inline">首页</span>
</a>
<a href="/Static-Blog/page/1/" class="px-4 py-2 rounded-full text-sm font-medium
hover:bg-white/10 transition-all duration-300 flex items-center gap-1">
<i class="fa fa-book"></i>
<span class="hidden sm:inline">文章</span>
</a>
<a href="/Static-Blog/tags/" class="px-4 py-2 rounded-full text-sm font-medium
hover:bg-white/10 transition-all duration-300 flex items-center gap-1">
<i class="fa fa-tags"></i>
<span class="hidden sm:inline">标签</span>
</a>
</nav>
</div>
</div>
</div>
<!-- 移动端菜单(全屏覆盖式) -->
<div id="mobileMenu" class="md:hidden bg-gradient-to-b from-primary/95 to-secondary/95 backdrop-blur-lg fixed inset-0 z-40 transform translate-x-full transition-transform duration-300 ease-in-out">
<div class="container mx-auto px-4 py-20 h-full flex flex-col">
<div class="flex justify-end mb-10">
<button id="menu-close" class="text-white p-2 rounded-full hover:bg-white/10 transition-colors active:bg-white/20 active:scale-95">
<i class="fa fa-times text-2xl"></i>
</button>
</div>
<div class="flex flex-col space-y-6 items-center text-center">
<a href="/Static-Blog/" class="px-8 py-4 rounded-full text-xl font-medium text-white/90
hover:bg-white/10 transition-all duration-300 w-full max-w-xs">
<i class="fa fa-home mr-2"></i>首页
</a>
<a href="/Static-Blog/page/1/" class="px-8 py-4 rounded-full text-xl font-medium text-white/90
hover:bg-white/10 transition-all duration-300 w-full max-w-xs">
<i class="fa fa-book mr-2"></i>文章
</a>
<a href="/Static-Blog/tags/" class="px-8 py-4 rounded-full text-xl font-medium text-white/90
hover:bg-white/10 transition-all duration-300 w-full max-w-xs">
<i class="fa fa-tags mr-2"></i>标签
</a>
</div>
</div>
</div>
<!-- 菜单遮罩层 -->
<div id="menu-overlay" class="md:hidden fixed inset-0 bg-black/50 z-30 opacity-0 pointer-events-none transition-opacity duration-300"></div>
</header>
<!-- 高清图标绘制脚本 -->
<script>
document.addEventListener("DOMContentLoaded", function() {
const canvas = document.getElementById('logo-canvas');
const ctx = canvas.getContext('2d');
// 书签图标配置
const config = {
icon: "\uf15c", // 书签图标Unicode
iconSize: 72,
backgroundColor: ["#165DFF", "#7B61FF"],
borderRadius: 24,
iconColor: "white",
scale: 4
};
// 绘制高清图标
function drawHighResIcon() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
// 渐变背景
const gradient = ctx.createLinearGradient(0, 0, canvas.width, canvas.height);
gradient.addColorStop(0, config.backgroundColor[0]);
gradient.addColorStop(1, config.backgroundColor[1]);
// 圆角矩形背景(抗锯齿处理)
ctx.beginPath();
const radius = config.borderRadius;
ctx.moveTo(radius, 0);
ctx.lineTo(canvas.width - radius, 0);
ctx.arcTo(canvas.width, 0, canvas.width, radius, radius);
ctx.lineTo(canvas.width, canvas.height - radius);
ctx.arcTo(canvas.width, canvas.height, canvas.width - radius, canvas.height, radius);
ctx.lineTo(radius, canvas.height);
ctx.arcTo(0, canvas.height, 0, canvas.height - radius, radius);
ctx.lineTo(0, radius);
ctx.arcTo(0, 0, radius, 0, radius);
ctx.closePath();
// 阴影增强立体感
ctx.shadowColor = 'rgba(0, 0, 0, 0.1)';
ctx.shadowBlur = 8;
ctx.shadowOffsetX = 0;
ctx.shadowOffsetY = 2;
ctx.fillStyle = gradient;
ctx.fill();
// 绘制图标
ctx.fillStyle = config.iconColor;
ctx.font = `normal normal normal ${config.iconSize}px FontAwesome`;
ctx.textAlign = "center";
ctx.textBaseline = "middle";
ctx.fillText(config.icon, canvas.width / 2, canvas.height / 2);
// 高光效果
const highlight = ctx.createLinearGradient(
canvas.width * 0.2,
canvas.height * 0.2,
canvas.width * 0.8,
canvas.height * 0.8
);
highlight.addColorStop(0, 'rgba(255, 255, 255, 0.2)');
highlight.addColorStop(1, 'rgba(255, 255, 255, 0)');
ctx.beginPath();
ctx.arc(canvas.width / 2, canvas.height / 2, canvas.width * 0.35, 0, Math.PI * 2);
ctx.fillStyle = highlight;
ctx.fill();
}
// 检查Font Awesome加载状态
function isFontAwesomeLoaded() {
const testSpan = document.createElement('span');
testSpan.innerHTML = '';
testSpan.style.fontFamily = 'FontAwesome';
testSpan.style.position = 'absolute';
testSpan.style.visibility = 'hidden';
document.body.appendChild(testSpan);
const isLoaded = testSpan.offsetWidth > 0;
document.body.removeChild(testSpan);
return isLoaded;
}
// 初始化图标
function initIcon() {
if (isFontAwesomeLoaded()) {
drawHighResIcon();
} else {
setTimeout(initIcon, 100);
}
}
initIcon();
window.addEventListener('resize', drawHighResIcon);
});
</script>
<!-- 核心交互脚本 -->
<script>
document.addEventListener("DOMContentLoaded", function() {
// 元素获取
const menuToggle = document.getElementById("menu-toggle");
const menuClose = document.getElementById("menu-close");
const mobileMenu = document.getElementById("mobileMenu");
const menuOverlay = document.getElementById("menu-overlay");
const searchInput = document.getElementById("search-input");
const searchResults = document.getElementById("search-results");
// 移动端菜单展开
function openMenu() {
mobileMenu.classList.remove("translate-x-full");
mobileMenu.classList.add("translate-x-0");
menuOverlay.classList.remove("opacity-0", "pointer-events-none");
document.body.style.overflow = "hidden";
closeSearchResults();
}
// 移动端菜单收起
function closeMenu() {
mobileMenu.classList.add("translate-x-full");
mobileMenu.classList.remove("translate-x-0");
menuOverlay.classList.add("opacity-0", "pointer-events-none");
document.body.style.overflow = "";
}
// 关闭搜索结果并清除样式
function closeSearchResults() {
if (!searchResults) return;
searchResults.classList.add('hidden');
searchResults.removeAttribute('style');
document.documentElement.style.zoom = '1';
document.body.scrollLeft = 0;
}
// 更新搜索结果位置
function updateSearchPosition() {
if (!searchInput || !searchResults || searchResults.classList.contains('hidden')) return;
const inputRect = searchInput.getBoundingClientRect();
const containerRect = searchInput.closest('.search-container').getBoundingClientRect();
const isMobile = window.innerWidth < 768; // 与md断点一致
searchResults.style.top = `${inputRect.height + 4}px`;
searchResults.style.maxHeight = '384px';
if (isMobile) {
// 移动端:搜索结果与搜索栏同宽,居中
searchResults.style.width = `${inputRect.width}px`;
searchResults.style.left = '50%';
searchResults.style.transform = 'translateX(-50%)';
} else {
// 桌面端:搜索结果与搜索栏同宽,左对齐
searchResults.style.width = `${inputRect.width}px`;
searchResults.style.left = '0';
searchResults.style.transform = 'none';
}
}
// 绑定菜单事件
if (menuToggle) menuToggle.addEventListener("click", openMenu);
if (menuClose) menuClose.addEventListener("click", closeMenu);
if (menuOverlay) menuOverlay.addEventListener("click", closeMenu);
// 搜索框事件
if (searchInput) {
searchInput.addEventListener('focus', function() {
if (searchResults) {
searchResults.classList.remove('hidden');
updateSearchPosition();
}
});
searchInput.addEventListener("blur", function() {
if (searchResults && !searchResults.contains(event.relatedTarget)) {
setTimeout(closeSearchResults, 200);
}
});
searchInput.addEventListener('input', updateSearchPosition);
}
// 窗口大小变化时更新(防抖处理)
let resizeTimer;
window.addEventListener('resize', () => {
clearTimeout(resizeTimer);
resizeTimer = setTimeout(() => {
updateSearchPosition();
if (window.innerWidth >= 768) { // 与md断点一致
closeMenu();
}
}, 100);
});
window.addEventListener('scroll', updateSearchPosition);
updateSearchPosition();
});
</script>
<!-- 引入搜索脚本 -->
<script src="/Static-Blog/scripts/search.js"></script>
<script src="/Static-Blog/styles/main.js"></script>
<!-- 博客内容区域 -->
<main class="container mx-auto px-4 py-8 max-w-6xl">
<!-- 背景装饰元素 -->
<div class="fixed -z-10 top-0 left-0 w-full h-full overflow-hidden pointer-events-none">
<div class="absolute top-1/4 left-1/4 w-64 h-64 bg-primary/5 rounded-full filter blur-3xl"></div>
<div class="absolute bottom-1/4 right-1/4 w-80 h-80 bg-secondary/5 rounded-full filter blur-3xl"></div>
</div>
<div class="flex flex-col items-center justify-center min-h-[80vh] text-center px-4 py-12">
<!-- 404 数字装饰 -->
<div class="relative mb-8">
<span class="text-[clamp(5rem,15vw,10rem)] font-black text-primary opacity-90">404</span>
<!-- 装饰性小元素 -->
<div class="absolute -top-10 -left-10 w-16 h-16 bg-primary/10 rounded-full animate-pulse"></div>
<div class="absolute -bottom-5 -right-5 w-12 h-12 bg-secondary/10 rounded-full animate-pulse" style="animation-delay: 0.5s"></div>
</div>
<!-- 浮动云朵装饰 -->
<div class="absolute top-1/4 left-1/3 w-16 h-16 bg-white/80 dark:bg-gray-800/80 rounded-full shadow-lg animate-float"></div>
<div class="absolute top-1/3 right-1/4 w-12 h-12 bg-white/70 dark:bg-gray-800/70 rounded-full shadow-lg animate-float" style="animation-delay: 1s"></div>
<h2 class="text-[clamp(1.5rem,3vw,2.5rem)] font-bold mb-4 text-gray-800 dark:text-white">
页面不存在
</h2>
<p class="text-gray-600 dark:text-gray-400 text-lg max-w-md mb-8">
你访问的页面好像飘到外太空去了... 也许可以回到首页重新探索?
</p>
<!-- 返回按钮 -->
<a href="/" class="inline-flex items-center justify-center px-6 py-3 bg-primary text-white font-medium rounded-lg shadow-lg hover:bg-primary/90 hover:shadow-xl transform hover:-translate-y-1 transition-all duration-300 focus:outline-none focus:ring-2 focus:ring-primary/50">
<i class="fa fa-arrow-left mr-2"></i>
返回首页
</a>
<!-- 底部导航提示 -->
<div class="mt-12 flex flex-wrap justify-center gap-6 text-sm text-gray-500 dark:text-gray-400">
<a href="/Static-Blog/page/1/" class="hover:text-primary dark:hover:text-primary transition-colors">
<i class="fa fa-file-text-o mr-1"></i> 所有文章
</a>
<a href="/Static-Blog/tags/" class="hover:text-primary dark:hover:text-primary transition-colors">
<i class="fa fa-tags mr-1"></i> 标签云
</a>
<a href="https://space.bilibili.com/386841039?spm_id_from=333.1007.0.0" class="hover:text-primary dark:hover:text-primary transition-colors">
<i class="fa fa-user mr-1"></i> 关于我
</a>
</div>
</div>
<!-- 装饰性波浪 -->
<div class="fixed bottom-0 left-0 w-full overflow-hidden leading-none -z-10">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none" class="w-full h-[60px]">
<path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".25" class="fill-primary"></path>
<path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" opacity=".5" class="fill-primary"></path>
<path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" class="fill-primary"></path>
</svg>
</div>
<style>
/* 动画效果 */
@keyframes float {
0%, 100% {
transform: translateY(0);
}
50% {
transform: translateY(-10px);
}
}
.animate-float {
animation: float 6s ease-in-out infinite;
}
/* 渐变背景 */
body {
background: linear-gradient(to bottom, #f9fafb, #e5e7eb);
}
/* 自定义滚动条 */
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
background: linear-gradient(to bottom, var(--primary), var(--secondary));
border-radius: 4px;
}
/* 定义主题色变量(修正语法错误) */
:root {
--primary: #3B82F6; /* 使用or替代|| */
--secondary: #F97316; /* 使用or替代|| */
}
</style>
</main>
<!-- 引入独立页脚 -->
<footer class="bg-gradient-to-r from-primary to-secondary text-white mt-16 relative overflow-hidden">
<!-- 粒子容器 -->
<div class="footer-particles absolute inset-0 z-0"></div>
<div class="container mx-auto px-4 py-12 max-w-5xl relative z-10">
<div class="grid grid-cols-1 md:grid-cols-3 gap-8 justify-items-center">
<div class="w-full text-center md:text-left">
<h3 class="text-xl font-bold mb-4 flex items-center justify-center md:justify-start">
<i class="fa fa-feather text-white mr-2"></i>
酱姆(≧∇≦)ノ
</h3>
<p class="text-white/80 mb-4">
</p>
<div class="flex space-x-4 justify-center md:justify-start">
<!-- GitHub -->
<a href="https://github.com/164321595"
target="_blank"
rel="noopener noreferrer"
class="text-white/80 hover:text-white transition-custom"
aria-label="GitHub">
<i class="fa fa-github text-xl transform hover:rotate-12 transition-transform"></i>
</a>
<!-- Bilibili -->
<a href="https://space.bilibili.com/386841039?spm_id_from=333.1007.0.0"
target="_blank"
rel="noopener noreferrer"
class="text-white/80 hover:text-white transition-custom"
aria-label="Bilibili">
<img
src="/Static-Blog/styles/images/bilibili.png"
alt="B站图标"
class="inline-block w-6 h-6 object-contain transform hover:scale-110 transition-transform"
>
</a>
<!-- LinkedIn -->
<a href="#"
target="_blank"
rel="noopener noreferrer"
class="text-white/80 hover:text-white transition-custom"
aria-label="LinkedIn">
<i class="fa fa-linkedin text-xl transform hover:-rotate-6 transition-transform"></i>
</a>
<!-- RSS -->
<a href="#"
target="_blank"
rel="noopener noreferrer"
class="text-white/80 hover:text-white transition-custom"
aria-label="RSS">
<i class="fa fa-rss text-xl transform hover:scale-110 transition-transform"></i>
</a>
</div>
</div>
<div class="w-full text-center md:text-left">
<h3 class="text-lg font-bold mb-4 text-center md:text-left">
快速链接
</h3>
<ul class="space-y-2">
<li><a href="/Static-Blog/" class="text-white/80 hover:text-white transition-all duration-300 hover:pl-1">首页</a></li>
<li><a href="/Static-Blog/page/1/" class="text-white/80 hover:text-white transition-all duration-300 hover:pl-1">文章</a></li>
<li><a href="/Static-Blog/tags/" class="text-white/80 hover:text-white transition-all duration-300 hover:pl-1">标签</a></li>
<li><a href="/Static-Blog/about/" class="text-white/80 hover:text-white transition-all duration-300 hover:pl-1">关于</a></li>
<li><a href="/Static-Blog/sitemap.xml" class="text-white/80 hover:text-white transition-all duration-300 hover:pl-1">站点地图</a></li>
</ul>
</div>
<div class="w-full text-center md:text-left">
<h3 class="text-lg font-bold mb-4 text-center md:text-left">
订阅更新
</h3>
<p class="text-white/80 mb-4">获取最新文章和通知</p>
</div>
</div>
<div class="border-t border-white/20 mt-10 pt-6 text-center text-white/60 text-sm">
<p>© 2025 酱姆(≧∇≦)ノ. 保留所有权利.</p>
<div class="mt-2 flex justify-center space-x-4 text-xs">
<a href="#" class="hover:text-white transition-colors">隐私政策</a>
<a href="#" class="hover:text-white transition-colors">使用条款</a>
<a href="#" class="hover:text-white transition-colors">联系我们</a>
</div>
</div>
</div>
</footer>
<!-- 增强版粒子特效脚本 -->
<script>
// 生成动态粒子(速度优化版)
function createParticles(containerClass, count) {
const container = document.querySelector(containerClass);
if (!container) return;
container.innerHTML = ''; // 清空容器
// 粒子大小分组(增强层次感)
const sizeGroups = [
{ min: 1, max: 3, proportion: 0.5 }, // 小粒子(50%)
{ min: 3, max: 6, proportion: 0.3 }, // 中粒子(30%)
{ min: 6, max: 10, proportion: 0.2 } // 大粒子(20%)
];
let created = 0;
// 按大小分组生成粒子
sizeGroups.forEach(group => {
const groupCount = Math.floor(count * group.proportion);
for (let i = 0; i < groupCount; i++) {
const particle = document.createElement('div');
particle.classList.add('particle');
// 随机属性(加快速度,增强视觉效果)
const size = Math.random() * (group.max - group.min) + group.min;
const x = Math.random() * 100;
const y = Math.random() * 100;
const duration = Math.random() * 3 + 2; // 速度提升:3-7秒/周期(原10-20秒)
const delay = Math.random() * 2; // 缩短延迟:0-2秒
const opacity = Math.random() * 0.5 + 0.3; // 提高可见度:0.3-0.8
const isHorizontal = Math.random() > 0.5; // 50%粒子带横向运动
// 应用样式
particle.style.width = `${size}px`;
particle.style.height = `${size}px`;
particle.style.left = `${x}%`;
particle.style.top = `${y}%`;
particle.style.opacity = opacity;
particle.style.animationDelay = `${delay}s`;
// 复合动画(上下浮动+随机横向移动)
if (isHorizontal) {
particle.style.animation = `
float ${duration}s ease-in-out infinite,
drift ${(duration * 1.5) + Math.random() * 2}s ease-in-out infinite alternate
`;
} else {
particle.style.animation = `float ${duration}s ease-in-out infinite`;
}
// 随机添加发光效果(增强阳光感)
if (Math.random() > 0.7) {
particle.style.boxShadow = `0 0 ${size * 2}px rgba(255, 255, 255, 0.6)`;
}
container.appendChild(particle);
created++;
}
});
// 补充剩余粒子(处理四舍五入误差)
while (created < count) {
const particle = document.createElement('div');
particle.classList.add('particle');
particle.style.width = '3px';
particle.style.height = '3px';
particle.style.left = `${Math.random() * 100}%`;
particle.style.top = `${Math.random() * 100}%`;
particle.style.opacity = 0.5;
particle.style.animation = `float 5s ease-in-out infinite`;
container.appendChild(particle);
created++;
}
}
// 粒子样式(增强动画效果)
const style = document.createElement('style');
style.textContent = `
.header-particles, .footer-particles { overflow: hidden; }
.particle {
position: absolute;
border-radius: 50%;
pointer-events: none;
background: rgba(255, 255, 255, 0.3);
}
/* 页眉粒子更亮 */
.header-particles .particle {
background: rgba(255, 255, 255, 0.35);
}
/* 浮动动画(加大幅度) */
@keyframes float {
0%, 100% {
transform: translateY(0) rotate(0deg);
}
50% {
transform: translateY(-20px) rotate(10deg); /* 加大浮动距离和旋转角度 */
}
}
/* 横向漂移动画 */
@keyframes drift {
0% {
transform: translateX(-15px);
}
100% {
transform: translateX(15px);
}
}
/* 滚动时的视差效果 */
.header-particles {
transform: translateY(var(--scroll-y, 0));
transition: transform 0.1s ease-out;
}
.footer-particles {
transform: translateY(calc(var(--scroll-y, 0) * -0.5));
transition: transform 0.1s ease-out;
}
`;
document.head.appendChild(style);
// 初始化粒子
window.addEventListener('DOMContentLoaded', () => {
createParticles('.header-particles', 40); // 页眉粒子(增加数量)
createParticles('.footer-particles', 35); // 页脚粒子(增加数量)
// 滚动视差效果
window.addEventListener('scroll', () => {
const scrollY = window.scrollY;
document.documentElement.style.setProperty('--scroll-y', `${scrollY * 0.1}px`);
});
});
// 窗口大小改变时重绘粒子
window.addEventListener('resize', () => {
createParticles('.header-particles', 40);
createParticles('.footer-particles', 35);
});
</script>
<!-- 回到顶部按钮 -->
<button id="back-to-top" class="fixed bottom-8 right-8 w-12 h-12 rounded-full bg-primary text-white shadow-lg flex items-center justify-center opacity-0 invisible transition-all duration-300 hover:bg-primary/90 hover:scale-110 z-50">
<i class="fa fa-chevron-up"></i>
</button>
<!-- 滚动进度条 -->
<div id="scroll-progress" class="fixed top-0 left-0 h-1 bg-primary z-50 transform origin-left scale-x-0 transition-transform duration-300"></div>
<script>
// 回到顶部按钮
const backToTopBtn = document.getElementById('back-to-top');
window.addEventListener('scroll', () => {
// 显示/隐藏回到顶部按钮
if (window.scrollY > 500) {
backToTopBtn.classList.remove('opacity-0', 'invisible');
backToTopBtn.classList.add('opacity-100', 'visible');
} else {
backToTopBtn.classList.add('opacity-0', 'invisible');
backToTopBtn.classList.remove('opacity-100', 'visible');
}
// 更新滚动进度条
const winScroll = document.body.scrollTop || document.documentElement.scrollTop;
const height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
const scrolled = (winScroll / height) * 100;
document.getElementById("scroll-progress").style.transform = `scaleX(${scrolled / 100})`;
});
backToTopBtn.addEventListener('click', () => {
window.scrollTo({
top: 0,
behavior: 'smooth'
});
});
// 平滑滚动
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function(e) {
e.preventDefault();
const targetId = this.getAttribute('href');
if (targetId === '#') return;
const targetElement = document.querySelector(targetId);
if (targetElement) {
targetElement.scrollIntoView({
behavior: 'smooth'
});
}
});
});
</script>
</body>
</html>