-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
810 lines (692 loc) · 14.9 KB
/
Copy pathstyle.css
File metadata and controls
810 lines (692 loc) · 14.9 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
801
802
803
804
805
806
807
808
809
810
/* ===== CSS 变量和基础样式 ===== */
:root {
--primary-color: #0d3b66;
--primary-light: #1a5490;
--primary-dark: #0a2d4d;
--accent-color: #f18f01;
--text-color: #2d3748;
--text-light: #718096;
--bg-light: #f7fafc;
--bg-lighter: #edf2f7;
--border-color: #e2e8f0;
--sidebar-width: 200px;
}
* {
box-sizing: border-box;
}
/* ===== 顶栏样式 ===== */
.topbar {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 70px;
background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
color: white;
padding: 0 30px;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
z-index: 1000;
box-shadow: 0 2px 8px rgba(13, 59, 102, 0.15);
}
.topbar h2 {
margin: 0;
font-size: 24px;
font-weight: 700;
letter-spacing: -0.5px;
color: white;
}
.menu-btn {
display: none;
background: none;
border: none;
color: white;
font-size: 28px;
cursor: pointer;
padding: 8px 15px;
margin-right: 10px;
transition: all 0.3s ease;
border-radius: 6px;
}
.menu-btn:hover {
background: rgba(255, 255, 255, 0.15);
transform: scale(1.1);
}
.menu-btn:active {
transform: scale(0.95);
}
.nav-links {
display: flex;
gap: 35px;
}
.topbar a {
color: white;
text-decoration: none;
white-space: nowrap;
font-size: 15px;
font-weight: 600;
position: relative;
transition: all 0.3s ease;
padding: 8px 0;
}
.topbar a::after {
content: '';
position: absolute;
bottom: -2px;
left: 0;
width: 0;
height: 2px;
background-color: var(--accent-color);
transition: width 0.3s ease;
}
.topbar a:hover {
color: #fff;
}
.topbar a:hover::after {
width: 100%;
}
/* ===== 页面整体布局 ===== */
body {
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
background: linear-gradient(135deg, #f8fafb 0%, #eef3f8 100%);
color: var(--text-color);
min-height: 100vh;
line-height: 1.6;
}
/* ===== 侧边栏样式 ===== */
.sidebar {
display: flex;
flex-direction: column;
align-items: stretch;
width: var(--sidebar-width, 200px);
background: white;
padding: 20px 15px;
box-sizing: border-box;
position: fixed;
top: 70px;
bottom: 0;
left: 0;
overflow-y: auto;
box-shadow: 2px 0 12px rgba(0, 0, 0, 0.08);
transition: transform 0.3s ease, width 0.3s ease;
z-index: 98;
}
.sidebar.hidden {
transform: translateX(-100%);
}
.sidebar h2 {
margin: 0 0 20px 0;
color: var(--primary-color);
font-size: 16px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 1px;
transition: color 0.3s ease;
}
/* ===== 侧边栏菜单列表 ===== */
.sidebar ul {
list-style-type: none;
padding: 0;
margin: 0;
width: 100%;
}
.sidebar > ul > li {
margin: 0 0 8px 0;
border-radius: 6px;
background: var(--bg-light);
overflow: hidden;
transition: all 0.3s ease;
}
.sidebar > ul > li:hover {
background: var(--bg-lighter);
box-shadow: 0 2px 8px rgba(13, 59, 102, 0.1);
}
.sidebar > ul > li > a {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 14px;
color: var(--primary-color);
text-decoration: none;
font-weight: 600;
font-size: 14px;
transition: all 0.3s ease;
cursor: pointer;
border: none;
background: none;
width: 100%;
text-align: left;
}
.sidebar > ul > li > a:hover {
color: var(--primary-light);
background: rgba(13, 59, 102, 0.08);
text-decoration: none;
}
.sidebar > ul > li > a.active {
color: var(--primary-light);
background: rgba(26, 84, 144, 0.15);
font-weight: 700;
}
/* ===== 折叠按钮 ===== */
.toggle-btn {
display: inline-block;
width: 18px;
height: 18px;
text-align: center;
line-height: 18px;
transition: transform 0.3s ease;
flex-shrink: 0;
font-size: 12px;
}
.toggle-btn.collapsed {
transform: rotate(-90deg);
}
/* ===== 二级菜单 ===== */
.sidebar ul ul {
padding: 0;
background: var(--bg-lighter);
max-height: 0;
overflow: hidden;
transition: max-height 0.3s ease, padding 0.3s ease;
}
.sidebar ul ul.expanded {
max-height: 1500px;
padding: 8px 0;
}
.sidebar ul ul li {
margin: 0;
border-bottom: 1px solid var(--border-color);
}
.sidebar ul ul li:last-child {
border-bottom: none;
}
.sidebar ul ul li a {
display: block;
padding: 10px 14px 10px 28px;
color: var(--text-light);
text-decoration: none;
font-weight: 500;
font-size: 13px;
transition: all 0.3s ease;
border-left: 3px solid transparent;
}
.sidebar ul ul li a:hover {
color: var(--primary-light);
background: rgba(26, 84, 144, 0.08);
border-left-color: var(--accent-color);
text-decoration: none;
}
.sidebar ul ul li a.active {
color: var(--primary-light);
background: rgba(26, 84, 144, 0.15);
border-left-color: var(--accent-color);
font-weight: 600;
}
/* ===== 简单链接菜单 ===== */
.sidebar a {
display: block;
margin: 0;
color: var(--primary-color);
text-decoration: none;
transition: all 0.3s ease;
font-weight: 500;
font-size: 14px;
padding: 8px 12px;
border-radius: 4px;
}
.sidebar a:hover {
color: var(--primary-light);
background: rgba(13, 59, 102, 0.08);
text-decoration: none;
}
.sidebar a.active {
font-weight: 700;
color: var(--primary-light);
background: rgba(26, 84, 144, 0.15);
border-radius: 6px;
padding: 8px 12px;
}
/* ===== 可拖拽分隔线 ===== */
.resizer {
position: fixed;
top: 70px;
left: calc(var(--sidebar-width, 200px));
width: 6px;
height: calc(100vh - 70px);
background: linear-gradient(to right, transparent, var(--border-color), transparent);
cursor: col-resize;
transition: background 0.2s ease;
z-index: 99;
user-select: none;
}
.resizer:hover {
background: linear-gradient(to right, transparent, var(--primary-color), transparent);
}
/* ===== 主体内容区 ===== */
.main {
margin-top: 70px;
margin-left: calc(var(--sidebar-width, 200px) + 40px);
padding: 50px 60px;
max-width: calc(100% - var(--sidebar-width, 200px) - 40px);
transition: margin-left 0.3s ease, max-width 0.3s ease;
background: white;
border-radius: 12px;
margin-right: 40px;
margin-bottom: 40px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
/* ===== 标题样式 ===== */
.main h1 {
color: var(--primary-color);
font-size: 36px;
margin: 50px 0 25px 0;
font-weight: 700;
letter-spacing: -0.8px;
border-bottom: 3px solid var(--accent-color);
padding-bottom: 12px;
display: inline-block;
}
.main h1:first-of-type {
margin-top: 0;
}
.main h2 {
color: var(--primary-color);
font-size: 28px;
margin: 40px 0 20px 0;
font-weight: 700;
letter-spacing: -0.5px;
}
.main h3 {
color: var(--primary-light);
font-size: 22px;
margin: 30px 0 15px 0;
font-weight: 600;
}
.main h4,
.main h5,
.main h6 {
color: var(--text-color);
margin: 20px 0 10px 0;
font-weight: 600;
}
/* ===== 段落和文本 ===== */
.main p {
line-height: 1.8;
font-size: 16px;
color: var(--text-color);
margin: 20px 0;
}
.main strong {
color: var(--primary-color);
font-weight: 700;
}
.main em {
color: var(--primary-light);
font-style: italic;
}
/* ===== 链接样式 ===== */
.main a {
color: var(--primary-light);
text-decoration: none;
font-weight: 600;
transition: all 0.3s ease;
border-bottom: 2px solid transparent;
}
.main a:hover {
color: var(--primary-color);
border-bottom-color: var(--accent-color);
}
/* ===== 列表样式 ===== */
.main ul,
.main ol {
margin: 20px 0;
padding-left: 30px;
line-height: 1.8;
}
.main li {
margin: 10px 0;
color: var(--text-color);
}
.main ul li::marker {
color: var(--accent-color);
font-weight: bold;
}
.main ol li::marker {
color: var(--primary-light);
font-weight: bold;
}
/* ===== 代码块样式 ===== */
.main code {
background: var(--bg-light);
color: #d73a49;
padding: 3px 6px;
border-radius: 4px;
font-family: 'Courier New', monospace;
font-size: 14px;
font-weight: 500;
}
.main pre {
background: var(--text-color);
color: #e1e4e8;
padding: 15px;
border-radius: 8px;
overflow-x: auto;
line-height: 1.5;
margin: 20px 0;
border-left: 4px solid var(--accent-color);
font-size: 14px;
}
.main pre code {
background: none;
color: #e1e4e8;
padding: 0;
border-radius: 0;
}
/* ===== 表格样式 ===== */
.main table {
width: 100%;
border-collapse: collapse;
margin: 25px 0;
font-size: 15px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
border-radius: 8px;
overflow: hidden;
}
.main table thead {
background: var(--primary-color);
color: white;
}
.main table th {
padding: 14px 16px;
font-weight: 700;
text-align: left;
border: none;
}
.main table td {
padding: 12px 16px;
border-bottom: 1px solid var(--border-color);
}
.main table tbody tr {
transition: background 0.3s ease;
}
.main table tbody tr:hover {
background: var(--bg-lighter);
}
.main table tbody tr:last-child td {
border-bottom: none;
}
/* ===== 引用块样式 ===== */
.main blockquote {
border-left: 4px solid var(--accent-color);
padding: 12px 18px;
margin: 20px 0;
background: var(--bg-light);
border-radius: 6px;
color: var(--text-light);
font-style: italic;
}
.main blockquote p {
margin: 0;
}
/* ===== 图片样式 ===== */
.main img {
max-width: 100%;
height: auto;
margin: 25px 0;
border-radius: 8px;
border: 1px solid var(--border-color);
transition: all 0.3s ease;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.main img:hover {
transform: translateY(-4px);
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}
/* ===== iframe 和视频 ===== */
.main iframe {
border: 1px solid var(--border-color);
margin: 20px 0;
border-radius: 8px;
max-width: 100%;
height: auto;
}
/* ===== 按钮样式 ===== */
button {
margin-right: 10px;
padding: 12px 24px;
cursor: pointer;
background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
color: white;
border: none;
border-radius: 6px;
font-weight: 600;
transition: all 0.3s ease;
box-shadow: 0 4px 12px rgba(13, 59, 102, 0.25);
font-size: 15px;
}
button:hover {
transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(13, 59, 102, 0.35);
}
button:active {
transform: translateY(0);
}
/* ===== 隐藏的标题块 ===== */
header#title-block-header {
display: none;
}
/* ===== 水平线 ===== */
.main hr {
border: none;
height: 2px;
background: linear-gradient(to right, transparent, var(--border-color), transparent);
margin: 40px 0;
}
/* ===== 响应式设计 - 平板 ===== */
@media (max-width: 1024px) {
:root {
--sidebar-width: 180px;
}
.main {
margin-left: calc(var(--sidebar-width, 180px) + 30px);
max-width: calc(100% - var(--sidebar-width, 180px) - 30px);
padding: 40px 40px;
margin-right: 30px;
}
.resizer {
left: calc(var(--sidebar-width, 180px));
}
.topbar h2 {
font-size: 20px;
}
.nav-links {
gap: 25px;
}
.main h1 {
font-size: 28px;
}
.main h2 {
font-size: 24px;
}
}
/* ===== 响应式设计 - 手机 ===== */
@media (max-width: 768px) {
:root {
--sidebar-width: 200px;
}
.topbar {
height: 60px;
padding: 0 15px;
}
.topbar h2 {
font-size: 18px;
order: 2;
}
.menu-btn {
display: block;
order: 1;
}
.nav-links {
display: none;
gap: 15px;
}
.sidebar {
width: 280px;
top: 60px;
box-shadow: -2px 0 12px rgba(0, 0, 0, 0.2);
}
.sidebar.hidden {
transform: translateX(-100%);
}
.sidebar h2 {
font-size: 15px;
margin-bottom: 15px;
}
.sidebar a {
padding: 10px 12px;
font-size: 13px;
}
.main {
margin-top: 60px;
margin-left: 20px;
max-width: calc(100% - 20px);
margin-right: 20px;
padding: 25px 20px;
}
.main h1 {
font-size: 26px;
margin: 30px 0 15px 0;
}
.main h2 {
font-size: 22px;
}
.main h3 {
font-size: 18px;
}
.main p {
font-size: 15px;
line-height: 1.7;
}
.main code {
font-size: 13px;
}
.main pre {
padding: 12px;
font-size: 12px;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
.main table {
font-size: 13px;
}
.main table th,
.main table td {
padding: 10px 12px;
}
.resizer {
display: none;
}
button {
padding: 10px 20px;
font-size: 14px;
}
}
/* ===== 超小屏幕 ===== */
@media (max-width: 480px) {
.topbar {
height: 55px;
padding: 0 10px;
}
.topbar h2 {
font-size: 16px;
}
.main {
padding: 20px 15px;
margin-left: 15px;
margin-right: 15px;
}
.main h1 {
font-size: 22px;
}
.main h2 {
font-size: 19px;
}
.main p {
font-size: 14px;
}
.main ul,
.main ol {
padding-left: 20px;
}
.main table {
font-size: 12px;
}
.main table th,
.main table td {
padding: 8px 10px;
}
}
/* ===== Homepage ===== */
.home-page .menu-btn {
display: none;
}
.home-page .main {
max-width: 980px;
margin: 110px auto 48px;
padding: 56px 64px;
}
.home-page .main h1:first-of-type {
display: block;
margin: 0 0 12px 0;
border-bottom: none;
padding-bottom: 0;
font-size: 42px;
}
.home-page .main h2 {
border-bottom: 1px solid var(--border-color);
padding-bottom: 8px;
font-size: 24px;
}
.home-page .main > p:first-of-type {
color: var(--text-light);
font-size: 18px;
max-width: 680px;
}
.home-page .main figure {
float: right;
margin: 0 0 28px 40px;
}
.home-page .main figure figcaption {
display: none;
}
.home-page .main img.profile-photo {
display: block;
width: 168px;
aspect-ratio: 1;
object-fit: cover;
margin: 0;
border-radius: 50%;
border: 4px solid white;
}
@media (max-width: 768px) {
.home-page .main {
margin: 82px 20px 28px;
max-width: none;
padding: 30px 24px;
}
.home-page .main h1:first-of-type {
font-size: 30px;
}
.home-page .main figure {
float: none;
display: block;
margin: 0 0 22px 0;
}
.home-page .main img.profile-photo {
width: 128px;
}
}