@xingwangzhe/stalux 1.28.5 → 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.
- package/.release/cli.mjs +1 -0
- package/README.md +6 -0
- package/package.json +1 -1
- package/src/components/stalux/archives/archivesList.astro +3 -3
- package/src/components/stalux/categories/categoriesList.astro +1 -1
- package/src/components/stalux/posts/PostTaxonomy.astro +1 -6
- package/src/components/stalux/posts/postCard.astro +5 -1
- package/src/components/stalux/posts/postContent.astro +3 -4
- package/src/components/stalux/posts/postToc.astro +1 -6
- package/src/index.ts +6 -1
- package/src/internal/image-dimensions.ts +122 -0
- package/src/layouts/PostLayout.astro +3 -0
- package/src/layouts/Stalux.astro +2 -1
- package/src/pages/posts/[post].astro +1 -0
- package/src/schemas/config.ts +5 -0
- package/src/styles/base/init.css +30 -17
- package/src/styles/components/archives/archivesList.module.css +11 -112
- package/src/styles/components/categories/categoriesCard.module.css +13 -7
- package/src/styles/components/categories/categoriesList.module.css +2 -5
- package/src/styles/components/layout/navs.module.css +4 -3
- package/src/styles/components/links/linkCard.module.css +13 -12
- package/src/styles/components/links/linkList.module.css +0 -13
- package/src/styles/components/posts/postCard.module.css +19 -21
- package/src/styles/components/posts/postContent.module.css +19 -11
- package/src/styles/components/posts/postLayout.module.css +5 -5
- package/src/styles/components/posts/postList.module.css +2 -1
- package/src/styles/components/posts/postNavigation.module.css +2 -3
- package/src/styles/components/posts/postSidebar.module.css +6 -4
- package/src/styles/components/posts/waline.css +3 -4
- package/src/styles/components/words/wordCard.module.css +9 -3
- package/src/styles/components/words/wordList.module.css +0 -13
- package/src/styles/shared/view-transitions.css +54 -234
- package/src/utils/accent-color.ts +24 -0
- package/src/utils/view-transitions.ts +30 -20
|
@@ -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.
|
|
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
|
-
|
|
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(--
|
|
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
|
|
16
|
-
box-shadow
|
|
17
|
-
background
|
|
18
|
-
|
|
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(-
|
|
23
|
+
transform: translateY(-3px);
|
|
23
24
|
background: #ffffff26;
|
|
24
|
-
box-shadow: var(--shadow-
|
|
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
|
|
42
|
-
box-shadow
|
|
43
|
-
border-color
|
|
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(
|
|
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,
|
|
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
|
|
31
|
-
box-shadow
|
|
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
|
|
86
|
-
box-shadow
|
|
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(-
|
|
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(--
|
|
14
|
-
border-radius:
|
|
15
|
-
padding:
|
|
16
|
-
box-shadow: var(--shadow
|
|
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
|
-
|
|
25
|
-
|
|
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:
|
|
158
|
-
|
|
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:
|
|
14
|
-
gap:
|
|
15
|
-
max-width:
|
|
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:
|
|
46
|
-
gap:
|
|
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
|
}
|
|
@@ -29,8 +29,7 @@
|
|
|
29
29
|
transform var(--transition-normal),
|
|
30
30
|
box-shadow var(--transition-normal),
|
|
31
31
|
color var(--transition-normal);
|
|
32
|
-
|
|
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:
|
|
55
|
+
box-shadow: var(--shadow-raised-hover);
|
|
57
56
|
}
|
|
58
57
|
|
|
59
58
|
.postNavLink:hover::before {
|
|
@@ -30,11 +30,13 @@
|
|
|
30
30
|
.sidebarContainer {
|
|
31
31
|
display: flex;
|
|
32
32
|
flex-direction: column;
|
|
33
|
-
background: var(--
|
|
34
|
-
border-radius:
|
|
33
|
+
background: var(--surface-glass);
|
|
34
|
+
border-radius: 14px;
|
|
35
35
|
padding: var(--space-md);
|
|
36
|
-
box-shadow: var(--shadow
|
|
37
|
-
transition:
|
|
36
|
+
box-shadow: var(--surface-glass-shadow);
|
|
37
|
+
transition:
|
|
38
|
+
box-shadow 220ms ease,
|
|
39
|
+
background-color 220ms ease;
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
@media (max-width: 1400px) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--waline-accent-rgb:
|
|
2
|
+
--waline-accent-rgb: var(--stalux-accent-rgb);
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
/* 评论区容器与博客风格一致 */
|
|
@@ -8,9 +8,8 @@
|
|
|
8
8
|
margin-bottom: 1rem;
|
|
9
9
|
padding: 2rem;
|
|
10
10
|
border-radius: 12px;
|
|
11
|
-
animation: fadeInUpComment 0.
|
|
12
|
-
|
|
13
|
-
animation-delay: 0.3s;
|
|
11
|
+
animation: fadeInUpComment 0.35s ease-out both;
|
|
12
|
+
animation-delay: 0.08s;
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
/* 评论区标题样式与博客风格一致 */
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
.card {
|
|
2
2
|
width: 100%;
|
|
3
|
-
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
background: var(--surface-glass);
|
|
4
5
|
border-radius: var(--radius-lg, 12px);
|
|
5
6
|
padding: 1.5rem;
|
|
6
|
-
box-shadow: var(--shadow-
|
|
7
|
+
box-shadow: var(--shadow-sidebar);
|
|
7
8
|
transition:
|
|
8
9
|
transform var(--transition-normal) ease,
|
|
9
10
|
box-shadow var(--transition-normal) ease;
|
|
@@ -12,9 +13,14 @@
|
|
|
12
13
|
gap: 0.75rem;
|
|
13
14
|
}
|
|
14
15
|
|
|
16
|
+
.body :global(.expressive-code) {
|
|
17
|
+
max-width: 100%;
|
|
18
|
+
overflow-x: auto;
|
|
19
|
+
}
|
|
20
|
+
|
|
15
21
|
.card:hover {
|
|
16
22
|
transform: translateY(-4px);
|
|
17
|
-
box-shadow: var(--shadow-
|
|
23
|
+
box-shadow: var(--shadow-raised-hover);
|
|
18
24
|
}
|
|
19
25
|
|
|
20
26
|
/* 被 hash 定位的卡片 — 主题光晕 */
|
|
@@ -12,19 +12,6 @@
|
|
|
12
12
|
width: 100%;
|
|
13
13
|
max-width: 900px;
|
|
14
14
|
display: flex;
|
|
15
|
-
animation: fadeInUp 0.5s ease forwards;
|
|
16
|
-
opacity: 0;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@keyframes fadeInUp {
|
|
20
|
-
from {
|
|
21
|
-
opacity: 0;
|
|
22
|
-
transform: translateY(20px);
|
|
23
|
-
}
|
|
24
|
-
to {
|
|
25
|
-
opacity: 1;
|
|
26
|
-
transform: translateY(0);
|
|
27
|
-
}
|
|
28
15
|
}
|
|
29
16
|
|
|
30
17
|
@media (max-width: 768px) {
|