@xingwangzhe/stalux 1.28.4 → 1.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/.release/cli.mjs +1 -0
  2. package/README.md +6 -0
  3. package/package.json +1 -1
  4. package/src/components/stalux/analytics/umami.astro +1 -19
  5. package/src/components/stalux/archives/archivesList.astro +3 -3
  6. package/src/components/stalux/categories/categoriesList.astro +1 -1
  7. package/src/components/stalux/common/date.astro +21 -0
  8. package/src/components/stalux/posts/PostTaxonomy.astro +1 -6
  9. package/src/components/stalux/posts/postCard.astro +5 -1
  10. package/src/components/stalux/posts/postContent.astro +3 -4
  11. package/src/components/stalux/posts/postToc.astro +1 -6
  12. package/src/index.ts +6 -1
  13. package/src/internal/image-dimensions.ts +122 -0
  14. package/src/layouts/PostLayout.astro +3 -0
  15. package/src/layouts/Stalux.astro +4 -1
  16. package/src/pages/posts/[post].astro +1 -0
  17. package/src/schemas/config.ts +5 -0
  18. package/src/scripts/after-load.ts +27 -0
  19. package/src/scripts/clarity.ts +23 -16
  20. package/src/scripts/umami.ts +28 -0
  21. package/src/scripts/vercount.ts +20 -13
  22. package/src/scripts/waline-client.ts +23 -0
  23. package/src/scripts/waline.ts +29 -25
  24. package/src/styles/base/init.css +30 -17
  25. package/src/styles/components/archives/archivesList.module.css +11 -112
  26. package/src/styles/components/categories/categoriesCard.module.css +13 -7
  27. package/src/styles/components/categories/categoriesList.module.css +2 -5
  28. package/src/styles/components/layout/navs.module.css +4 -3
  29. package/src/styles/components/links/linkCard.module.css +13 -12
  30. package/src/styles/components/links/linkList.module.css +0 -13
  31. package/src/styles/components/posts/postCard.module.css +19 -21
  32. package/src/styles/components/posts/postContent.module.css +19 -11
  33. package/src/styles/components/posts/postLayout.module.css +5 -5
  34. package/src/styles/components/posts/postList.module.css +2 -1
  35. package/src/styles/components/posts/postNavigation.module.css +2 -3
  36. package/src/styles/components/posts/postSidebar.module.css +6 -4
  37. package/src/styles/components/posts/waline.css +3 -4
  38. package/src/styles/components/words/wordCard.module.css +9 -3
  39. package/src/styles/components/words/wordList.module.css +0 -13
  40. package/src/styles/shared/view-transitions.css +54 -234
  41. package/src/utils/accent-color.ts +24 -0
  42. package/src/utils/view-transitions.ts +30 -20
@@ -1,6 +1,3 @@
1
- import type { WalineInitOptions } from "@waline/client";
2
- import walineCss from "@waline/client/style?inline";
3
- import staluxWalineCss from "../styles/components/posts/waline.css?inline";
4
1
  import { createClientLogger } from "./logger";
5
2
  import { registerPageLifecycle } from "./page-runtime";
6
3
 
@@ -34,32 +31,39 @@ registerPageLifecycle("waline", () => {
34
31
 
35
32
  let disposed = false;
36
33
  let destroy: (() => void) | undefined;
34
+ let observer: IntersectionObserver | undefined;
37
35
 
38
- void import("@waline/client")
39
- .then((waline) => {
40
- if (disposed || !commentElement.isConnected) return;
41
- const style = document.createElement("style");
42
- style.dataset.staluxWaline = "true";
43
- style.textContent = `${walineCss}\n${staluxWalineCss}`;
44
- document.head.append(style);
45
- const options = {
46
- ...decoded,
47
- el: commentElement,
48
- serverURL: decoded.serverURL,
49
- path: typeof decoded.path === "string" ? decoded.path : window.location.pathname,
50
- } as WalineInitOptions;
51
- const instance = waline.init(options);
52
- destroy = () => instance?.destroy();
53
- logger.debug("comment widget initialized");
54
- })
55
- .catch((error) => {
56
- logger.warn(
57
- `comment assets failed to load (${error instanceof Error ? error.name : "unknown error"})`,
58
- );
59
- });
36
+ const load = () => {
37
+ observer?.disconnect();
38
+ observer = undefined;
39
+ void import("./waline-client")
40
+ .then(({ mountWaline }) => {
41
+ if (disposed || !commentElement.isConnected) return;
42
+ destroy = mountWaline(decoded, commentElement);
43
+ logger.debug("comment widget initialized near viewport");
44
+ })
45
+ .catch((error) => {
46
+ logger.warn(
47
+ `comment assets failed to load (${error instanceof Error ? error.name : "unknown error"})`,
48
+ );
49
+ });
50
+ };
51
+
52
+ if ("IntersectionObserver" in window) {
53
+ observer = new IntersectionObserver(
54
+ (entries) => {
55
+ if (entries.some((entry) => entry.isIntersecting)) load();
56
+ },
57
+ { rootMargin: "1000px 0px" },
58
+ );
59
+ observer.observe(container);
60
+ } else {
61
+ load();
62
+ }
60
63
 
61
64
  return () => {
62
65
  disposed = true;
66
+ observer?.disconnect();
63
67
  destroy?.();
64
68
  };
65
69
  });
@@ -56,7 +56,7 @@ a::after {
56
56
  bottom: -2px;
57
57
  height: 1px;
58
58
  width: 100%;
59
- background: linear-gradient(90deg, var(--stalux-accent-color), rgba(100, 255, 218, 0.5));
59
+ background: linear-gradient(90deg, var(--stalux-accent-color), var(--accent-50p));
60
60
  transform: scaleX(0);
61
61
  transform-origin: left;
62
62
  transition: transform 0.25s cubic-bezier(0.25, 0.9, 0.2, 1);
@@ -110,14 +110,17 @@ ul {
110
110
  :root {
111
111
  --stalux-bg-color: #202020;
112
112
  --stalux-bg-filter: none;
113
- --stalux-text-shadow: #64ffda 0.1rem 0.1rem 0.2rem;
114
- --stalux-accent-color: #64ffda;
113
+ --stalux-text-shadow: var(--stalux-accent-color) 0.08rem 0.08rem 0.18rem;
114
+ --stalux-accent-color: #eab308;
115
+ --stalux-accent-rgb: 234, 179, 8;
116
+ --surface-glass: var(--black-10p);
117
+ --surface-glass-shadow: var(--shadow-sidebar);
115
118
 
116
119
  /* 卡片和标签颜色 Token(可在这里统一调整主题色/透明度) */
117
- --card-bg: rgba(0, 0, 0, 0.2);
120
+ --card-bg: var(--surface-glass);
118
121
  --card-border: rgba(255, 255, 255, 0.1);
119
- --card-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
120
- --card-box-shadow-hover: 0 8px 28px rgba(0, 0, 0, 0.5);
122
+ --card-box-shadow: var(--shadow-sidebar);
123
+ --card-box-shadow-hover: var(--shadow-raised-hover);
121
124
 
122
125
  --tag-bg: rgba(255, 255, 255, 0.12);
123
126
  --tag-bg-hover: rgba(255, 255, 255, 0.18);
@@ -152,15 +155,15 @@ ul {
152
155
  --black-10p: rgba(0, 0, 0, 0.1);
153
156
 
154
157
  /* 强调色变体 */
155
- --accent-90p: rgba(100, 255, 218, 0.9);
156
- --accent-85p: rgba(100, 255, 218, 0.85);
157
- --accent-80p: rgba(100, 255, 218, 0.8);
158
- --accent-70p: rgba(100, 255, 218, 0.7);
159
- --accent-60p: rgba(100, 255, 218, 0.6);
160
- --accent-50p: rgba(100, 255, 218, 0.5);
161
- --accent-40p: rgba(100, 255, 218, 0.4);
162
- --accent-30p: rgba(100, 255, 218, 0.3);
163
- --accent-20p: rgba(100, 255, 218, 0.2);
158
+ --accent-90p: rgba(var(--stalux-accent-rgb), 0.9);
159
+ --accent-85p: rgba(var(--stalux-accent-rgb), 0.85);
160
+ --accent-80p: rgba(var(--stalux-accent-rgb), 0.8);
161
+ --accent-70p: rgba(var(--stalux-accent-rgb), 0.7);
162
+ --accent-60p: rgba(var(--stalux-accent-rgb), 0.6);
163
+ --accent-50p: rgba(var(--stalux-accent-rgb), 0.5);
164
+ --accent-40p: rgba(var(--stalux-accent-rgb), 0.4);
165
+ --accent-30p: rgba(var(--stalux-accent-rgb), 0.3);
166
+ --accent-20p: rgba(var(--stalux-accent-rgb), 0.2);
164
167
 
165
168
  /* 常用过渡和动画 */
166
169
  --transition-fast: 0.18s ease;
@@ -193,7 +196,14 @@ ul {
193
196
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.2);
194
197
  --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.3);
195
198
  --shadow-xl: 0 12px 26px rgba(0, 0, 0, 0.28);
196
- --shadow-sidebar: 0 4px 6px rgba(0, 0, 0, 0.753);
199
+ --shadow-sidebar:
200
+ 0 16px 20px -12px rgba(0, 0, 0, 0.84),
201
+ 10px 4px 16px -12px rgba(0, 0, 0, 0.58),
202
+ -10px 4px 16px -12px rgba(0, 0, 0, 0.58);
203
+ --shadow-raised-hover:
204
+ 0 20px 24px -13px rgba(0, 0, 0, 0.9),
205
+ 12px 5px 18px -13px rgba(0, 0, 0, 0.68),
206
+ -12px 5px 18px -13px rgba(0, 0, 0, 0.68);
197
207
  --shadow-dark: rgba(0, 0, 0, 0.753);
198
208
 
199
209
  /* 语义化颜色 */
@@ -269,5 +279,8 @@ footer {
269
279
  padding: var(--space-lg) var(--space-md);
270
280
  text-align: center;
271
281
  color: var(--muted-text);
272
- background: transparent;
282
+ background: linear-gradient(180deg, rgba(12, 14, 18, 0.18), rgba(12, 14, 18, 0.72));
283
+ border-top: 1px solid var(--white-10p);
284
+ backdrop-filter: blur(16px);
285
+ -webkit-backdrop-filter: blur(16px);
273
286
  }
@@ -9,6 +9,7 @@
9
9
  --tl-line: var(--radius-sm);
10
10
  --tl-pad: var(--space-xl);
11
11
  padding-left: var(--tl-pad);
12
+ animation: contentReveal 220ms ease 360ms both;
12
13
  }
13
14
 
14
15
  .timelineContainer::before {
@@ -78,118 +79,7 @@
78
79
  background-color: var(--black-10p);
79
80
  border-radius: 0.5rem;
80
81
  width: 100%;
81
- }
82
-
83
- @keyframes fadeInUp {
84
- from {
85
- opacity: 0;
86
- transform: translateY(20px);
87
- }
88
- to {
89
- opacity: 1;
90
- transform: translateY(0);
91
- }
92
- }
93
-
94
- @keyframes fadeInLeft {
95
- from {
96
- opacity: 0;
97
- transform: translateX(-15px);
98
- }
99
- to {
100
- opacity: 1;
101
- transform: translateX(0);
102
- }
103
- }
104
-
105
- /* yearSection 子元素通用入场动画 */
106
- [data-year-header],
107
- [data-month-section],
108
- [data-post-item] {
109
- animation: fadeInUp 0.53s ease both;
110
- }
111
-
112
- [data-year-header] {
113
- animation-duration: 0.38s;
114
- }
115
-
116
- [data-post-item] {
117
- animation-name: fadeInLeft;
118
- animation-duration: 0.38s;
119
- }
120
-
121
- /* yearSection 内部阶梯延迟(yearHeader + monthSections 同为子元素) */
122
- [data-year-header]:nth-child(1) {
123
- animation-delay: 0s;
124
- }
125
-
126
- [data-month-section]:nth-child(2) {
127
- animation-delay: 0.18s;
128
- }
129
- [data-month-section]:nth-child(3) {
130
- animation-delay: 0.24s;
131
- }
132
- [data-month-section]:nth-child(4) {
133
- animation-delay: 0.3s;
134
- }
135
- [data-month-section]:nth-child(5) {
136
- animation-delay: 0.36s;
137
- }
138
- [data-month-section]:nth-child(6) {
139
- animation-delay: 0.42s;
140
- }
141
- [data-month-section]:nth-child(7) {
142
- animation-delay: 0.48s;
143
- }
144
- [data-month-section]:nth-child(8) {
145
- animation-delay: 0.54s;
146
- }
147
- [data-month-section]:nth-child(9) {
148
- animation-delay: 0.6s;
149
- }
150
- [data-month-section]:nth-child(10) {
151
- animation-delay: 0.66s;
152
- }
153
- [data-month-section]:nth-child(11) {
154
- animation-delay: 0.72s;
155
- }
156
- [data-month-section]:nth-child(12) {
157
- animation-delay: 0.78s;
158
- }
159
-
160
- /* postItem 阶梯延迟 */
161
- [data-post-item]:nth-child(1) {
162
- animation-delay: 0s;
163
- }
164
- [data-post-item]:nth-child(2) {
165
- animation-delay: 0.045s;
166
- }
167
- [data-post-item]:nth-child(3) {
168
- animation-delay: 0.09s;
169
- }
170
- [data-post-item]:nth-child(4) {
171
- animation-delay: 0.135s;
172
- }
173
- [data-post-item]:nth-child(5) {
174
- animation-delay: 0.18s;
175
- }
176
- [data-post-item]:nth-child(6) {
177
- animation-delay: 0.225s;
178
- }
179
- [data-post-item]:nth-child(7) {
180
- animation-delay: 0.27s;
181
- }
182
- [data-post-item]:nth-child(8) {
183
- animation-delay: 0.315s;
184
- }
185
- [data-post-item]:nth-child(9) {
186
- animation-delay: 0.36s;
187
- }
188
- [data-post-item]:nth-child(10) {
189
- animation-delay: 0.405s;
190
- }
191
- [data-post-item]:nth-child(n + 11) {
192
- animation-delay: 0.45s;
82
+ animation: stalux-content-reveal 220ms ease 360ms both;
193
83
  }
194
84
 
195
85
  /* 懒加载指示器样式 */
@@ -374,3 +264,12 @@
374
264
  font-size: 1.1rem;
375
265
  }
376
266
  }
267
+
268
+ @keyframes contentReveal {
269
+ from {
270
+ opacity: 0;
271
+ }
272
+ to {
273
+ opacity: 1;
274
+ }
275
+ }
@@ -4,11 +4,14 @@
4
4
  display: flex;
5
5
  flex-direction: column;
6
6
  padding: var(--space-lg);
7
- background-color: var(--white-05p);
7
+ background-color: var(--surface-glass);
8
8
  border-radius: 0.8rem;
9
- border: var(--border-thin) solid var(--white-10p);
10
9
  color: var(--white-full);
11
- transition: all var(--transition-slow);
10
+ box-shadow: var(--shadow-sidebar);
11
+ transition:
12
+ transform 220ms ease,
13
+ background-color 220ms ease,
14
+ box-shadow 220ms ease;
12
15
  overflow: hidden;
13
16
  height: fit-content;
14
17
  }
@@ -27,15 +30,14 @@
27
30
  rgba(255, 255, 255, 0)
28
31
  );
29
32
  transform: translateX(-100%);
30
- transition: transform 0.6s;
33
+ transition: transform 360ms ease;
31
34
  z-index: 1;
32
35
  }
33
36
 
34
37
  .categoryCard:hover {
35
38
  transform: translateY(-3px);
36
39
  background-color: rgba(255, 255, 255, 0.08);
37
- border-color: var(--accent-50p);
38
- box-shadow: var(--shadow-lg);
40
+ box-shadow: var(--shadow-raised-hover);
39
41
  }
40
42
 
41
43
  .categoryCard:hover::before {
@@ -71,7 +73,11 @@
71
73
  width: 28px;
72
74
  height: 28px;
73
75
  color: var(--white-50p);
74
- transition: all var(--transition-slower) var(--easing-bounce);
76
+ transition:
77
+ transform 240ms ease,
78
+ background-color 240ms ease,
79
+ color 240ms ease,
80
+ box-shadow 240ms ease;
75
81
  z-index: 2;
76
82
  transform-origin: center center;
77
83
  background: var(--black-15p);
@@ -11,17 +11,14 @@
11
11
  }
12
12
 
13
13
  .item {
14
- animation: fadeInUp 0.5s ease both;
15
- opacity: 0;
14
+ animation: contentReveal 220ms ease 360ms both;
16
15
  }
17
16
 
18
- @keyframes fadeInUp {
17
+ @keyframes contentReveal {
19
18
  from {
20
19
  opacity: 0;
21
- transform: translateY(20px);
22
20
  }
23
21
  to {
24
22
  opacity: 1;
25
- transform: translateY(0);
26
23
  }
27
24
  }
@@ -24,7 +24,7 @@ nav {
24
24
  min-width: 0;
25
25
  max-width: 100%;
26
26
  box-sizing: border-box;
27
- transition: transform 0.3s ease;
27
+ transition: transform 220ms cubic-bezier(0.22, 0.72, 0.22, 1);
28
28
  /* 当导航项总宽度超过视口时允许横向滚动,防止右侧项被裁剪 */
29
29
  flex-wrap: wrap;
30
30
  width: 100%;
@@ -213,7 +213,8 @@ nav {
213
213
  .navList {
214
214
  position: fixed;
215
215
  top: 0;
216
- right: 0;
216
+ left: 0;
217
+ right: auto;
217
218
  width: min(220px, calc(100vw - 1rem));
218
219
  height: 100vh;
219
220
  background: var(--black-20p);
@@ -223,7 +224,7 @@ nav {
223
224
  justify-content: flex-start;
224
225
  gap: 0;
225
226
  padding: 0.5rem 1rem 2rem 1rem;
226
- transform: translateX(100%);
227
+ transform: translateX(-100%);
227
228
  z-index: 1000;
228
229
  overflow-y: auto;
229
230
  pointer-events: none;
@@ -3,7 +3,7 @@
3
3
  .card {
4
4
  display: flex;
5
5
  flex-direction: column;
6
- background: var(--white-10p) !important;
6
+ background: var(--surface-glass);
7
7
  border-radius: 10px;
8
8
  padding: 16px;
9
9
  text-decoration: none;
@@ -12,16 +12,17 @@
12
12
  width: 180px;
13
13
  overflow: visible;
14
14
  transition:
15
- transform var(--transition-normal) ease,
16
- box-shadow var(--transition-normal) ease,
17
- background var(--transition-normal) ease;
18
- box-shadow: var(--shadow-md);
15
+ transform 220ms ease,
16
+ box-shadow 220ms ease,
17
+ background-color 220ms ease,
18
+ border-color 220ms ease;
19
+ box-shadow: var(--shadow-sidebar);
19
20
  }
20
21
 
21
22
  .card:hover {
22
- transform: translateY(-6px);
23
+ transform: translateY(-3px);
23
24
  background: #ffffff26;
24
- box-shadow: var(--shadow-xl);
25
+ box-shadow: var(--shadow-raised-hover);
25
26
  }
26
27
 
27
28
  .avatar {
@@ -38,13 +39,13 @@
38
39
  border: 2px solid var(--accent-60p);
39
40
  transform-origin: center;
40
41
  transition:
41
- transform 0.8s ease,
42
- box-shadow 0.3s ease,
43
- border-color 0.3s ease;
42
+ transform 220ms ease,
43
+ box-shadow 220ms ease,
44
+ border-color 220ms ease;
44
45
  }
45
46
 
46
47
  .card:hover .avatar img {
47
- transform: rotate(360deg) scale(1.1);
48
+ transform: rotate(5deg) scale(1.04);
48
49
  box-shadow: 0 0 20px var(--accent-50p);
49
50
  border-color: var(--accent-85p);
50
51
  }
@@ -59,7 +60,7 @@
59
60
  .title {
60
61
  font-size: 1.1rem;
61
62
  margin: 0 0 8px 0;
62
- background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(1, 162, 190, 0.9));
63
+ background: linear-gradient(90deg, var(--white-95p), var(--accent-90p));
63
64
  background-clip: text;
64
65
  -webkit-text-fill-color: transparent;
65
66
  white-space: nowrap;
@@ -12,22 +12,9 @@
12
12
  }
13
13
 
14
14
  .item {
15
- animation: fadeInUp 0.5s ease forwards;
16
- opacity: 0;
17
15
  display: flex;
18
16
  }
19
17
 
20
- @keyframes fadeInUp {
21
- from {
22
- opacity: 0;
23
- transform: translateY(20px);
24
- }
25
- to {
26
- opacity: 1;
27
- transform: translateY(0);
28
- }
29
- }
30
-
31
18
  /* 大屏幕:5个卡片一行 */
32
19
  @media (min-width: 1400px) {
33
20
  .list {
@@ -8,6 +8,7 @@
8
8
  .postTitle {
9
9
  margin: 0;
10
10
  line-height: 1.35;
11
+ overflow-wrap: anywhere;
11
12
  }
12
13
 
13
14
  .postTitle a {
@@ -18,41 +19,38 @@
18
19
  .postDescription {
19
20
  color: var(--white-70p);
20
21
  line-height: 1.6;
22
+ min-width: 0;
23
+ overflow-wrap: anywhere;
24
+ }
25
+
26
+ .postContainer > a:first-child {
27
+ display: block;
28
+ width: 100%;
29
+ min-width: 0;
21
30
  }
22
31
 
23
32
  .postContainer {
33
+ width: 100%;
34
+ min-width: 0;
35
+ box-sizing: border-box;
24
36
  background-color: var(--card-bg);
25
37
  border-radius: var(--radius-lg);
26
- border: var(--border-thin) solid var(--card-border);
27
38
  box-shadow: var(--card-box-shadow);
28
39
  padding: var(--space-lg);
29
40
  transition:
30
- transform var(--transition-fast) ease,
31
- box-shadow var(--transition-fast) ease;
41
+ transform 220ms cubic-bezier(0.22, 0.72, 0.22, 1),
42
+ box-shadow 220ms ease;
32
43
  cursor: pointer;
33
44
  display: flex;
34
45
  flex-direction: column;
35
46
  height: 100%;
36
47
  gap: var(--space-lg);
37
- box-sizing: border-box;
38
- opacity: 0;
39
- animation: fadeInUp 0.6s ease-in-out forwards;
40
- }
41
-
42
- @keyframes fadeInUp {
43
- from {
44
- transform: translateY(12px);
45
- opacity: 0;
46
- }
47
- to {
48
- transform: translateY(0);
49
- opacity: 1;
50
- }
51
48
  }
52
49
 
53
50
  /* 封面图片 */
54
51
  .postCover {
55
52
  width: 100%;
53
+ min-width: 0;
56
54
  height: 180px;
57
55
  border-radius: var(--radius-md);
58
56
  overflow: hidden;
@@ -62,6 +60,7 @@
62
60
 
63
61
  .postCover img {
64
62
  width: 100%;
63
+ max-width: 100%;
65
64
  height: 100%;
66
65
  object-fit: cover;
67
66
  transition: transform var(--transition-fast) ease;
@@ -82,13 +81,12 @@
82
81
  /* 卡片悬停和焦点效果 */
83
82
  .postContainer {
84
83
  transition:
85
- transform var(--transition-fast) ease,
86
- box-shadow var(--transition-fast) ease,
87
- opacity var(--transition-fast) ease;
84
+ transform 220ms cubic-bezier(0.22, 0.72, 0.22, 1),
85
+ box-shadow 220ms ease;
88
86
  }
89
87
  .postContainer:hover,
90
88
  .postContainer:focus-within {
91
- transform: translateY(-6px);
89
+ transform: translateY(-3px);
92
90
  box-shadow: var(--card-box-shadow-hover);
93
91
  }
94
92
 
@@ -10,19 +10,18 @@
10
10
  display: flex;
11
11
  flex-direction: column;
12
12
  box-sizing: border-box;
13
- background: var(--black-10p);
14
- border-radius: var(--radius-lg);
15
- padding: var(--space-xl);
16
- box-shadow: var(--shadow-sidebar);
17
- transition: all var(--transition-normal) ease;
13
+ background: var(--surface-glass);
14
+ border-radius: 18px;
15
+ padding: clamp(1.25rem, 3vw, 2.5rem);
16
+ box-shadow: var(--surface-glass-shadow);
18
17
  }
19
18
 
20
19
  /* 文章标题 */
21
20
  .articleHeader {
22
21
  margin-bottom: 3rem;
23
22
  padding-bottom: 2rem;
24
- animation: fadeInUp 0.6s ease forwards;
25
- opacity: 0;
23
+ border-bottom: 1px solid var(--white-10p);
24
+ animation: contentReveal 220ms ease 360ms both;
26
25
  }
27
26
 
28
27
  .title {
@@ -96,14 +95,13 @@
96
95
  /* 文章身体 */
97
96
  .body {
98
97
  flex: 1;
99
- animation: fadeInUp 0.6s ease 0.1s forwards;
100
- opacity: 0;
101
98
  /* 限制 Markdown 内容最大宽度,居中显示,避免侵占左右侧栏 */
102
99
  width: min(900px, 100%);
103
100
  max-width: 100%;
104
101
  margin: 0 auto;
105
102
  box-sizing: border-box;
106
103
  padding: 0 1rem 2rem;
104
+ animation: contentReveal 220ms ease 360ms both;
107
105
  }
108
106
 
109
107
  /* “查看 Markdown 原文”按钮 */
@@ -154,8 +152,16 @@
154
152
  margin-top: 3rem;
155
153
  padding-top: 2rem;
156
154
  border-top: 1px solid var(--white-10p);
157
- animation: fadeInUp 0.6s ease 0.2s forwards;
158
- opacity: 0;
155
+ animation: contentReveal 220ms ease 360ms both;
156
+ }
157
+
158
+ @keyframes contentReveal {
159
+ from {
160
+ opacity: 0;
161
+ }
162
+ to {
163
+ opacity: 1;
164
+ }
159
165
  }
160
166
 
161
167
  .footerContent {
@@ -182,6 +188,8 @@
182
188
  width: 100%;
183
189
  padding: 0;
184
190
  box-sizing: border-box;
191
+ background: transparent;
192
+ box-shadow: none;
185
193
  }
186
194
 
187
195
  .body {
@@ -10,9 +10,9 @@
10
10
  .container {
11
11
  flex: 1;
12
12
  display: grid;
13
- grid-template-columns: 280px 1fr 280px;
14
- gap: 4rem;
15
- max-width: 100%;
13
+ grid-template-columns: minmax(220px, 250px) minmax(0, 1fr) minmax(220px, 250px);
14
+ gap: clamp(1.5rem, 3vw, 3.5rem);
15
+ max-width: 1680px;
16
16
  margin: 0 auto;
17
17
  padding: 1.5rem 1rem;
18
18
  width: 100%;
@@ -42,8 +42,8 @@
42
42
  /* 大屏幕 */
43
43
  @media (min-width: 1600px) {
44
44
  .container {
45
- grid-template-columns: 300px 1fr 300px;
46
- gap: 4.5rem;
45
+ grid-template-columns: minmax(240px, 280px) minmax(0, 1fr) minmax(240px, 280px);
46
+ gap: 4rem;
47
47
  padding: 2rem 1.5rem;
48
48
  }
49
49
  }
@@ -18,7 +18,8 @@
18
18
  }
19
19
 
20
20
  ul > li {
21
- flex: 1 1 22rem; /* 最小宽度 22rem,自动填充每行 */
21
+ flex: 1 1 min(22rem, 100%);
22
+ min-width: 0;
22
23
  margin: 0;
23
24
  }
24
25
  }
@@ -29,8 +29,7 @@
29
29
  transform var(--transition-normal),
30
30
  box-shadow var(--transition-normal),
31
31
  color var(--transition-normal);
32
- border: var(--border-thin) solid var(--white-20p);
33
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
32
+ box-shadow: var(--shadow-sidebar);
34
33
  flex: 1 1 0;
35
34
  min-width: 0;
36
35
  position: relative;
@@ -53,7 +52,7 @@
53
52
 
54
53
  .postNavLink:hover {
55
54
  transform: translateY(-3px);
56
- box-shadow: 0 8px 16px var(--shadow-dark);
55
+ box-shadow: var(--shadow-raised-hover);
57
56
  }
58
57
 
59
58
  .postNavLink:hover::before {