@xingwangzhe/stalux 1.29.8 → 1.30.1

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 (105) hide show
  1. package/README.md +5 -1
  2. package/package.json +10 -6
  3. package/src/components/stalux/archives/archivesList.astro +19 -15
  4. package/src/components/stalux/archives/toArchive.astro +2 -2
  5. package/src/components/stalux/categories/categoriesCard.astro +8 -7
  6. package/src/components/stalux/categories/categoriesList.astro +3 -2
  7. package/src/components/stalux/common/author.astro +8 -3
  8. package/src/components/stalux/common/date.astro +3 -4
  9. package/src/components/stalux/common/textType.astro +7 -2
  10. package/src/components/stalux/footer/FooterBadges.astro +9 -97
  11. package/src/components/stalux/footer/FooterBeian.astro +2 -44
  12. package/src/components/stalux/footer/FooterCopyright.astro +1 -16
  13. package/src/components/stalux/footer/FooterStats.astro +4 -25
  14. package/src/components/stalux/footer/FooterThemeInfo.astro +1 -28
  15. package/src/components/stalux/layout/footer.astro +3 -3
  16. package/src/components/stalux/layout/listPage.astro +3 -3
  17. package/src/components/stalux/layout/navs.astro +16 -13
  18. package/src/components/stalux/links/linkCard.astro +7 -6
  19. package/src/components/stalux/links/linkList.astro +4 -3
  20. package/src/components/stalux/links/socialMedia.astro +2 -2
  21. package/src/components/stalux/posts/PostTaxonomy.astro +13 -8
  22. package/src/components/stalux/posts/postAuthor.astro +6 -5
  23. package/src/components/stalux/posts/postCC.astro +10 -9
  24. package/src/components/stalux/posts/postCard.astro +19 -15
  25. package/src/components/stalux/posts/postContent.astro +22 -14
  26. package/src/components/stalux/posts/postLeft.astro +5 -4
  27. package/src/components/stalux/posts/postList.astro +2 -3
  28. package/src/components/stalux/posts/postNavigation.astro +24 -23
  29. package/src/components/stalux/posts/postRight.astro +7 -6
  30. package/src/components/stalux/posts/postToc.astro +7 -19
  31. package/src/components/stalux/posts/randomPost.astro +8 -7
  32. package/src/components/stalux/tags/tagHeader.astro +10 -6
  33. package/src/components/stalux/tags/tagsCloud.astro +10 -9
  34. package/src/components/stalux/words/wordCard.astro +11 -10
  35. package/src/components/stalux/words/wordList.astro +4 -3
  36. package/src/index.ts +5 -4
  37. package/src/internal/runtime-cache-key.ts +13 -1
  38. package/src/layouts/PostLayout.astro +3 -4
  39. package/src/layouts/Stalux.astro +0 -17
  40. package/src/pages/404.astro +9 -77
  41. package/src/pages/archives.astro +3 -3
  42. package/src/pages/categories/index.astro +3 -3
  43. package/src/pages/index.astro +6 -18
  44. package/src/pages/tags/index.astro +3 -3
  45. package/src/pages/words.astro +3 -3
  46. package/src/scripts/waline-client.ts +1 -1
  47. package/src/styles/archives.css +1 -0
  48. package/src/styles/article.css +1 -0
  49. package/src/styles/base.css +287 -0
  50. package/src/styles/categories.css +1 -0
  51. package/src/styles/content.css +471 -0
  52. package/src/styles/generated-archives.css +3 -0
  53. package/src/styles/generated-article.css +3 -0
  54. package/src/styles/generated-categories.css +3 -0
  55. package/src/styles/generated-links.css +3 -0
  56. package/src/styles/generated-prose.css +2 -0
  57. package/src/styles/generated-tags.css +3 -0
  58. package/src/styles/generated-waline.css +2 -0
  59. package/src/styles/generated-words.css +3 -0
  60. package/src/styles/generated.css +3 -0
  61. package/src/styles/{components/posts/waline.css → integrations.css} +19 -23
  62. package/src/styles/links.css +1 -0
  63. package/src/styles/{shared/view-transitions.css → motion.css} +96 -0
  64. package/src/styles/prose.css +1 -0
  65. package/src/styles/tags.css +1 -0
  66. package/src/styles/theme.css +1 -0
  67. package/src/styles/words.css +1 -0
  68. package/src/styles/base/init.css +0 -287
  69. package/src/styles/components/archives/archivesList.module.css +0 -203
  70. package/src/styles/components/archives/toArchive.module.css +0 -3
  71. package/src/styles/components/categories/categoriesCard.module.css +0 -88
  72. package/src/styles/components/categories/categoriesList.module.css +0 -23
  73. package/src/styles/components/common/author.module.css +0 -72
  74. package/src/styles/components/common/date.module.css +0 -15
  75. package/src/styles/components/common/textType.module.css +0 -10
  76. package/src/styles/components/footer/footer.module.css +0 -44
  77. package/src/styles/components/layout/navs.module.css +0 -261
  78. package/src/styles/components/links/linkCard.module.css +0 -116
  79. package/src/styles/components/links/linkList.module.css +0 -54
  80. package/src/styles/components/links/socialLinks.module.css +0 -80
  81. package/src/styles/components/markdown.css +0 -523
  82. package/src/styles/components/posts/postAuthor.module.css +0 -31
  83. package/src/styles/components/posts/postCC.module.css +0 -138
  84. package/src/styles/components/posts/postCard.module.css +0 -167
  85. package/src/styles/components/posts/postContent.module.css +0 -238
  86. package/src/styles/components/posts/postLayout.module.css +0 -138
  87. package/src/styles/components/posts/postList.module.css +0 -25
  88. package/src/styles/components/posts/postNavigation.module.css +0 -186
  89. package/src/styles/components/posts/postSidebar.module.css +0 -59
  90. package/src/styles/components/posts/postTaxonomy.module.css +0 -87
  91. package/src/styles/components/posts/postToc.module.css +0 -74
  92. package/src/styles/components/posts/randomPost.module.css +0 -131
  93. package/src/styles/components/tags/tagHeader.module.css +0 -44
  94. package/src/styles/components/tags/tagsCloud.module.css +0 -155
  95. package/src/styles/components/words/wordCard.module.css +0 -136
  96. package/src/styles/components/words/wordList.module.css +0 -26
  97. package/src/styles/pages/archives.module.css +0 -22
  98. package/src/styles/pages/categories.module.css +0 -17
  99. package/src/styles/pages/home.module.css +0 -61
  100. package/src/styles/pages/listPage.module.css +0 -16
  101. package/src/styles/pages/tags.module.css +0 -16
  102. package/src/styles/pages/words.module.css +0 -16
  103. package/src/styles/shared/animations.css +0 -87
  104. package/src/styles/shared/stagger.css +0 -20
  105. /package/src/styles/{base/math.css → math.css} +0 -0
@@ -0,0 +1,287 @@
1
+ @layer base {
2
+ /* 全局设置 */
3
+ html,
4
+ body {
5
+ margin: 0;
6
+ width: 100%;
7
+ height: 100%;
8
+ color: white;
9
+ main {
10
+ flex: 1;
11
+ }
12
+ scrollbar-color: #4a4a4a #2a2a2a;
13
+ display: block;
14
+ font-family:
15
+ var(--font-body), "Noto Sans SC", "Noto Sans CJK SC", system-ui, -apple-system,
16
+ sans-serif;
17
+ -webkit-font-smoothing: antialiased;
18
+ -moz-osx-font-smoothing: grayscale;
19
+ text-rendering: optimizeLegibility;
20
+ }
21
+
22
+ html[data-clarity-id] {
23
+ opacity: 1 !important;
24
+ }
25
+ /* 将所有链接初始化为无视觉状态,但保留键盘可见焦点 */
26
+ a {
27
+ color: inherit;
28
+ text-decoration: none;
29
+ background-color: transparent;
30
+ cursor: pointer;
31
+ text-decoration-skip-ink: auto;
32
+ position: relative;
33
+ transition:
34
+ color 0.2s ease,
35
+ text-shadow 0.2s ease;
36
+ }
37
+
38
+ .a-none {
39
+ color: inherit !important;
40
+ text-decoration: none !important;
41
+ background-color: transparent;
42
+ cursor: pointer;
43
+ text-decoration-skip-ink: auto;
44
+ }
45
+
46
+ .a-none::after {
47
+ display: none !important;
48
+ }
49
+
50
+ /* 下划线动画 */
51
+ a::after {
52
+ content: "";
53
+ position: absolute;
54
+ left: 0;
55
+ bottom: -2px;
56
+ height: 1px;
57
+ width: 100%;
58
+ background: linear-gradient(90deg, var(--stalux-accent-color), var(--accent-50p));
59
+ transform: scaleX(0);
60
+ transform-origin: left;
61
+ transition: transform 0.25s cubic-bezier(0.25, 0.9, 0.2, 1);
62
+ pointer-events: none;
63
+ }
64
+
65
+ a:hover::after,
66
+ a:focus-visible::after,
67
+ a:active::after {
68
+ transform: scaleX(1);
69
+ }
70
+
71
+ a:hover,
72
+ a:active,
73
+ a:focus-visible {
74
+ text-decoration: none;
75
+ /* 保持颜色不变,避免 hover 时颜色跳变 */
76
+ }
77
+
78
+ a:focus {
79
+ outline: none;
80
+ }
81
+
82
+ a:focus-visible {
83
+ outline: 2px solid var(--stalux-accent-color);
84
+ outline-offset: 2px;
85
+ }
86
+ ul {
87
+ list-style: none;
88
+ padding: 0;
89
+ margin: 0;
90
+ }
91
+ .none {
92
+ display: none;
93
+ }
94
+ /* 布局:使 body 成为列 flex 容器,并让 main 填充可用高度 */
95
+ .stalux-root {
96
+ min-height: 100vh;
97
+ color: white;
98
+ }
99
+
100
+ /* 主内容至少撑满视口高度
101
+ * - 内容不足视口时:min-height 让 main = 100vh,页脚紧跟在视口下方
102
+ * - 内容超过视口时:main 自然撑高,页脚在内容末尾
103
+ * 不使用 flex,避免 flex-basis 限制导致内容溢出 main */
104
+ .stalux-main {
105
+ min-height: 100vh;
106
+ }
107
+
108
+ /* 默认 stalux 背景的 CSS 变量(非动态默认值) */
109
+ :root {
110
+ --stalux-bg-color: #202020;
111
+ --stalux-bg-filter: none;
112
+ --stalux-text-shadow: var(--stalux-accent-color) 0.08rem 0.08rem 0.18rem;
113
+ --stalux-accent-color: #eab308;
114
+ --stalux-accent-rgb: 234, 179, 8;
115
+ --surface-glass: var(--black-05p);
116
+ --surface-glass-shadow: var(--shadow-sidebar);
117
+
118
+ /* 卡片和标签颜色 Token(可在这里统一调整主题色/透明度) */
119
+ --card-bg: var(--surface-glass);
120
+ --card-border: rgba(255, 255, 255, 0.1);
121
+ --card-box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
122
+ --card-box-shadow-hover: 0 14px 28px rgba(0, 0, 0, 0.12);
123
+
124
+ --tag-bg: rgba(255, 255, 255, 0.12);
125
+ --tag-bg-hover: rgba(255, 255, 255, 0.18);
126
+ --category-bg: rgba(255, 255, 255, 0.08);
127
+ --category-bg-hover: rgba(255, 255, 255, 0.14);
128
+
129
+ --date-bg: rgba(66, 160, 255, 0.18);
130
+ --date-border: rgba(66, 160, 255, 0.25);
131
+ --updated-bg: rgba(255, 201, 71, 0.2);
132
+ --updated-border: rgba(255, 201, 71, 0.3);
133
+
134
+ /* 常用颜色值 */
135
+ --white-full: #ffffff;
136
+ --white-95p: rgba(255, 255, 255, 0.95);
137
+ --white-90p: rgba(255, 255, 255, 0.9);
138
+ --white-85p: rgba(255, 255, 255, 0.85);
139
+ --white-80p: rgba(255, 255, 255, 0.9);
140
+ --white-78p: rgba(255, 255, 255, 0.78);
141
+ --white-75p: rgba(255, 255, 255, 0.75);
142
+ --white-70p: rgba(255, 255, 255, 0.86);
143
+ --white-60p: rgba(255, 255, 255, 0.6);
144
+ --white-50p: rgba(255, 255, 255, 0.5);
145
+ --white-30p: rgba(255, 255, 255, 0.3);
146
+ --white-20p: rgba(255, 255, 255, 0.2);
147
+ --white-15p: rgba(255, 255, 255, 0.15);
148
+ --white-10p: rgba(255, 255, 255, 0.1);
149
+ --white-05p: rgba(255, 255, 255, 0.05);
150
+
151
+ --black-30p: rgba(0, 0, 0, 0.3);
152
+ --black-20p: rgba(0, 0, 0, 0.2);
153
+ --black-15p: rgba(0, 0, 0, 0.15);
154
+ --black-10p: rgba(0, 0, 0, 0.1);
155
+ --black-05p: rgba(0, 0, 0, 0.05);
156
+
157
+ /* 强调色变体 */
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);
167
+
168
+ /* 常用过渡和动画 */
169
+ --transition-fast: 0.18s ease;
170
+ --transition-medium: 0.2s ease;
171
+ --transition-normal: 0.25s ease;
172
+ --transition-slow: 0.3s ease;
173
+ --transition-slower: 0.5s ease;
174
+ --transition-slowest: 0.6s ease;
175
+
176
+ --easing-bounce: cubic-bezier(0.175, 0.885, 0.32, 1.275);
177
+
178
+ /* 常用间距值 */
179
+ --space-2xs: 0.25rem;
180
+ --space-xs: 0.75rem;
181
+ --space-sm: 0.5rem;
182
+ --space-md: 1rem;
183
+ --space-lg: 1.5rem;
184
+ --space-xl: 2rem;
185
+ --space-2xl: 3rem;
186
+ --space-3xl: 4rem;
187
+
188
+ /* 常用圆角半径值 */
189
+ --radius-sm: 4px;
190
+ --radius-md: 6px;
191
+ --radius-lg: 8px;
192
+ --radius-full: 9999px;
193
+
194
+ /* 常用阴影 */
195
+ --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.1);
196
+ --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.2);
197
+ --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.3);
198
+ --shadow-xl: 0 12px 26px rgba(0, 0, 0, 0.28);
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);
207
+ --shadow-dark: rgba(0, 0, 0, 0.753);
208
+
209
+ /* 语义化颜色 */
210
+ --muted-text: #bbb;
211
+
212
+ /* 字体族栈 */
213
+ --font-body: "Noto Sans SC", "Noto Sans CJK SC", system-ui, sans-serif;
214
+ /* --font-code 由 Astro Fonts API 提供;构建时将页面 CJK 子集追加为其回退。 */
215
+
216
+ /* 字体大小系统 */
217
+ --font-size-subtitle: 1.35rem;
218
+ --font-size-base: 1.1rem;
219
+ --font-size-small: 0.95rem;
220
+ --font-size-smaller: 0.9rem;
221
+ --font-size-tiny: 0.85rem;
222
+
223
+ /* 边框宽度 */
224
+ --border-thin: 1px;
225
+ --border-medium: 2px;
226
+ --border-thick: 3px;
227
+ }
228
+ ::-webkit-scrollbar {
229
+ width: 8px;
230
+ height: 8px;
231
+ }
232
+
233
+ ::-webkit-scrollbar-track {
234
+ background: #2a2a2a;
235
+ border-radius: 4px;
236
+ }
237
+
238
+ ::-webkit-scrollbar-thumb {
239
+ background: #4a4a4a;
240
+ border-radius: 4px;
241
+ transition: background 0.3s ease-out;
242
+ }
243
+
244
+ ::-webkit-scrollbar-thumb:hover {
245
+ background: #5a5a5a;
246
+ }
247
+
248
+ ::-webkit-scrollbar-corner {
249
+ background: #2a2a2a;
250
+ }
251
+
252
+ /* 背景层 - 双层随机背景,在路由切换时交叉淡入淡出 */
253
+ .bg-layer {
254
+ position: fixed;
255
+ inset: 0;
256
+ z-index: -10;
257
+ background-repeat: repeat;
258
+ background-size: auto;
259
+ background-position: center;
260
+ background-color: var(--stalux-bg-color, transparent);
261
+ filter: var(--stalux-bg-filter, none);
262
+ pointer-events: none;
263
+ opacity: 0;
264
+ transition: opacity 650ms ease-in-out;
265
+ /* 禁止浏览器强制色彩模式(高对比度/暗黑模式)调整背景图颜色 */
266
+ forced-color-adjust: none;
267
+ /* 关键:防止 Safari/WebKit 在暗色模式下自动调整 SVG 背景图颜色 */
268
+ color-scheme: only light;
269
+ }
270
+
271
+ @media (prefers-reduced-motion: reduce) {
272
+ .bg-layer {
273
+ transition-duration: 0ms;
274
+ }
275
+ }
276
+
277
+ /* footer 基础样式,保证页脚始终可见且不覆盖内容 */
278
+ footer {
279
+ padding: var(--space-lg) var(--space-md);
280
+ text-align: center;
281
+ color: var(--muted-text);
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);
286
+ }
287
+ }
@@ -0,0 +1 @@
1
+ @import "./generated-categories.css";