-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
800 lines (693 loc) · 15.4 KB
/
Copy pathstyle.css
File metadata and controls
800 lines (693 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
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
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
/* ===== 主题变量 ===== */
:root,
[data-theme="dark"] {
color-scheme: dark;
--bg-base: #0d0f14;
/* 底层/叠层是固定常量,靠叠层 opacity 交叉淡入,不随 [data-theme] 变化 */
--bg-grad: linear-gradient(180deg, #000000 0%, #33363e 100%);
--bg-grad-overlay: linear-gradient(180deg, #ffffff 0%, #a9aeb9 100%);
--island-bg: rgba(15, 17, 22, 0.72);
--island-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
--border: rgba(255, 255, 255, 0.14);
--text: #ffffff;
--text-mid: #cfd3db;
--text-dim: #9aa1b0;
/* 头像光晕同样是固定双层常量,靠叠层 opacity 交叉淡入 */
--halo: rgba(190, 195, 205, 0.30);
--halo-overlay: rgba(70, 74, 84, 0.22);
--avatar-border: rgba(210, 214, 224, 0.55);
--avatar-glow: 0 0 46px rgba(200, 204, 214, 0.38), 0 18px 44px rgba(0, 0, 0, 0.5);
--status-dot: #b7bcc6;
--divider: rgba(255, 255, 255, 0.16);
--work-card-bg: rgba(255, 255, 255, 0.04);
--card-shadow-hover: 0 16px 40px rgba(0, 0, 0, 0.55);
--btn-solid-bg: #f2f3f5;
--btn-solid-text: #0b0c10;
}
[data-theme="light"] {
color-scheme: light;
--bg-base: #c9ccd4;
--island-bg: rgba(255, 255, 255, 0.72);
--island-shadow: 0 12px 36px rgba(40, 44, 52, 0.28);
--border: rgba(0, 0, 0, 0.14);
--text: #0b0c10;
--text-mid: #33373f;
--text-dim: #4d525c;
--avatar-border: rgba(60, 64, 72, 0.45);
--avatar-glow: 0 0 46px rgba(90, 94, 104, 0.45), 0 18px 44px rgba(40, 44, 52, 0.25);
--status-dot: #5c616b;
--divider: rgba(0, 0, 0, 0.18);
--work-card-bg: rgba(255, 255, 255, 0.5);
--card-shadow-hover: 0 12px 28px rgba(40, 44, 52, 0.18);
--btn-solid-bg: #101216;
--btn-solid-text: #ffffff;
}
/* ===== 基础 ===== */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
background-color: var(--bg-base);
color: var(--text);
min-height: 100vh;
display: flex;
flex-direction: column;
padding-top: 96px;
}
/* 背景渐变双层交叉淡入,主题切换时平滑过渡 */
.bg-fx {
position: fixed;
inset: 0;
z-index: -2;
background: var(--bg-grad);
}
.bg-fx::after {
content: "";
position: absolute;
inset: 0;
background: var(--bg-grad-overlay);
opacity: 0;
transition: opacity 1.1s ease;
}
[data-theme="light"] .bg-fx::after {
opacity: 1;
}
/* 雪花画布 */
.snow-canvas {
position: fixed;
inset: 0;
width: 100%;
height: 100%;
z-index: 3;
pointer-events: none;
}
/* 主题切换时的全局加长过渡(由 script.js 临时挂载 1.1 秒)。
:where() 特异性为 0,整条选择器为 (0,1,1),可覆盖 .theme-toggle / .work-card 等 (0,1,0) 自身规则,
因此无需 !important —— 用 !important 的简写反而会把 transform/opacity 过渡一并清掉。 */
html.theme-animating :where(body, body *) {
transition: color 1.1s ease, background-color 1.1s ease, border-color 1.1s ease,
box-shadow 1.1s ease, opacity 1.1s ease, transform 0.2s ease;
}
/* 上面那条通配规则会命中 .pages-track,把翻屏过渡从 0.58s 压成 0.2s。
换肤期间也要保持原来的滑动节奏,所以在这里单独还原(拖拽时的 transition: none 优先级更高)。 */
html.theme-animating .pages-track:not(.dragging) {
transition: transform 0.58s cubic-bezier(0.22, 0.61, 0.36, 1);
}
/* ===== 灵动岛导航 ===== */
.island {
position: fixed;
top: 18px;
left: 50%;
transform: translateX(-50%);
z-index: 100;
display: flex;
align-items: center;
gap: 22px;
padding: 9px 10px 9px 10px;
border-radius: 999px;
background: var(--island-bg);
border: 1px solid var(--border);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
box-shadow: var(--island-shadow);
white-space: nowrap;
transition: background 0.3s ease, border-color 0.3s ease;
}
.logo {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 7px 16px;
border-radius: 999px;
color: var(--text);
font-weight: 600;
font-size: 15px;
letter-spacing: 0.5px;
text-decoration: none;
}
.logo-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--text);
box-shadow: 0 0 8px var(--text-dim);
}
.nav-links {
display: flex;
align-items: center;
gap: 24px;
}
.nav-link {
color: var(--text-dim);
text-decoration: none;
font-size: 15px;
cursor: pointer;
padding: 2px 0;
border-bottom: 1px solid transparent;
transition: color 0.25s ease, border-color 0.25s ease;
}
.nav-link:hover {
color: var(--text);
}
.nav-link.active {
color: var(--text);
border-bottom-color: var(--text);
}
/* ===== 单页三屏滑动 ===== */
.pages-viewport {
flex: 1;
width: 100%;
/* 只在横向裁剪;纵向交给窗口滚动,避免出现多余的滚动容器 */
overflow-x: hidden;
overflow-y: visible;
overscroll-behavior-x: contain;
/* 纵向滚动交给浏览器,横向手势由脚本接管 */
touch-action: pan-y;
}
/* 用 clip 规避 overflow 单轴 visible 被强制计算成 auto 的陷阱:
规范规定 overflow-x 与 overflow-y 中一个为 visible、另一个不为 visible 时,
visible 会被计算成 auto,从而意外产生纵向滚动容器。clip 不在该转换之列。 */
@supports (overflow: clip) {
.pages-viewport {
overflow-x: clip;
}
}
/* 老浏览器(Safari ≤15 等不支持 overflow: clip)的回退 */
@supports not (overflow: clip) {
.pages-viewport {
overflow-y: clip;
}
}
.pages-track {
display: flex;
width: 100%;
transition: transform 0.58s cubic-bezier(0.22, 0.61, 0.36, 1);
}
/* 拖动过程中跟手,不要过渡动画;只有拖动时才提升为常驻合成层 */
.pages-track.dragging {
will-change: transform;
transition: none;
}
.page {
flex: 0 0 100%;
min-width: 0;
display: flex;
flex-direction: column;
}
.swipe-hint {
text-align: center;
font-size: 12.5px;
color: var(--text-dim);
padding: 0 24px 34px;
opacity: 0.75;
user-select: none;
}
/* ===== 关于页 ===== */
.about {
width: 100%;
max-width: 720px;
margin: 0 auto;
padding: 40px 24px 60px;
}
.about-p {
margin-top: 18px;
font-size: 15px;
line-height: 1.9;
color: var(--text-mid);
}
.theme-toggle {
width: 38px;
height: 38px;
border-radius: 50%;
border: 1px solid var(--border);
background: transparent;
color: var(--text);
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
transition: border-color 0.2s ease, transform 0.2s ease;
}
.theme-toggle:hover {
border-color: var(--text-dim);
transform: rotate(15deg);
}
[data-theme="dark"] .icon-moon {
display: none;
}
[data-theme="light"] .icon-sun {
display: none;
}
/* ===== 主区 ===== */
.hero {
flex: 1;
width: 100%;
max-width: 960px;
margin: 0 auto;
padding: 60px 24px 60px;
display: flex;
align-items: center;
gap: clamp(28px, 6vw, 72px);
}
/* 光晕改用两层固定图层交叉淡入:radial-gradient 无法插值,直接换变量会在切主题时闪一下 */
.avatar-wrap {
position: relative;
flex-shrink: 0;
padding: 26px;
border-radius: 50%;
}
.avatar-wrap::before,
.avatar-wrap::after {
content: "";
position: absolute;
inset: 0;
border-radius: 50%;
pointer-events: none;
transition: opacity 1.1s ease;
}
.avatar-wrap::before {
background: radial-gradient(circle, var(--halo) 0%, transparent 70%);
}
.avatar-wrap::after {
background: radial-gradient(circle, var(--halo-overlay) 0%, transparent 70%);
opacity: 0;
}
[data-theme="light"] .avatar-wrap::after {
opacity: 1;
}
.avatar {
position: relative;
z-index: 1;
width: 200px;
height: 200px;
border-radius: 50%;
object-fit: cover;
display: block;
border: 1px solid var(--avatar-border);
box-shadow: var(--avatar-glow);
transition: box-shadow 0.3s ease;
}
.intro {
max-width: 480px;
animation: rise 0.6s ease both;
}
.name {
font-size: 44px;
font-weight: 700;
letter-spacing: 1px;
line-height: 1.2;
color: var(--text);
padding-bottom: 14px;
border-bottom: 1px solid var(--divider);
}
.tagline {
margin-top: 20px;
font-size: 18px;
color: var(--text-mid);
}
.bio {
margin-top: 10px;
font-size: 15px;
line-height: 1.8;
color: var(--text-dim);
}
.status {
margin-top: 14px;
font-size: 14px;
color: var(--text-dim);
display: flex;
align-items: center;
gap: 8px;
}
.status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--status-dot);
box-shadow: 0 0 6px var(--status-dot);
animation: blink 2s infinite;
}
/* ===== 页脚 ===== */
.footer {
text-align: center;
padding: 24px;
font-size: 13px;
color: var(--text-dim);
border-top: 1px solid var(--divider);
}
/* ===== 动画 ===== */
@keyframes rise {
from {
opacity: 0;
transform: translateY(14px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes blink {
0%, 100% { opacity: 1; }
50% { opacity: 0.35; }
}
/* ===== 响应式 ===== */
/* 纵向布局断点提到 880px:681–851px 区间横向排列会把介绍区压到仅约 309px 宽,
比 680px 以下的纵向布局更难看 */
@media (max-width: 880px) {
.hero {
flex-direction: column;
text-align: center;
gap: 24px;
padding-top: 24px;
}
.avatar-wrap {
padding: 18px;
}
.avatar {
width: 170px;
height: 170px;
}
.name {
font-size: 38px;
}
.status {
justify-content: center;
}
}
/* ===== 作品列表页 ===== */
.works {
flex: 1;
width: 100%;
max-width: 960px;
margin: 0 auto;
padding: 40px 24px 60px;
}
.works-title {
font-size: 34px;
font-weight: 700;
color: var(--text);
letter-spacing: 1px;
}
.works-sub {
margin-top: 8px;
font-size: 14px;
color: var(--text-dim);
}
.works-grid {
margin-top: 32px;
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 26px;
}
/* 1fr 实为 minmax(auto, 1fr),列宽受 item 的 min-content 约束;置 0 才不会因长名字撑开列 */
.works-grid > * {
min-width: 0;
}
.works-loading {
grid-column: 1 / -1;
padding: 60px 0;
text-align: center;
color: var(--text-dim);
font-size: 15px;
}
.work-card {
display: block;
border: 1px solid var(--border);
border-radius: 18px;
overflow: hidden;
background: var(--work-card-bg);
text-decoration: none;
transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease,
color 0.4s ease, background-color 0.4s ease;
}
.work-card:hover {
transform: translateY(-4px);
border-color: var(--text-dim);
box-shadow: var(--card-shadow-hover);
}
.work-card-img {
height: 190px;
overflow: hidden;
border-bottom: 1px solid var(--divider);
}
.work-card-img img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
transition: transform 0.35s ease;
}
.work-card:hover .work-card-img img {
transform: scale(1.04);
}
.work-card-body {
padding: 16px 18px 18px;
}
/* 不显示背景图时,卡片变成纯文字块,留白更舒展 */
.work-card.no-image .work-card-body {
padding: 22px 24px 24px;
}
.work-card.no-image .work-card-name {
font-size: 18px;
}
.work-card.no-image .work-card-desc {
-webkit-line-clamp: 3;
line-clamp: 3;
}
.work-card-name {
font-size: 17px;
font-weight: 600;
color: var(--text);
overflow-wrap: anywhere;
}
.work-card-desc {
margin-top: 6px;
font-size: 13.5px;
line-height: 1.6;
color: var(--text-dim);
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
/* ===== 单个作品页 ===== */
.work-page {
flex: 1;
width: 100%;
max-width: 860px;
margin: 0 auto;
padding: 40px 24px 60px;
}
.back-link {
display: inline-block;
color: var(--text-dim);
text-decoration: none;
font-size: 14px;
transition: color 0.2s ease;
}
.back-link:hover {
color: var(--text);
}
.work-hero {
margin-top: 20px;
height: 280px;
border-radius: 20px;
overflow: hidden;
border: 1px solid var(--border);
background: var(--work-card-bg);
}
.work-hero img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.work-name {
margin-top: 26px;
font-size: 32px;
font-weight: 700;
color: var(--text);
word-break: break-all;
}
.work-desc {
margin-top: 10px;
font-size: 15px;
line-height: 1.8;
color: var(--text-mid);
}
.work-meta {
margin-top: 16px;
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.meta-chip {
font-size: 12.5px;
padding: 5px 14px;
border-radius: 999px;
border: 1px solid var(--border);
color: var(--text-dim);
}
.work-section-title {
margin-top: 40px;
font-size: 20px;
font-weight: 600;
color: var(--text);
padding-bottom: 10px;
border-bottom: 1px solid var(--divider);
}
.dl-buttons {
margin-top: 18px;
display: flex;
flex-wrap: wrap;
gap: 12px;
}
.dl-btn {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 10px 22px;
border-radius: 999px;
font-size: 14px;
text-decoration: none;
border: 1px solid var(--border);
color: var(--text);
transition: border-color 0.2s ease, transform 0.15s ease, color 0.4s ease,
background-color 0.4s ease;
}
.dl-btn:hover {
border-color: var(--text-dim);
transform: translateY(-2px);
}
.dl-btn.primary {
background: var(--btn-solid-bg);
color: var(--btn-solid-text);
border-color: transparent;
font-weight: 600;
}
.release {
margin-top: 18px;
border: 1px solid var(--border);
border-radius: 14px;
overflow: hidden;
}
.release-head {
padding: 14px 18px;
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 12px;
flex-wrap: wrap;
border-bottom: 1px solid var(--divider);
}
.release-name {
font-size: 15.5px;
font-weight: 600;
color: var(--text);
}
.release-date {
font-size: 13px;
color: var(--text-dim);
}
.release-body {
padding: 14px 18px;
font-size: 14px;
line-height: 1.85;
color: var(--text-mid);
white-space: pre-wrap;
word-break: break-word;
}
.release-body a {
color: var(--text);
word-break: break-all;
}
.release-empty {
margin-top: 18px;
padding: 22px;
text-align: center;
color: var(--text-dim);
font-size: 14px;
border: 1px dashed var(--border);
border-radius: 14px;
}
/* ===== 响应式补充 =====
全站 680px 断点集中在此(原先在文件前部还有一份,会位于 .works-*/.work-* 基础规则之前,
将来往其中加覆盖会静默失效),合并后保持各组规则的相对先后顺序 */
@media (max-width: 680px) {
body {
padding-top: 84px;
}
.island {
top: 12px;
gap: 10px;
padding: 6px 6px 6px 8px;
max-width: calc(100vw - 20px);
}
.logo {
font-size: 13px;
padding: 6px 12px;
}
.nav-links {
gap: 12px;
}
.nav-link {
font-size: 13px;
}
.theme-toggle {
width: 34px;
height: 34px;
}
.works-grid {
grid-template-columns: 1fr;
gap: 20px;
}
.works-title {
font-size: 28px;
}
.work-hero {
height: 190px;
}
.work-name {
font-size: 26px;
}
}
/* 320px 超窄屏:岛是 nowrap 且 max-width: calc(100vw - 20px),再收紧一档避免溢出横向滚动条 */
@media (max-width: 380px) {
.island {
gap: 6px;
padding: 5px 5px 5px 7px;
}
.logo {
font-size: 12px;
padding: 5px 9px;
letter-spacing: 0;
}
.nav-links {
gap: 8px;
}
.nav-link {
font-size: 12px;
}
.theme-toggle {
width: 30px;
height: 30px;
}
}
@media (prefers-reduced-motion: reduce) {
.intro {
animation: none;
}
.status-dot {
animation: none;
}
.pages-track {
transition: none;
}
html.theme-animating :where(body, body *) {
transition-duration: 0.01s;
}
}