@xingwangzhe/stalux 1.55.5 → 1.55.7
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.
- package/package.json +1 -1
- package/src/components/stalux/archives/archivesList.astro +60 -60
- package/src/components/stalux/archives/toArchive.astro +3 -2
- package/src/components/stalux/categories/categoriesCard.astro +34 -34
- package/src/components/stalux/categories/categoriesList.astro +3 -1
- package/src/components/stalux/common/Typewriter.astro +3 -2
- package/src/components/stalux/common/Weather.astro +3 -2
- package/src/components/stalux/common/date.astro +16 -12
- package/src/components/stalux/common/search.astro +3 -2
- package/src/components/stalux/footer/FooterBadges.astro +34 -24
- package/src/components/stalux/footer/FooterBeian.astro +3 -2
- package/src/components/stalux/footer/FooterStats.astro +3 -2
- package/src/components/stalux/footer/FooterThemeInfo.astro +3 -2
- package/src/components/stalux/layout/PageHeading.astro +5 -4
- package/src/components/stalux/layout/navs.astro +4 -3
- package/src/components/stalux/links/linkCard.astro +8 -6
- package/src/components/stalux/links/socialMedia.astro +2 -2
- package/src/components/stalux/posts/PostTaxonomy.astro +14 -11
- package/src/components/stalux/posts/WalineComment.astro +2 -2
- package/src/components/stalux/posts/postAuthor.astro +6 -6
- package/src/components/stalux/posts/postCC.astro +9 -7
- package/src/components/stalux/posts/postCard.astro +70 -72
- package/src/components/stalux/posts/postContent.astro +7 -6
- package/src/components/stalux/posts/postLeft.astro +7 -6
- package/src/components/stalux/posts/postList.astro +3 -2
- package/src/components/stalux/posts/postNavigation.astro +112 -106
- package/src/components/stalux/posts/postRight.astro +10 -8
- package/src/components/stalux/posts/postToc.astro +1 -1
- package/src/components/stalux/posts/randomPost.astro +3 -2
- package/src/components/stalux/tags/tagsCloud.astro +29 -21
- package/src/components/stalux/words/wordCard.astro +6 -4
- package/src/internal/style-names.generated.ts +177 -175
- package/src/pages/404.astro +4 -2
- package/src/pages/about.astro +3 -3
- package/src/pages/categories/[category].astro +2 -2
- package/src/pages/index.astro +9 -4
- package/src/pages/posts/[post].astro +0 -1
- package/src/pages/tags/[tag].astro +2 -2
- package/src/pages/words.md.ts +7 -2
- package/src/scripts/date-time.ts +15 -7
- package/src/scripts/random-posts.ts +26 -11
- package/src/styles/content.css +7 -0
- package/src/styles/generated-archives.css +1 -1
- package/src/styles/generated-article.css +1 -1
- package/src/styles/generated-cards.css +1 -1
- package/src/styles/generated-categories.css +1 -1
- package/src/styles/generated-home.css +1 -1
- package/src/styles/generated-links.css +1 -1
- package/src/styles/generated-prose.css +1 -1
- package/src/styles/generated-tags.css +1 -1
- package/src/styles/generated-words.css +1 -1
- package/src/styles/generated.css +1 -1
- package/src/styles/module-motion.css +1 -1
- package/src/utils/ai-discovery.ts +17 -3
- package/src/utils/content-index.ts +13 -4
|
@@ -22,41 +22,49 @@ const tagLinks = tagList.map((t) => ({
|
|
|
22
22
|
---
|
|
23
23
|
|
|
24
24
|
<!-- 移动端:SSR 卡片 -->
|
|
25
|
-
<
|
|
25
|
+
<!-- Modern Web Guidance (html): 标签是一组条目 => <ul>/<li>;空态是纯文字 => <p>。 -->
|
|
26
|
+
<section
|
|
27
|
+
class="stalux-cloud-cards"
|
|
28
|
+
id="tags-cards"
|
|
29
|
+
data-stalux-tag-cards
|
|
30
|
+
data-stalux-motion-content
|
|
31
|
+
aria-label={t("tags.title")}
|
|
32
|
+
>
|
|
26
33
|
{tagList.length > 0 ? (
|
|
27
34
|
tagGroups.map((group) => (
|
|
28
|
-
<
|
|
35
|
+
<ul class="stalux-cloud-tag-group" data-stalux-reveal>
|
|
29
36
|
{group.map(({ name, count }) => (
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
<li data-stalux-reveal-item>
|
|
38
|
+
<a
|
|
39
|
+
href={`/tags/${name}/`}
|
|
40
|
+
class="stalux-cloud-tag-card"
|
|
41
|
+
data-stalux-card
|
|
42
|
+
data-stalux-tag-card
|
|
43
|
+
data-stalux-control="tag-card"
|
|
44
|
+
data-count={count}
|
|
45
|
+
data-astro-prefetch
|
|
46
|
+
>
|
|
47
|
+
<span class="stalux-cloud-tag-name">{name}</span>
|
|
48
|
+
<span class="stalux-cloud-tag-count">{count}</span>
|
|
49
|
+
</a>
|
|
50
|
+
</li>
|
|
43
51
|
))}
|
|
44
|
-
</
|
|
52
|
+
</ul>
|
|
45
53
|
))
|
|
46
54
|
) : (
|
|
47
|
-
<
|
|
55
|
+
<p class="stalux-cloud-no-tags">{t("tags.noTags")}</p>
|
|
48
56
|
)}
|
|
49
|
-
</
|
|
57
|
+
</section>
|
|
50
58
|
|
|
51
|
-
<!-- 桌面端:Canvas
|
|
52
|
-
<
|
|
59
|
+
<!-- 桌面端:Canvas 标签云(可视化整体,用 <figure> 承载;内部节点是脚本挂载点) -->
|
|
60
|
+
<figure
|
|
53
61
|
class="stalux-cloud-canvas-frame"
|
|
54
62
|
data-stalux-tag-canvas
|
|
55
63
|
style={{ "--cloud-density": cloudDensity }}
|
|
56
64
|
data-stalux-motion-content
|
|
57
65
|
>
|
|
58
66
|
<div class="stalux-cloud-canvas" id="tags-canvas" data-tags={JSON.stringify(tagLinks)}></div>
|
|
59
|
-
</
|
|
67
|
+
</figure>
|
|
60
68
|
|
|
61
69
|
<script>
|
|
62
70
|
import "../../../scripts/tags-cloud";
|
|
@@ -25,9 +25,11 @@ const machineDate = date && timezone ? toMachineDateTime(date, timezone) : date;
|
|
|
25
25
|
id={abbrlink ? `word-${abbrlink}` : undefined}
|
|
26
26
|
>
|
|
27
27
|
<Quote class="stalux-word-mark" size={28} stroke-width={1.4} aria-hidden="true" />
|
|
28
|
-
|
|
28
|
+
<!-- Modern Web Guidance (html): 语录正文本身就是引用 => <blockquote>;
|
|
29
|
+
来源与日期是脚注性文字 => <footer> + <p>。 -->
|
|
30
|
+
<blockquote class="stalux-word-body stalux-prose" data-pagefind-body>
|
|
29
31
|
<Content />
|
|
30
|
-
</
|
|
32
|
+
</blockquote>
|
|
31
33
|
{(date || source || sourceDate || abbrlink) && (
|
|
32
34
|
<footer class="stalux-word-footer">
|
|
33
35
|
{abbrlink ? (
|
|
@@ -47,7 +49,7 @@ const machineDate = date && timezone ? toMachineDateTime(date, timezone) : date;
|
|
|
47
49
|
<span />
|
|
48
50
|
)}
|
|
49
51
|
{(source || sourceDate) && (
|
|
50
|
-
<
|
|
52
|
+
<p class="stalux-word-source-meta">
|
|
51
53
|
{sourceDate && <span class="stalux-word-source-date">{sourceDate}</span>}
|
|
52
54
|
{source &&
|
|
53
55
|
(link ? (
|
|
@@ -62,7 +64,7 @@ const machineDate = date && timezone ? toMachineDateTime(date, timezone) : date;
|
|
|
62
64
|
) : (
|
|
63
65
|
<span class="stalux-word-source-text">— {source}</span>
|
|
64
66
|
))}
|
|
65
|
-
</
|
|
67
|
+
</p>
|
|
66
68
|
)}
|
|
67
69
|
</footer>
|
|
68
70
|
)}
|
|
@@ -48,181 +48,183 @@ export const styleNames: { classes: Record<string, string>; variables: Record<st
|
|
|
48
48
|
"stalux-badge-group": "s18",
|
|
49
49
|
"stalux-badge-group-arrow": "s19",
|
|
50
50
|
"stalux-badge-group-hint": "s1a",
|
|
51
|
-
"stalux-badge-group-
|
|
52
|
-
"stalux-badge-group-
|
|
53
|
-
"stalux-badge-group-
|
|
54
|
-
"stalux-
|
|
55
|
-
"stalux-badges
|
|
56
|
-
"stalux-
|
|
57
|
-
"stalux-beian-
|
|
58
|
-
"stalux-
|
|
59
|
-
"stalux-byline-author-
|
|
60
|
-
"stalux-byline-author-
|
|
61
|
-
"stalux-byline-
|
|
62
|
-
"stalux-
|
|
63
|
-
"stalux-card-post-
|
|
64
|
-
"stalux-card-post-
|
|
65
|
-
"stalux-card-post-
|
|
66
|
-
"stalux-card-post-
|
|
67
|
-
"stalux-card-post-
|
|
68
|
-
"stalux-card-post-
|
|
69
|
-
"stalux-card-post-
|
|
70
|
-
"stalux-card-post-
|
|
71
|
-
"stalux-card-post-
|
|
72
|
-
"stalux-card-
|
|
73
|
-
"stalux-card-
|
|
74
|
-
"stalux-
|
|
75
|
-
"stalux-
|
|
76
|
-
"stalux-category-
|
|
77
|
-
"stalux-category-
|
|
78
|
-
"stalux-category-
|
|
79
|
-
"stalux-
|
|
80
|
-
"stalux-
|
|
81
|
-
"stalux-cloud-canvas
|
|
82
|
-
"stalux-cloud-
|
|
83
|
-
"stalux-cloud-
|
|
84
|
-
"stalux-cloud-
|
|
85
|
-
"stalux-cloud-tag-
|
|
86
|
-
"stalux-cloud-tag-
|
|
87
|
-
"stalux-cloud-tag-
|
|
88
|
-
"stalux-
|
|
89
|
-
"stalux-
|
|
90
|
-
"stalux-footer
|
|
91
|
-
"stalux-
|
|
92
|
-
"stalux-home-
|
|
93
|
-
"stalux-
|
|
94
|
-
"stalux-license-
|
|
95
|
-
"stalux-license-
|
|
96
|
-
"stalux-license-
|
|
97
|
-
"stalux-license-
|
|
98
|
-
"stalux-license-
|
|
99
|
-
"stalux-license-
|
|
100
|
-
"stalux-license-
|
|
101
|
-
"stalux-
|
|
102
|
-
"stalux-link-card
|
|
103
|
-
"stalux-link-card-
|
|
104
|
-
"stalux-link-card-
|
|
105
|
-
"stalux-link-card-
|
|
106
|
-
"stalux-link-
|
|
107
|
-
"stalux-link-
|
|
108
|
-
"stalux-
|
|
109
|
-
"stalux-
|
|
110
|
-
"stalux-
|
|
111
|
-
"stalux-nav-
|
|
112
|
-
"stalux-nav-
|
|
113
|
-
"stalux-nav-
|
|
114
|
-
"stalux-nav-
|
|
115
|
-
"stalux-nav-
|
|
116
|
-
"stalux-nav-
|
|
117
|
-
"stalux-nav-
|
|
118
|
-
"stalux-
|
|
119
|
-
"stalux-page-
|
|
120
|
-
"stalux-
|
|
121
|
-
"stalux-pagination
|
|
122
|
-
"stalux-pagination-
|
|
123
|
-
"stalux-pagination-
|
|
124
|
-
"stalux-pagination-
|
|
125
|
-
"stalux-pagination-
|
|
126
|
-
"stalux-pagination-
|
|
127
|
-
"stalux-pagination-
|
|
128
|
-
"stalux-pagination-
|
|
129
|
-
"stalux-pagination-
|
|
130
|
-
"stalux-
|
|
131
|
-
"stalux-
|
|
132
|
-
"stalux-post-
|
|
133
|
-
"stalux-post-
|
|
134
|
-
"stalux-post-
|
|
135
|
-
"stalux-post-
|
|
136
|
-
"stalux-post-
|
|
137
|
-
"stalux-post-
|
|
138
|
-
"stalux-post-
|
|
139
|
-
"stalux-post-
|
|
140
|
-
"stalux-post-
|
|
141
|
-
"stalux-post-
|
|
142
|
-
"stalux-post-
|
|
143
|
-
"stalux-post-
|
|
144
|
-
"stalux-post-
|
|
145
|
-
"stalux-post-
|
|
146
|
-
"stalux-post-
|
|
147
|
-
"stalux-post-
|
|
148
|
-
"stalux-post-taxonomy-
|
|
149
|
-
"stalux-post-taxonomy-
|
|
150
|
-
"stalux-post-taxonomy-
|
|
151
|
-
"stalux-post-taxonomy-
|
|
152
|
-
"stalux-post-taxonomy-list
|
|
153
|
-
"stalux-post-taxonomy-
|
|
154
|
-
"stalux-post-
|
|
155
|
-
"stalux-
|
|
156
|
-
"stalux-
|
|
157
|
-
"stalux-
|
|
158
|
-
"stalux-random-
|
|
159
|
-
"stalux-random-
|
|
160
|
-
"stalux-random-
|
|
161
|
-
"stalux-random-
|
|
162
|
-
"stalux-random-
|
|
163
|
-
"stalux-random-
|
|
164
|
-
"stalux-random-
|
|
165
|
-
"stalux-
|
|
166
|
-
"stalux-
|
|
167
|
-
"stalux-
|
|
168
|
-
"stalux-sidebar
|
|
169
|
-
"stalux-
|
|
170
|
-
"stalux-
|
|
171
|
-
"stalux-
|
|
172
|
-
"stalux-
|
|
173
|
-
"stalux-social
|
|
174
|
-
"stalux-
|
|
175
|
-
"stalux-
|
|
176
|
-
"stalux-stats-
|
|
177
|
-
"stalux-
|
|
178
|
-
"stalux-
|
|
179
|
-
"stalux-tag-
|
|
180
|
-
"stalux-tag-
|
|
181
|
-
"stalux-tag-
|
|
182
|
-
"stalux-tag-
|
|
183
|
-
"stalux-
|
|
184
|
-
"stalux-
|
|
185
|
-
"stalux-
|
|
186
|
-
"stalux-toc-
|
|
187
|
-
"stalux-toc-depth-
|
|
188
|
-
"stalux-toc-depth-
|
|
189
|
-
"stalux-toc-depth-
|
|
190
|
-
"stalux-toc-depth-
|
|
191
|
-
"stalux-toc-
|
|
192
|
-
"stalux-toc-
|
|
193
|
-
"stalux-toc-
|
|
194
|
-
"stalux-toc-
|
|
195
|
-
"stalux-
|
|
196
|
-
"stalux-
|
|
197
|
-
"stalux-typewriter
|
|
198
|
-
"stalux-typewriter-
|
|
199
|
-
"stalux-
|
|
200
|
-
"stalux-
|
|
201
|
-
"stalux-u-flex
|
|
202
|
-
"stalux-u-
|
|
203
|
-
"stalux-u-
|
|
204
|
-
"stalux-u-
|
|
205
|
-
"stalux-u-
|
|
206
|
-
"stalux-u-w-
|
|
207
|
-
"stalux-
|
|
208
|
-
"stalux-
|
|
209
|
-
"stalux-weather
|
|
210
|
-
"stalux-weather-
|
|
211
|
-
"stalux-weather-
|
|
212
|
-
"stalux-weather-
|
|
213
|
-
"stalux-weather-
|
|
214
|
-
"stalux-
|
|
215
|
-
"stalux-
|
|
216
|
-
"stalux-word-
|
|
217
|
-
"stalux-word-
|
|
218
|
-
"stalux-word-
|
|
219
|
-
"stalux-word-
|
|
220
|
-
"stalux-word-
|
|
221
|
-
"stalux-word-
|
|
222
|
-
"stalux-word-
|
|
223
|
-
"stalux-word-
|
|
224
|
-
"stalux-word-source-
|
|
225
|
-
"stalux-word-source-
|
|
51
|
+
"stalux-badge-group-item": "s1b",
|
|
52
|
+
"stalux-badge-group-items": "s1c",
|
|
53
|
+
"stalux-badge-group-summary": "s1d",
|
|
54
|
+
"stalux-badge-group-title": "s1e",
|
|
55
|
+
"stalux-badges": "s1f",
|
|
56
|
+
"stalux-badges-wrapper": "s1g",
|
|
57
|
+
"stalux-beian-beian-info": "s1h",
|
|
58
|
+
"stalux-beian-public-security-beian": "s1i",
|
|
59
|
+
"stalux-byline-author-bio": "s1j",
|
|
60
|
+
"stalux-byline-author-card": "s1k",
|
|
61
|
+
"stalux-byline-author-section": "s1l",
|
|
62
|
+
"stalux-byline-sidebar-container": "s1m",
|
|
63
|
+
"stalux-card-post-categories": "s1n",
|
|
64
|
+
"stalux-card-post-category": "s1o",
|
|
65
|
+
"stalux-card-post-cover": "s1p",
|
|
66
|
+
"stalux-card-post-date": "s1q",
|
|
67
|
+
"stalux-card-post-description": "s1r",
|
|
68
|
+
"stalux-card-post-meta": "s1s",
|
|
69
|
+
"stalux-card-post-tag": "s1t",
|
|
70
|
+
"stalux-card-post-tags": "s1u",
|
|
71
|
+
"stalux-card-post-title": "s1v",
|
|
72
|
+
"stalux-card-post-updated": "s1w",
|
|
73
|
+
"stalux-card-read-more": "s1x",
|
|
74
|
+
"stalux-card-time": "s1y",
|
|
75
|
+
"stalux-categories": "s1z",
|
|
76
|
+
"stalux-category-card": "s20",
|
|
77
|
+
"stalux-category-content": "s21",
|
|
78
|
+
"stalux-category-icon": "s22",
|
|
79
|
+
"stalux-category-shell": "s23",
|
|
80
|
+
"stalux-categoryheader": "s24",
|
|
81
|
+
"stalux-cloud-canvas": "s25",
|
|
82
|
+
"stalux-cloud-canvas-frame": "s26",
|
|
83
|
+
"stalux-cloud-cards": "s27",
|
|
84
|
+
"stalux-cloud-no-tags": "s28",
|
|
85
|
+
"stalux-cloud-tag-card": "s29",
|
|
86
|
+
"stalux-cloud-tag-count": "s2a",
|
|
87
|
+
"stalux-cloud-tag-group": "s2b",
|
|
88
|
+
"stalux-cloud-tag-name": "s2c",
|
|
89
|
+
"stalux-copyright": "s2d",
|
|
90
|
+
"stalux-footer": "s2e",
|
|
91
|
+
"stalux-footer-content": "s2f",
|
|
92
|
+
"stalux-home-body": "s2g",
|
|
93
|
+
"stalux-home-title": "s2h",
|
|
94
|
+
"stalux-license-author": "s2i",
|
|
95
|
+
"stalux-license-box": "s2j",
|
|
96
|
+
"stalux-license-content": "s2k",
|
|
97
|
+
"stalux-license-icon": "s2l",
|
|
98
|
+
"stalux-license-license": "s2m",
|
|
99
|
+
"stalux-license-title": "s2n",
|
|
100
|
+
"stalux-license-url": "s2o",
|
|
101
|
+
"stalux-license-watermark": "s2p",
|
|
102
|
+
"stalux-link-card": "s2q",
|
|
103
|
+
"stalux-link-card-avatar": "s2r",
|
|
104
|
+
"stalux-link-card-content": "s2s",
|
|
105
|
+
"stalux-link-card-description": "s2t",
|
|
106
|
+
"stalux-link-card-title": "s2u",
|
|
107
|
+
"stalux-link-list-item": "s2v",
|
|
108
|
+
"stalux-link-shell": "s2w",
|
|
109
|
+
"stalux-links": "s2x",
|
|
110
|
+
"stalux-main": "s2y",
|
|
111
|
+
"stalux-nav-container": "s2z",
|
|
112
|
+
"stalux-nav-item": "s30",
|
|
113
|
+
"stalux-nav-link": "s31",
|
|
114
|
+
"stalux-nav-list": "s32",
|
|
115
|
+
"stalux-nav-overlay": "s33",
|
|
116
|
+
"stalux-nav-scroll-btn": "s34",
|
|
117
|
+
"stalux-nav-text": "s35",
|
|
118
|
+
"stalux-nav-toggle": "s36",
|
|
119
|
+
"stalux-page-description": "s37",
|
|
120
|
+
"stalux-page-title": "s38",
|
|
121
|
+
"stalux-pagination": "s39",
|
|
122
|
+
"stalux-pagination-arrow": "s3a",
|
|
123
|
+
"stalux-pagination-content": "s3b",
|
|
124
|
+
"stalux-pagination-disabled": "s3c",
|
|
125
|
+
"stalux-pagination-inner": "s3d",
|
|
126
|
+
"stalux-pagination-item": "s3e",
|
|
127
|
+
"stalux-pagination-label": "s3f",
|
|
128
|
+
"stalux-pagination-link": "s3g",
|
|
129
|
+
"stalux-pagination-next-post": "s3h",
|
|
130
|
+
"stalux-pagination-prev-post": "s3i",
|
|
131
|
+
"stalux-pagination-title": "s3j",
|
|
132
|
+
"stalux-post-article-footer": "s3k",
|
|
133
|
+
"stalux-post-article-header": "s3l",
|
|
134
|
+
"stalux-post-body": "s3m",
|
|
135
|
+
"stalux-post-card": "s3n",
|
|
136
|
+
"stalux-post-card-shell": "s3o",
|
|
137
|
+
"stalux-post-footer-content": "s3p",
|
|
138
|
+
"stalux-post-layout": "s3q",
|
|
139
|
+
"stalux-post-list-container": "s3r",
|
|
140
|
+
"stalux-post-meta-item": "s3s",
|
|
141
|
+
"stalux-post-meta-row": "s3t",
|
|
142
|
+
"stalux-post-metadata": "s3u",
|
|
143
|
+
"stalux-post-page": "s3v",
|
|
144
|
+
"stalux-post-page-stats": "s3w",
|
|
145
|
+
"stalux-post-reading-time": "s3x",
|
|
146
|
+
"stalux-post-source-link": "s3y",
|
|
147
|
+
"stalux-post-source-link-row": "s3z",
|
|
148
|
+
"stalux-post-taxonomy-container": "s40",
|
|
149
|
+
"stalux-post-taxonomy-empty": "s41",
|
|
150
|
+
"stalux-post-taxonomy-item-column": "s42",
|
|
151
|
+
"stalux-post-taxonomy-item-pill": "s43",
|
|
152
|
+
"stalux-post-taxonomy-list": "s44",
|
|
153
|
+
"stalux-post-taxonomy-list-column": "s45",
|
|
154
|
+
"stalux-post-taxonomy-list-wrap": "s46",
|
|
155
|
+
"stalux-post-taxonomy-title": "s47",
|
|
156
|
+
"stalux-post-title": "s48",
|
|
157
|
+
"stalux-prose": "s49",
|
|
158
|
+
"stalux-random-container": "s4a",
|
|
159
|
+
"stalux-random-error": "s4b",
|
|
160
|
+
"stalux-random-header": "s4c",
|
|
161
|
+
"stalux-random-list": "s4d",
|
|
162
|
+
"stalux-random-loading": "s4e",
|
|
163
|
+
"stalux-random-no-more": "s4f",
|
|
164
|
+
"stalux-random-refresh": "s4g",
|
|
165
|
+
"stalux-random-rotating": "s4h",
|
|
166
|
+
"stalux-random-title": "s4i",
|
|
167
|
+
"stalux-root": "s4j",
|
|
168
|
+
"stalux-sidebar": "s4k",
|
|
169
|
+
"stalux-sidebar-container": "s4l",
|
|
170
|
+
"stalux-sidebar-right": "s4m",
|
|
171
|
+
"stalux-site-header": "s4n",
|
|
172
|
+
"stalux-site-nav": "s4o",
|
|
173
|
+
"stalux-social": "s4p",
|
|
174
|
+
"stalux-social-custom-icon": "s4q",
|
|
175
|
+
"stalux-social-icon-container": "s4r",
|
|
176
|
+
"stalux-stats-site-build-time": "s4s",
|
|
177
|
+
"stalux-stats-site-stats": "s4t",
|
|
178
|
+
"stalux-stats-stats-separator": "s4u",
|
|
179
|
+
"stalux-tag-back-link": "s4v",
|
|
180
|
+
"stalux-tag-category-icon": "s4w",
|
|
181
|
+
"stalux-tag-category-name": "s4x",
|
|
182
|
+
"stalux-tag-header": "s4y",
|
|
183
|
+
"stalux-tag-page-description": "s4z",
|
|
184
|
+
"stalux-tag-page-title": "s50",
|
|
185
|
+
"stalux-theme-info": "s51",
|
|
186
|
+
"stalux-toc-active": "s52",
|
|
187
|
+
"stalux-toc-depth-1": "s53",
|
|
188
|
+
"stalux-toc-depth-2": "s54",
|
|
189
|
+
"stalux-toc-depth-3": "s55",
|
|
190
|
+
"stalux-toc-depth-4": "s56",
|
|
191
|
+
"stalux-toc-depth-5": "s57",
|
|
192
|
+
"stalux-toc-depth-6": "s58",
|
|
193
|
+
"stalux-toc-empty": "s59",
|
|
194
|
+
"stalux-toc-item": "s5a",
|
|
195
|
+
"stalux-toc-list": "s5b",
|
|
196
|
+
"stalux-toc-title": "s5c",
|
|
197
|
+
"stalux-typewriter": "s5d",
|
|
198
|
+
"stalux-typewriter-accessible": "s5e",
|
|
199
|
+
"stalux-typewriter-reserve": "s5f",
|
|
200
|
+
"stalux-typewriter-text": "s5g",
|
|
201
|
+
"stalux-u-flex": "s5h",
|
|
202
|
+
"stalux-u-flex-col": "s5i",
|
|
203
|
+
"stalux-u-flex-wrap": "s5j",
|
|
204
|
+
"stalux-u-items-center": "s5k",
|
|
205
|
+
"stalux-u-justify-center": "s5l",
|
|
206
|
+
"stalux-u-min-w-0": "s5m",
|
|
207
|
+
"stalux-u-text-center": "s5n",
|
|
208
|
+
"stalux-u-w-full": "s5o",
|
|
209
|
+
"stalux-weather": "s5p",
|
|
210
|
+
"stalux-weather-footer": "s5q",
|
|
211
|
+
"stalux-weather-heading": "s5r",
|
|
212
|
+
"stalux-weather-location": "s5s",
|
|
213
|
+
"stalux-weather-main": "s5t",
|
|
214
|
+
"stalux-weather-source": "s5u",
|
|
215
|
+
"stalux-weather-status": "s5v",
|
|
216
|
+
"stalux-word-body": "s5w",
|
|
217
|
+
"stalux-word-card": "s5x",
|
|
218
|
+
"stalux-word-date": "s5y",
|
|
219
|
+
"stalux-word-footer": "s5z",
|
|
220
|
+
"stalux-word-list-item": "s60",
|
|
221
|
+
"stalux-word-list-list": "s61",
|
|
222
|
+
"stalux-word-mark": "s62",
|
|
223
|
+
"stalux-word-permalink": "s63",
|
|
224
|
+
"stalux-word-source-date": "s64",
|
|
225
|
+
"stalux-word-source-link": "s65",
|
|
226
|
+
"stalux-word-source-meta": "s66",
|
|
227
|
+
"stalux-word-source-text": "s67"
|
|
226
228
|
},
|
|
227
229
|
"variables": {
|
|
228
230
|
"--accent-20p": "--s0",
|
package/src/pages/404.astro
CHANGED
|
@@ -14,7 +14,9 @@ const { t } = createTranslator(siteConfig.lang || "zh-CN");
|
|
|
14
14
|
title={`${t("page404.title")} | ${siteConfig.title}`}
|
|
15
15
|
description={t("page404.description")}
|
|
16
16
|
>
|
|
17
|
-
<
|
|
17
|
+
<!-- Modern Web Guidance (html): 404 提示是一个内容分组 => <section>;
|
|
18
|
+
内层保留一个纯排版容器(居中 + motion-region),没有语义对等元素。 -->
|
|
19
|
+
<section
|
|
18
20
|
class="stalux-404-error-container stalux-u-flex stalux-u-items-center stalux-u-justify-center stalux-u-text-center"
|
|
19
21
|
data-pagefind-ignore
|
|
20
22
|
>
|
|
@@ -45,7 +47,7 @@ const { t } = createTranslator(siteConfig.lang || "zh-CN");
|
|
|
45
47
|
>{t("page404.backHome")}</a
|
|
46
48
|
>
|
|
47
49
|
</div>
|
|
48
|
-
</
|
|
50
|
+
</section>
|
|
49
51
|
|
|
50
52
|
<script src="../scripts/countdown.ts"></script>
|
|
51
53
|
</Stalux>
|
package/src/pages/about.astro
CHANGED
|
@@ -28,8 +28,8 @@ const author = authorConfig.name;
|
|
|
28
28
|
title={`${aboutPage.data.title} | ${siteConfig.title}`}
|
|
29
29
|
description={aboutPage.data.description}
|
|
30
30
|
>
|
|
31
|
-
|
|
32
|
-
<
|
|
31
|
+
<!-- Modern Web Guidance (html): 顶部留白并入容器自身的 margin,不再用空占位 <div>。 -->
|
|
32
|
+
<section style="max-width: 900px; margin: 5rem auto 2rem; padding: 0 1rem;">
|
|
33
33
|
<PostContent
|
|
34
34
|
title={aboutPage.data.title}
|
|
35
35
|
transitionName="about-content"
|
|
@@ -54,5 +54,5 @@ const author = authorConfig.name;
|
|
|
54
54
|
/>
|
|
55
55
|
)}
|
|
56
56
|
</PostContent>
|
|
57
|
-
</
|
|
57
|
+
</section>
|
|
58
58
|
</Stalux>
|
|
@@ -32,8 +32,8 @@ const props = Astro.props as Props;
|
|
|
32
32
|
count: props.count,
|
|
33
33
|
})}
|
|
34
34
|
>
|
|
35
|
-
<
|
|
35
|
+
<section id="swup-taxonomy">
|
|
36
36
|
<TagHeader type={t("taxonomy.category")} name={props.category} count={props.count} />
|
|
37
37
|
<PostList posts={props.posts} />
|
|
38
|
-
</
|
|
38
|
+
</section>
|
|
39
39
|
</Stalux>
|
package/src/pages/index.astro
CHANGED
|
@@ -20,8 +20,13 @@ import { getSiteData } from "@utils/config-utils";
|
|
|
20
20
|
---
|
|
21
21
|
|
|
22
22
|
<Stalux title={siteTitle} description={siteDescription}>
|
|
23
|
-
|
|
23
|
+
<!-- Modern Web Guidance (html): 首页主体是具名内容分组 => <section>;不再用 <div>。 -->
|
|
24
|
+
<section
|
|
25
|
+
class="stalux-home-body stalux-u-flex stalux-u-items-center stalux-u-flex-col"
|
|
26
|
+
aria-labelledby="stalux-home-title"
|
|
27
|
+
>
|
|
24
28
|
<h1
|
|
29
|
+
id="stalux-home-title"
|
|
25
30
|
class="stalux-home-title stalux-u-text-center"
|
|
26
31
|
data-stalux-motion-region
|
|
27
32
|
data-stalux-motion-focus
|
|
@@ -50,12 +55,12 @@ import { getSiteData } from "@utils/config-utils";
|
|
|
50
55
|
mutate data.
|
|
51
56
|
</p>
|
|
52
57
|
</section>
|
|
53
|
-
<
|
|
58
|
+
<section data-stalux-home-content data-stalux-motion-content>
|
|
54
59
|
<Author />
|
|
55
60
|
<TextType />
|
|
56
61
|
<DateTime />
|
|
57
62
|
<SocialMedia />
|
|
58
63
|
<ToArchive />
|
|
59
|
-
</
|
|
60
|
-
</
|
|
64
|
+
</section>
|
|
65
|
+
</section>
|
|
61
66
|
</Stalux>
|
|
@@ -34,8 +34,8 @@ const props = Astro.props as Props;
|
|
|
34
34
|
})}
|
|
35
35
|
noindex={props.count < 3}
|
|
36
36
|
>
|
|
37
|
-
<
|
|
37
|
+
<section id="swup-taxonomy">
|
|
38
38
|
<TagHeader type={t("taxonomy.tag")} name={props.tag} count={props.count} />
|
|
39
39
|
<PostList posts={props.posts} />
|
|
40
|
-
</
|
|
40
|
+
</section>
|
|
41
41
|
</Stalux>
|
package/src/pages/words.md.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
isMarkdownExportEnabled,
|
|
3
|
+
loadConfig,
|
|
4
|
+
renderWordsMd,
|
|
5
|
+
resolveSiteTimezone,
|
|
6
|
+
} from "@utils/ai-discovery";
|
|
2
7
|
import type { APIRoute } from "astro";
|
|
3
8
|
|
|
4
9
|
export const prerender = true;
|
|
@@ -7,7 +12,7 @@ export const GET: APIRoute = async () => {
|
|
|
7
12
|
const config = await loadConfig();
|
|
8
13
|
if (!isMarkdownExportEnabled(config)) return new Response(null, { status: 404 });
|
|
9
14
|
|
|
10
|
-
const text = await renderWordsMd();
|
|
15
|
+
const text = await renderWordsMd(resolveSiteTimezone(config));
|
|
11
16
|
return new Response(text, {
|
|
12
17
|
headers: {
|
|
13
18
|
"Content-Type": "text/markdown; charset=utf-8",
|
package/src/scripts/date-time.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { observeVisibleClock } from "./visible-clock";
|
|
|
3
3
|
|
|
4
4
|
const pad2 = (value: number) => String(value).padStart(2, "0");
|
|
5
5
|
|
|
6
|
+
/** 机器可读值必须与访客本地日历一致,因此按本地时间拼装(toISOString 是 UTC)。 */
|
|
6
7
|
function toMachineDate(date: Date): string {
|
|
7
8
|
return `${date.getFullYear()}-${pad2(date.getMonth() + 1)}-${pad2(date.getDate())}`;
|
|
8
9
|
}
|
|
@@ -11,15 +12,22 @@ function toMachineTime(date: Date): string {
|
|
|
11
12
|
return `${pad2(date.getHours())}:${pad2(date.getMinutes())}:${pad2(date.getSeconds())}`;
|
|
12
13
|
}
|
|
13
14
|
|
|
15
|
+
// Modern Web Guidance (javascript): 本地化日期交给 Intl.DateTimeFormat,
|
|
16
|
+
// 按语言缓存 formatter,避免每秒 tick 时重复构造。
|
|
17
|
+
const displayFormatters = new Map<string, Intl.DateTimeFormat>();
|
|
18
|
+
|
|
14
19
|
function toDisplayDate(date: Date, lang: string): string {
|
|
15
|
-
|
|
16
|
-
|
|
20
|
+
let formatter = displayFormatters.get(lang);
|
|
21
|
+
if (!formatter) {
|
|
22
|
+
const zh = lang.toLowerCase().startsWith("zh");
|
|
23
|
+
formatter = new Intl.DateTimeFormat(lang, {
|
|
24
|
+
year: "numeric",
|
|
25
|
+
month: zh ? "long" : "short",
|
|
26
|
+
day: "2-digit",
|
|
27
|
+
});
|
|
28
|
+
displayFormatters.set(lang, formatter);
|
|
17
29
|
}
|
|
18
|
-
return
|
|
19
|
-
year: "numeric",
|
|
20
|
-
month: "short",
|
|
21
|
-
day: "2-digit",
|
|
22
|
-
}).format(date);
|
|
30
|
+
return formatter.format(date);
|
|
23
31
|
}
|
|
24
32
|
|
|
25
33
|
registerPageLifecycle("date-time", () => {
|