@xingwangzhe/stalux 1.29.7 → 1.30.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 (115) hide show
  1. package/README.md +6 -2
  2. package/package.json +10 -6
  3. package/src/components/stalux/archives/archivesList.astro +22 -16
  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 +3 -3
  8. package/src/components/stalux/common/date.astro +3 -4
  9. package/src/components/stalux/common/textType.astro +2 -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 +13 -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 +15 -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 +6 -77
  41. package/src/pages/archives.astro +3 -3
  42. package/src/pages/categories/index.astro +3 -3
  43. package/src/pages/index.astro +4 -18
  44. package/src/pages/tags/index.astro +3 -3
  45. package/src/pages/words.astro +3 -3
  46. package/src/scripts/analytics-runtime.ts +9 -6
  47. package/src/scripts/waline-client.ts +1 -1
  48. package/src/styles/archives.css +2 -0
  49. package/src/styles/article.css +2 -0
  50. package/src/styles/categories.css +2 -0
  51. package/src/styles/components/posts/waline.css +19 -23
  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/links.css +2 -0
  62. package/src/styles/prose.css +3 -0
  63. package/src/styles/tags.css +2 -0
  64. package/src/styles/theme/archives.css +138 -0
  65. package/src/styles/theme/article.css +562 -0
  66. package/src/styles/theme/base.css +290 -0
  67. package/src/styles/theme/categories.css +54 -0
  68. package/src/styles/theme/common.css +79 -0
  69. package/src/styles/theme/footer.css +26 -0
  70. package/src/styles/theme/inline.css +153 -0
  71. package/src/styles/theme/layout.css +143 -0
  72. package/src/styles/theme/link-cards.css +114 -0
  73. package/src/styles/theme/links.css +69 -0
  74. package/src/styles/theme/pages.css +35 -0
  75. package/src/styles/theme/posts.css +79 -0
  76. package/src/styles/theme/prose.css +478 -0
  77. package/src/styles/theme/tags.css +130 -0
  78. package/src/styles/theme/words.css +84 -0
  79. package/src/styles/theme.css +12 -0
  80. package/src/styles/words.css +2 -0
  81. package/src/styles/base/init.css +0 -287
  82. package/src/styles/components/archives/archivesList.module.css +0 -203
  83. package/src/styles/components/archives/toArchive.module.css +0 -3
  84. package/src/styles/components/categories/categoriesCard.module.css +0 -88
  85. package/src/styles/components/categories/categoriesList.module.css +0 -23
  86. package/src/styles/components/common/author.module.css +0 -72
  87. package/src/styles/components/common/date.module.css +0 -15
  88. package/src/styles/components/common/textType.module.css +0 -10
  89. package/src/styles/components/footer/footer.module.css +0 -44
  90. package/src/styles/components/layout/navs.module.css +0 -261
  91. package/src/styles/components/links/linkCard.module.css +0 -116
  92. package/src/styles/components/links/linkList.module.css +0 -54
  93. package/src/styles/components/links/socialLinks.module.css +0 -80
  94. package/src/styles/components/markdown.css +0 -523
  95. package/src/styles/components/posts/postAuthor.module.css +0 -31
  96. package/src/styles/components/posts/postCC.module.css +0 -138
  97. package/src/styles/components/posts/postCard.module.css +0 -167
  98. package/src/styles/components/posts/postContent.module.css +0 -238
  99. package/src/styles/components/posts/postLayout.module.css +0 -138
  100. package/src/styles/components/posts/postList.module.css +0 -25
  101. package/src/styles/components/posts/postNavigation.module.css +0 -186
  102. package/src/styles/components/posts/postSidebar.module.css +0 -59
  103. package/src/styles/components/posts/postTaxonomy.module.css +0 -87
  104. package/src/styles/components/posts/postToc.module.css +0 -74
  105. package/src/styles/components/posts/randomPost.module.css +0 -131
  106. package/src/styles/components/tags/tagHeader.module.css +0 -44
  107. package/src/styles/components/tags/tagsCloud.module.css +0 -155
  108. package/src/styles/components/words/wordCard.module.css +0 -136
  109. package/src/styles/components/words/wordList.module.css +0 -26
  110. package/src/styles/pages/archives.module.css +0 -22
  111. package/src/styles/pages/categories.module.css +0 -17
  112. package/src/styles/pages/home.module.css +0 -61
  113. package/src/styles/pages/listPage.module.css +0 -16
  114. package/src/styles/pages/tags.module.css +0 -16
  115. package/src/styles/pages/words.module.css +0 -16
@@ -0,0 +1,562 @@
1
+ @layer components {
2
+ /* randomPost */
3
+
4
+ .stalux-random-refresh:hover {
5
+ color: var(--accent-60p, #0066cc);
6
+ }
7
+
8
+ .stalux-random-refresh:active {
9
+ opacity: 0.7;
10
+ }
11
+
12
+ .stalux-random-refresh svg {
13
+ width: 1em;
14
+ height: 1em;
15
+ }
16
+
17
+ .stalux-random-refresh.stalux-random-rotating svg {
18
+ animation: stalux-random-spin 0.6s linear;
19
+ }
20
+
21
+ @keyframes stalux-random-spin {
22
+ from {
23
+ transform: rotate(0deg);
24
+ }
25
+ to {
26
+ transform: rotate(360deg);
27
+ }
28
+ }
29
+
30
+ .stalux-random-loading,
31
+ .stalux-random-error,
32
+ .stalux-random-no-more {
33
+ @apply text-center;
34
+ padding: 1em;
35
+ color: var(--foreground-60p, #666);
36
+ font-size: 0.95em;
37
+ }
38
+
39
+ .stalux-random-list > li > a {
40
+ @apply block no-underline;
41
+ padding: 0.75em 1em;
42
+ border-radius: 0.375em;
43
+ background: transparent;
44
+ color: var(--foreground-60p, #333);
45
+ transition:
46
+ color 0.2s ease,
47
+ transform 0.2s ease;
48
+ word-break: break-word;
49
+ }
50
+
51
+ .stalux-random-list > li > a:hover {
52
+ transform: translateX(0.25em);
53
+ }
54
+
55
+ .stalux-random-list > li > a:active {
56
+ transform: translateX(0.125em);
57
+ }
58
+ @media (prefers-color-scheme: dark) {
59
+ .stalux-random-header {
60
+ border-bottom-color: rgba(255, 255, 255, 0.1);
61
+ }
62
+
63
+ .stalux-random-title {
64
+ color: var(--foreground-60p, #e0e0e0);
65
+ }
66
+
67
+ .stalux-random-refresh {
68
+ color: var(--foreground-60p, #e0e0e0);
69
+ }
70
+
71
+ .stalux-random-loading,
72
+ .stalux-random-error,
73
+ .stalux-random-no-more {
74
+ color: var(--foreground-60p, #b0b0b0);
75
+ }
76
+
77
+ .stalux-random-list > li > a {
78
+ color: var(--foreground-60p, #e0e0e0);
79
+ }
80
+ }
81
+
82
+ /* postToc */
83
+
84
+ .stalux-toc-item:hover {
85
+ transform: translateX(calc(-1 * var(--space-sm)));
86
+ }
87
+
88
+ .stalux-toc-item:active,
89
+ .stalux-toc-item.stalux-toc-active {
90
+ color: var(--accent-90p);
91
+ background-color: var(--accent-20p);
92
+ border-left-color: var(--accent-80p);
93
+ font-weight: 500;
94
+ }
95
+
96
+ .stalux-toc-depth-1 {
97
+ @apply [padding-left:var(--space-xs)];
98
+ }
99
+
100
+ .stalux-toc-depth-2 {
101
+ @apply [padding-left:var(--space-lg)] [font-size:var(--font-size-smaller)];
102
+ }
103
+
104
+ .stalux-toc-depth-3 {
105
+ @apply [padding-left:2.25rem] [font-size:var(--font-size-tiny)];
106
+ }
107
+
108
+ .stalux-toc-depth-4,
109
+ .stalux-toc-depth-5,
110
+ .stalux-toc-depth-6 {
111
+ padding-left: var(--space-2xl);
112
+ font-size: 0.75rem;
113
+ color: var(--white-60p);
114
+ }
115
+
116
+ /* postTaxonomy */
117
+
118
+ :is(
119
+ .stalux-post-taxonomy-list,
120
+ .stalux-post-taxonomy-list-column,
121
+ .stalux-post-taxonomy-list-wrap
122
+ ) {
123
+ @apply flex;
124
+ gap: var(--space-sm);
125
+ }
126
+
127
+ .stalux-post-taxonomy-item-column:hover {
128
+ transform: translateX(4px);
129
+ }
130
+
131
+ .stalux-post-taxonomy-item-column:active {
132
+ transform: translateX(2px);
133
+ }
134
+
135
+ .stalux-post-taxonomy-item-pill:hover {
136
+ transform: translateY(-2px);
137
+ }
138
+
139
+ .stalux-post-taxonomy-item-pill:active {
140
+ transform: translateY(-1px);
141
+ }
142
+
143
+ /* postSidebar */
144
+ :is(.stalux-sidebar, .stalux-sidebar-right) {
145
+ @apply sticky w-full h-fit overflow-y-auto stalux-stack;
146
+ top: 20px;
147
+ max-height: calc(100vh - 40px);
148
+ gap: var(--space-lg);
149
+ padding: var(--space-lg) 0;
150
+ scrollbar-width: none;
151
+ -ms-overflow-style: none;
152
+ }
153
+
154
+ :is(.stalux-sidebar, .stalux-sidebar-right)::-webkit-scrollbar {
155
+ @apply hidden;
156
+ }
157
+
158
+ @media (max-width: 1400px) {
159
+ .stalux-sidebar-right {
160
+ width: 240px;
161
+ }
162
+ }
163
+
164
+ @media (max-width: 1200px) {
165
+ :is(.stalux-sidebar, .stalux-sidebar-right) {
166
+ @apply hidden;
167
+ }
168
+ }
169
+
170
+ @media (max-width: 768px) {
171
+ :is(.stalux-sidebar, .stalux-sidebar-right),
172
+ .stalux-sidebar-right {
173
+ @apply hidden;
174
+ }
175
+ }
176
+
177
+ /* postNavigation */
178
+
179
+ .stalux-pagination-link::before {
180
+ @apply absolute w-full h-full pointer-events-none;
181
+ content: "";
182
+ top: 0;
183
+ left: 0;
184
+ background: linear-gradient(120deg, transparent, var(--accent-20p), transparent);
185
+ transition: transform var(--transition-slow);
186
+ transform: scaleX(0);
187
+ transform-origin: left;
188
+ }
189
+
190
+ .stalux-pagination-link:hover {
191
+ transform: translateY(-3px);
192
+ box-shadow: var(--shadow-raised-hover);
193
+ }
194
+
195
+ .stalux-pagination-link:hover::before {
196
+ transform: scaleX(1);
197
+ }
198
+
199
+ .stalux-pagination-link.stalux-pagination-disabled {
200
+ @apply pointer-events-none;
201
+ opacity: 0.5;
202
+ cursor: not-allowed;
203
+ background: var(--black-15p);
204
+ }
205
+
206
+ .stalux-pagination-link.stalux-pagination-prev-post {
207
+ @apply text-left;
208
+ margin-left: var(--space-xs);
209
+ }
210
+
211
+ .stalux-pagination-link.stalux-pagination-next-post {
212
+ @apply text-right;
213
+ justify-content: flex-end;
214
+ margin-right: var(--space-xs);
215
+ }
216
+ @media (max-width: 768px) {
217
+ .stalux-pagination {
218
+ margin: var(--space-md) 0;
219
+ }
220
+
221
+ .stalux-pagination-inner {
222
+ gap: var(--space-sm);
223
+ }
224
+
225
+ .stalux-pagination-link {
226
+ @apply flex-col items-start justify-center;
227
+ padding: var(--space-sm) var(--space-md);
228
+ min-height: 120px;
229
+ }
230
+
231
+ .stalux-pagination-link.stalux-pagination-next-post {
232
+ @apply items-end;
233
+ }
234
+
235
+ .stalux-pagination-arrow {
236
+ transform: scale(0.85);
237
+ }
238
+
239
+ .stalux-pagination-label {
240
+ font-size: 0.75rem;
241
+ margin-bottom: var(--space-xs);
242
+ }
243
+
244
+ .stalux-pagination-title {
245
+ @apply max-w-full;
246
+ font-size: var(--font-size-small);
247
+ white-space: normal;
248
+ }
249
+ }
250
+ @media (max-width: 480px) {
251
+ .stalux-pagination {
252
+ margin: var(--space-md) 0;
253
+ }
254
+
255
+ .stalux-pagination-inner {
256
+ @apply flex-col;
257
+ gap: var(--space-sm);
258
+ }
259
+
260
+ .stalux-pagination-link {
261
+ @apply w-full flex-row items-center justify-start;
262
+ padding: var(--space-sm) var(--space-md);
263
+ min-height: 100px;
264
+ gap: var(--space-md);
265
+ }
266
+
267
+ .stalux-pagination-link.stalux-pagination-prev-post,
268
+ .stalux-pagination-link.stalux-pagination-next-post {
269
+ @apply text-left items-center;
270
+ margin-left: 0;
271
+ margin-right: 0;
272
+ }
273
+
274
+ .stalux-pagination-link.stalux-pagination-next-post {
275
+ @apply justify-start;
276
+ }
277
+
278
+ .stalux-pagination-title {
279
+ white-space: normal;
280
+ }
281
+ }
282
+
283
+ /* postLayout */
284
+ .stalux-post-layout > :nth-child(1) {
285
+ @apply m-0;
286
+ }
287
+
288
+ .stalux-post-layout > :nth-child(2) {
289
+ @apply min-w-0 m-0;
290
+ }
291
+
292
+ .stalux-post-layout > :nth-child(3) {
293
+ @apply m-0;
294
+ }
295
+ @media (min-width: 1600px) {
296
+ .stalux-post-layout {
297
+ grid-template-columns: minmax(240px, 280px) minmax(0, 1fr) minmax(240px, 280px);
298
+ gap: 4rem;
299
+ padding: 2rem 1.5rem;
300
+ }
301
+ }
302
+ @media (max-width: 1400px) {
303
+ .stalux-post-layout {
304
+ grid-template-columns: 260px 1fr 260px;
305
+ gap: 3.5rem;
306
+ padding: 1.5rem 1rem;
307
+ }
308
+ }
309
+ @media (max-width: 1200px) {
310
+ .stalux-post-layout {
311
+ grid-template-columns: 1fr;
312
+ gap: 2rem;
313
+ padding: 1rem 0.75rem;
314
+ }
315
+ }
316
+ @media (max-width: 768px) {
317
+ .stalux-post-page {
318
+ @apply p-0;
319
+ }
320
+
321
+ .stalux-post-layout {
322
+ @apply stalux-stack p-0 m-0;
323
+ gap: 2rem;
324
+ }
325
+ .stalux-post-layout > :nth-child(2) {
326
+ order: 1;
327
+ }
328
+
329
+ .stalux-post-layout > :nth-child(1) {
330
+ order: 2;
331
+ }
332
+
333
+ .stalux-post-layout > :nth-child(3) {
334
+ order: 3;
335
+ }
336
+ }
337
+ @media (max-width: 480px) {
338
+ .stalux-post-layout {
339
+ @apply p-0;
340
+ gap: 1.25rem;
341
+ }
342
+ }
343
+ @media print {
344
+ .stalux-post-layout {
345
+ grid-template-columns: 1fr;
346
+ gap: 2rem;
347
+ }
348
+
349
+ .stalux-post-layout > :nth-child(1),
350
+ .stalux-post-layout > :nth-child(3) {
351
+ @apply hidden;
352
+ }
353
+ }
354
+ @media (prefers-reduced-motion: reduce) {
355
+ .stalux-post-page * {
356
+ animation-duration: 0.01ms !important;
357
+ animation-iteration-count: 1 !important;
358
+ transition-duration: 0.01ms !important;
359
+ }
360
+ }
361
+ @media (prefers-contrast: more) {
362
+ .stalux-post-layout {
363
+ gap: 2rem;
364
+ }
365
+ }
366
+ .stalux-post-layout :focus-visible {
367
+ outline: 2px solid var(--accent-80p);
368
+ outline-offset: 2px;
369
+ }
370
+
371
+ /* postContent */
372
+
373
+ .stalux-post-page-stats span {
374
+ @apply inline-flex items-center;
375
+ gap: 0.3rem;
376
+ }
377
+
378
+ #stalux-post-vercount_value_page_pv {
379
+ @apply font-semibold;
380
+ color: #ffffffb3;
381
+ }
382
+
383
+ #stalux-post-vercount_container_page_pv {
384
+ transition: opacity 0.3s ease;
385
+ }
386
+
387
+ .stalux-post-source-link:hover,
388
+ .stalux-post-source-link:focus,
389
+ .stalux-post-source-link:active {
390
+ @apply no-underline;
391
+ background: var(--accent, #ffffff22);
392
+ border-top-color: var(--accent, #ffffff44);
393
+ border-right-color: var(--accent, #ffffff44);
394
+ border-left-color: var(--accent, #ffffff44);
395
+ transform: translateY(-1px);
396
+ }
397
+ .stalux-post-source-link::after {
398
+ display: none !important;
399
+ }
400
+
401
+ @keyframes stalux-post-content-reveal {
402
+ from {
403
+ opacity: 0;
404
+ }
405
+ to {
406
+ opacity: 1;
407
+ }
408
+ }
409
+
410
+ @media (max-width: 1024px) {
411
+ .stalux-post-title {
412
+ font-size: 2rem;
413
+ }
414
+
415
+ .stalux-post-metadata {
416
+ gap: 1rem;
417
+ }
418
+ }
419
+
420
+ @media (max-width: 768px) {
421
+ .stalux-article {
422
+ @apply m-0 w-full p-0 box-border;
423
+ background: transparent;
424
+ box-shadow: none;
425
+ }
426
+
427
+ .stalux-post-body {
428
+ @apply w-full m-0;
429
+ padding: 0 0.75rem;
430
+ }
431
+
432
+ .stalux-post-article-header {
433
+ margin-bottom: 2rem;
434
+ padding: 1rem 1rem 0;
435
+ }
436
+
437
+ .stalux-post-title {
438
+ font-size: 1.75rem;
439
+ }
440
+
441
+ .stalux-post-metadata {
442
+ @apply flex-col;
443
+ gap: 0.75rem;
444
+ font-size: 0.85rem;
445
+ }
446
+
447
+ .stalux-post-article-footer {
448
+ margin-top: 2rem;
449
+ padding-top: 1.5rem;
450
+ }
451
+ .stalux-post-page-stats {
452
+ font-size: 0.85rem;
453
+ margin-top: 0.8rem;
454
+ padding-top: 0.6rem;
455
+ }
456
+ }
457
+
458
+ @keyframes stalux-post-fade-in-up {
459
+ from {
460
+ opacity: 0;
461
+ transform: translateY(20px);
462
+ }
463
+ to {
464
+ opacity: 1;
465
+ transform: translateY(0);
466
+ }
467
+ }
468
+
469
+ /* postCC */
470
+
471
+ .stalux-license-author,
472
+ .stalux-license-url,
473
+ .stalux-license-license {
474
+ margin: var(--space-sm) 0;
475
+ font-size: var(--font-size-small);
476
+ color: var(--white-80p);
477
+ line-height: 1.6;
478
+ }
479
+
480
+ .stalux-license-box a {
481
+ @apply no-underline relative;
482
+ color: var(--accent-90p);
483
+ transition:
484
+ color var(--transition-normal),
485
+ border-bottom-color var(--transition-normal);
486
+ border-bottom: 1px dashed var(--accent-50p);
487
+ padding-bottom: 1px;
488
+ }
489
+
490
+ .stalux-license-box a:hover {
491
+ color: var(--stalux-accent-color);
492
+ border-bottom-color: var(--accent-80p);
493
+ }
494
+
495
+ .stalux-license-box a:active {
496
+ color: var(--accent-70p);
497
+ }
498
+
499
+ .stalux-license-box:hover .stalux-license-watermark {
500
+ opacity: 0.25;
501
+ }
502
+
503
+ .stalux-license-icon svg {
504
+ @apply w-full h-full block;
505
+ }
506
+
507
+ .stalux-license-icon path {
508
+ fill: currentColor;
509
+ color: var(--white-full);
510
+ }
511
+ @media (max-width: 768px) {
512
+ .stalux-license-box {
513
+ max-width: 95%;
514
+ padding: var(--space-md);
515
+ margin: var(--space-md) auto;
516
+ }
517
+
518
+ .stalux-license-title {
519
+ font-size: var(--font-size-base);
520
+ margin-bottom: var(--space-xs);
521
+ }
522
+
523
+ .stalux-license-author,
524
+ .stalux-license-url,
525
+ .stalux-license-license {
526
+ margin: var(--space-xs) 0;
527
+ font-size: 0.85rem;
528
+ }
529
+
530
+ .stalux-license-icon {
531
+ width: 80px;
532
+ height: 80px;
533
+ }
534
+ }
535
+
536
+ @media (max-width: 480px) {
537
+ .stalux-license-box {
538
+ @apply max-w-full;
539
+ padding: var(--space-sm);
540
+ margin: var(--space-md) 0;
541
+ }
542
+
543
+ .stalux-license-title {
544
+ font-size: var(--font-size-small);
545
+ margin-bottom: var(--space-2xs);
546
+ }
547
+
548
+ .stalux-license-author,
549
+ .stalux-license-url,
550
+ .stalux-license-license {
551
+ margin: var(--space-2xs) 0;
552
+ font-size: 0.8rem;
553
+ }
554
+
555
+ .stalux-license-icon {
556
+ width: 60px;
557
+ height: 60px;
558
+ }
559
+ }
560
+
561
+ /* postAuthor */
562
+ }