hexo-theme-stellar 1.41.0 → 1.42.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/.claude/skills/stellar-theme-dev/SKILL.md +1 -2
- package/CHANGELOG.md +49 -0
- package/CONTRIBUTING.md +2 -1
- package/README.md +50 -21
- package/README_EN.md +113 -0
- package/_config.yml +8 -3
- package/_data/icons.yml +0 -2
- package/layout/_partial/cover/index.ejs +0 -3
- package/layout/_partial/main/navbar/article_banner.ejs +30 -27
- package/layout/_partial/main/pin_slider.ejs +59 -28
- package/layout/_partial/main/post_list/latest_post_card.ejs +25 -0
- package/layout/_partial/main/post_list/post_card.ejs +16 -64
- package/layout/_partial/main/post_list/topic_card.ejs +26 -5
- package/layout/_partial/scripts/bootstrap.ejs +35 -0
- package/layout/_partial/scripts/defines.ejs +2 -1
- package/layout/_partial/scripts.ejs +9 -0
- package/layout/_partial/widgets/toc.ejs +2 -2
- package/layout/_plugins/adaptive_text.ejs +11 -0
- package/layout/_plugins/copycode.ejs +2 -2
- package/layout/_plugins/mermaid.ejs +1 -1
- package/layout/_plugins/scrollreveal.ejs +22 -16
- package/layout/_plugins/swiper.ejs +1 -1
- package/layout/index.ejs +10 -2
- package/layout/index_topic.ejs +4 -4
- package/package.json +3 -3
- package/scripts/generators/stellar-icons.js +1 -1
- package/scripts/helpers/subtitle.js +8 -0
- package/scripts/lib/subtitle.js +24 -0
- package/scripts/tags/lib/banner.js +4 -3
- package/source/css/_common/cover-overlay.styl +111 -0
- package/source/css/_common/title.styl +17 -0
- package/source/css/_components/layout.styl +9 -13
- package/source/css/_components/list.styl +135 -64
- package/source/css/_components/main.styl +2 -2
- package/source/css/_components/pages/archives.styl +4 -1
- package/source/css/_components/pages/article-story.styl +1 -10
- package/source/css/_components/partial/article-banner.styl +61 -37
- package/source/css/_components/partial/article-tags.styl +4 -1
- package/source/css/_components/partial/bread-nav.styl +7 -14
- package/source/css/_components/partial/navbar.styl +1 -1
- package/source/css/_components/partial/post-panel.styl +76 -0
- package/source/css/_components/pin-slider.styl +38 -41
- package/source/css/_components/sidebar/footer.styl +1 -1
- package/source/css/_components/sidebar/logo.styl +2 -2
- package/source/css/_components/sidebar/search.styl +1 -1
- package/source/css/_components/sidebar/sidebar.styl +7 -7
- package/source/css/_components/tag-plugins/banner.styl +53 -11
- package/source/css/_components/tag-plugins/friends_posts.styl +5 -86
- package/source/css/_components/tag-plugins/gallery.styl +3 -0
- package/source/css/_components/tag-plugins/read/paper.styl +3 -3
- package/source/css/_components/tag-plugins/read/reel.styl +4 -4
- package/source/css/_components/tag-plugins/timeline.styl +4 -0
- package/source/css/_components/widgets/timeline.styl +2 -2
- package/source/css/_components/widgets/toc.styl +12 -6
- package/source/css/_components/widgets/widgets.styl +8 -7
- package/source/css/_custom.styl +8 -9
- package/source/css/_plugins/lazyload.styl +1 -0
- package/source/js/color.js +325 -0
- package/source/js/main.js +2 -2
- package/source/js/plugins/adaptive-text.js +146 -0
- package/source/js/services/friends_and_posts.js +1 -1
- package/source/js/services/timeline.js +1 -1
- package/source/js/services/weibo.js +1 -1
- package/source/js/services.js +1 -1
- package/source/js/utils.js +14 -1
- package/layout/_partial/cover/post_cover.ejs +0 -37
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
.l_body
|
|
2
2
|
display: grid
|
|
3
3
|
grid-template-columns: 1fr minmax(200px,var(--width-main)) 1fr
|
|
4
|
-
grid-gap: calc(var(--gap-
|
|
5
|
-
@media screen and (max-width: $device-desktop)
|
|
6
|
-
grid-gap: calc(var(--gap-margin) * 2)
|
|
4
|
+
grid-gap: calc(var(--gap-page) * 1)
|
|
7
5
|
margin: auto
|
|
8
6
|
font-size: var(--fsp)
|
|
9
7
|
|
|
@@ -13,36 +11,34 @@
|
|
|
13
11
|
position: sticky
|
|
14
12
|
position: -webkit-sticky
|
|
15
13
|
// 侧边栏容器宽度
|
|
16
|
-
--width-sidebar: calc(var(--gap-
|
|
14
|
+
--width-sidebar: calc(var(--gap-base) * 4 + var(--side-content-width))
|
|
17
15
|
width: var(--width-sidebar)
|
|
18
16
|
|
|
19
17
|
.l_body .l_left
|
|
20
18
|
justify-self: right
|
|
21
|
-
top: var(--gap-
|
|
19
|
+
top: var(--gap-page)
|
|
22
20
|
.l_body .l_right
|
|
23
21
|
justify-self: left
|
|
24
|
-
|
|
22
|
+
width: calc(var(--width-sidebar) + var(--rightbar-width-extra))
|
|
23
|
+
max-height: calc(100% - var(--gap-page) * 2)
|
|
25
24
|
.widgets
|
|
26
25
|
height: 100%
|
|
27
26
|
overflow visible
|
|
28
27
|
|
|
29
28
|
// 平板布局
|
|
30
29
|
@media screen and (max-width: $device-laptop)
|
|
31
|
-
.l_body .l_right
|
|
32
|
-
--gap-margin: 16px
|
|
33
30
|
.laptop-only
|
|
34
31
|
display: block !important
|
|
35
32
|
.l_body
|
|
36
|
-
grid-gap: calc(var(--gap-margin) * 1)
|
|
37
33
|
.l_right
|
|
38
34
|
position: fixed
|
|
39
|
-
transform: translateX(
|
|
35
|
+
transform: translateX(calc(100% + var(--inset) * 2))
|
|
40
36
|
transition: transform .38s ease-out
|
|
41
37
|
margin: 0
|
|
42
38
|
--inset: 8px
|
|
43
39
|
right: var(--inset)
|
|
44
|
-
top: var(--gap-
|
|
45
|
-
max-height: calc(100vh - var(--gap-
|
|
40
|
+
top: var(--gap-page)
|
|
41
|
+
max-height: calc(100vh - var(--gap-page) * 2)
|
|
46
42
|
box-shadow: $boxshadow-card-float
|
|
47
43
|
z-index: 10
|
|
48
44
|
background: var(--background)
|
|
@@ -66,7 +62,7 @@
|
|
|
66
62
|
display: block
|
|
67
63
|
.l_left
|
|
68
64
|
position: fixed
|
|
69
|
-
transform: translateX(-
|
|
65
|
+
transform: translateX(calc(-100% - var(--inset) * 2))
|
|
70
66
|
transition: transform .38s ease-out
|
|
71
67
|
margin: 0
|
|
72
68
|
--inset: 8px
|
|
@@ -51,14 +51,27 @@
|
|
|
51
51
|
display: block
|
|
52
52
|
border-radius: $border-card-l
|
|
53
53
|
background: var(--card)
|
|
54
|
+
// hero 封面卡片:封面图同时作为卡片自身背景承载,角落跟随全局 corner-shape 圆角裁剪;
|
|
55
|
+
// 子图保留用于 hover 变暗/放大滤镜,角落楔形区由容器背景(同图)无缝补位
|
|
56
|
+
background-image: var(--cover-url)
|
|
57
|
+
background-size: cover
|
|
58
|
+
background-position: center
|
|
54
59
|
overflow: hidden
|
|
55
60
|
z-index: 0
|
|
56
61
|
position: relative
|
|
62
|
+
// Safari 26.4/26.5 合成层裁剪 bug(WebKit 312584/319993):带 filter:blur() 的合成层
|
|
63
|
+
// (.cover:before 同图模糊层)不执行父级 overflow:hidden + border-radius 圆角裁剪,静止时底部两角漏方角;
|
|
64
|
+
// 用与圆角同源的 clip-path 直接裁剪(hover 时模糊层带 transform 反而正常,见 .cover:before 的 translateZ(0))。
|
|
65
|
+
// clip-path 会把角落硬裁为普通圆角,覆盖 corner-shape;因此在支持 corner-shape 的浏览器中移除,
|
|
66
|
+
// 仅在不支持的浏览器(Safari/Firefox)保留圆角兜底
|
|
67
|
+
@supports not (corner-shape: superellipse(1))
|
|
68
|
+
clip-path: 'inset(0 round %s)' % $border-card-l
|
|
57
69
|
--img-br: 100%
|
|
58
70
|
--img-sat: 100%
|
|
59
71
|
--blur-px: 1em
|
|
60
72
|
--blur-height: 128px
|
|
61
73
|
--blur-sat: 120%
|
|
74
|
+
--cover-zoom: 1.05
|
|
62
75
|
&:hover
|
|
63
76
|
--img-br: 75%
|
|
64
77
|
--img-sat: 120%
|
|
@@ -67,7 +80,7 @@
|
|
|
67
80
|
--blur-sat: 200%
|
|
68
81
|
// 图片卡片 hover 封面放大:卡片本身不动,放大后的图片由圆角静态裁剪裁出圆角
|
|
69
82
|
.post-cover img, .cover img, .cover:before
|
|
70
|
-
transform: scale(
|
|
83
|
+
transform: scale(var(--cover-zoom))
|
|
71
84
|
img
|
|
72
85
|
filter: brightness(var(--img-br)) saturate(var(--img-sat))
|
|
73
86
|
// 封面放大用 1.5s 缓动,其余属性(亮度/饱和度)保持主题默认 0.2s
|
|
@@ -111,6 +124,11 @@
|
|
|
111
124
|
flex-wrap: wrap
|
|
112
125
|
align-items: center
|
|
113
126
|
gap: 0 .5rem
|
|
127
|
+
svg
|
|
128
|
+
width: 1em
|
|
129
|
+
height: 1em
|
|
130
|
+
margin-right: .25em
|
|
131
|
+
opacity: .4
|
|
114
132
|
|
|
115
133
|
|
|
116
134
|
// common article
|
|
@@ -140,71 +158,60 @@
|
|
|
140
158
|
border-radius: 0
|
|
141
159
|
aspect-ratio: hexo-config('article.cover_ratio')
|
|
142
160
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
&[position=top]
|
|
185
|
-
top: 0
|
|
186
|
-
background-image: linear-gradient(rgba(0,0,0,0.2),rgba(0,0,0,0))
|
|
187
|
-
&[position=bottom]
|
|
188
|
-
bottom: 0
|
|
189
|
-
background-image: linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0.2))
|
|
190
|
-
div+div
|
|
191
|
-
margin-top: 4px
|
|
192
|
-
.text
|
|
193
|
-
color: unset
|
|
194
|
-
trans1 all
|
|
195
|
-
text-shadow: 0 2px 4px rgba(0,0,0,0.2)
|
|
196
|
-
.topic
|
|
197
|
-
font-size: $fs-13
|
|
161
|
+
// 封面渐变模糊卡片:文章 photo 卡片与专栏最新文章卡片共用(接入 cover-overlay 统一覆盖层)
|
|
162
|
+
.post-list .post-card .cover
|
|
163
|
+
position: relative
|
|
164
|
+
line-height: 0
|
|
165
|
+
img
|
|
166
|
+
width: 100%
|
|
167
|
+
object-fit: cover
|
|
168
|
+
z-index 0
|
|
169
|
+
// 与通用覆盖层能力统一:文字区固定底部(hero 卡片),渐变模糊层 + 黑色蒙版(视觉参数不变)
|
|
170
|
+
cover-overlay(var(--cover-url), bottom)
|
|
171
|
+
.cover-info
|
|
172
|
+
padding: 1rem
|
|
173
|
+
position: absolute
|
|
174
|
+
line-height: 1.2
|
|
175
|
+
width: 'calc(100% - %s * 2)' % 1rem
|
|
176
|
+
--text-banner: white
|
|
177
|
+
color: var(--text-banner)
|
|
178
|
+
z-index: 2
|
|
179
|
+
bottom: 0
|
|
180
|
+
div+div
|
|
181
|
+
margin-top: 4px
|
|
182
|
+
.text
|
|
183
|
+
color: unset
|
|
184
|
+
trans1 all
|
|
185
|
+
text-shadow: 0 2px 4px rgba(0,0,0,0.2)
|
|
186
|
+
.topic
|
|
187
|
+
font-size: $fs-13
|
|
188
|
+
// 小字用主题色变体(split 模式下由插件写入 --text-banner-theme)
|
|
189
|
+
color: var(--text-banner-theme, inherit)
|
|
190
|
+
.headline
|
|
191
|
+
font-weight: 500
|
|
192
|
+
font-size: $fsh3
|
|
193
|
+
.caption
|
|
194
|
+
font-size: $fs-14
|
|
195
|
+
// 小字用主题色变体(split 模式下由插件写入 --text-banner-theme)
|
|
196
|
+
color: var(--text-banner-theme, inherit)
|
|
197
|
+
// 只显示一行,超出省略
|
|
198
|
+
white-space: nowrap
|
|
199
|
+
overflow: hidden
|
|
200
|
+
text-overflow: ellipsis
|
|
201
|
+
@media screen and (max-width: $device-mobile)
|
|
198
202
|
.headline
|
|
199
|
-
font-
|
|
200
|
-
font-size: $fsh3
|
|
203
|
+
font-size: $fsh4
|
|
201
204
|
.caption
|
|
202
|
-
font-size: $fs-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
205
|
+
font-size: $fs-13
|
|
206
|
+
|
|
207
|
+
.post-list .post-card.post.photo
|
|
208
|
+
.cover img
|
|
209
|
+
aspect-ratio: hexo-config('article.cover_ratio')
|
|
210
|
+
// hover 放大覆盖:基规则的 `transform: translateZ(0)` 特异性高于上方 `.post-card:hover` 的 scale,
|
|
211
|
+
// 需用更高特异性选择器在基规则之后覆盖,保持 hover 缩放动画(叠加恒等变换)
|
|
212
|
+
&:hover
|
|
213
|
+
.cover:before
|
|
214
|
+
transform: translateZ(0) scale(var(--cover-zoom))
|
|
208
215
|
h2
|
|
209
216
|
margin: .25rem 0
|
|
210
217
|
font-size: $fsh4
|
|
@@ -249,6 +256,70 @@
|
|
|
249
256
|
.cap+.cap
|
|
250
257
|
margin-left: 4px
|
|
251
258
|
|
|
259
|
+
|
|
260
|
+
// topic 专栏列表:平铺容器 + 上下布局(h2 专栏标题 → 最新文章卡片 → 文章链接列表)
|
|
261
|
+
.post-list.topic
|
|
262
|
+
.post-card-wrap
|
|
263
|
+
margin: 0
|
|
264
|
+
box-shadow: none
|
|
265
|
+
border-radius: 0
|
|
266
|
+
& + .post-card-wrap
|
|
267
|
+
border-top: 1px solid var(--block-border)
|
|
268
|
+
.post-card
|
|
269
|
+
background: none
|
|
270
|
+
box-shadow: none
|
|
271
|
+
border-radius: 0
|
|
272
|
+
overflow: visible
|
|
273
|
+
clip-path: none
|
|
274
|
+
.md-text
|
|
275
|
+
padding: 2.25rem 0
|
|
276
|
+
@media screen and (max-width: $device-mobile)
|
|
277
|
+
padding: 1.5rem 0
|
|
278
|
+
.post-card.topic article
|
|
279
|
+
display: flex
|
|
280
|
+
flex-direction: column
|
|
281
|
+
gap: 1rem
|
|
282
|
+
.topic-title
|
|
283
|
+
story-title()
|
|
284
|
+
margin: 0 0 0.5rem
|
|
285
|
+
.topic-desc
|
|
286
|
+
text-align: center
|
|
287
|
+
color: var(--text-p2)
|
|
288
|
+
font-size: $fs-14
|
|
289
|
+
line-height: 1.5
|
|
290
|
+
// 左右内边距与文章列表(.post-panel padding: 0 1rem)一致
|
|
291
|
+
padding: 0 1rem
|
|
292
|
+
margin: 0 0 1rem
|
|
293
|
+
.cover
|
|
294
|
+
flex: none
|
|
295
|
+
width: 100%
|
|
296
|
+
aspect-ratio: 2 / 1
|
|
297
|
+
border-radius: $border-card-l
|
|
298
|
+
overflow: hidden
|
|
299
|
+
// 背景图由 .cover 自身背景承载(跟随 corner-shape),子图保留用于 hover 滤镜
|
|
300
|
+
background-image: var(--cover-url)
|
|
301
|
+
background-size: cover
|
|
302
|
+
background-position: center
|
|
303
|
+
// 与 .post-card 相同的 Safari 圆角裁剪兜底(模糊层合成层不跟随 overflow:hidden);
|
|
304
|
+
// 支持 corner-shape 的浏览器移除 clip-path,由自身背景跟随曲率
|
|
305
|
+
@supports not (corner-shape: superellipse(1))
|
|
306
|
+
clip-path: 'inset(0 round %s)' % $border-card-l
|
|
307
|
+
display: block
|
|
308
|
+
img
|
|
309
|
+
width: 100%
|
|
310
|
+
height: 100%
|
|
311
|
+
.post-panel
|
|
312
|
+
flex: none
|
|
313
|
+
width: 100%
|
|
314
|
+
// 左右内边距与文章封面文字区(.cover-info padding: 1rem)一致
|
|
315
|
+
padding: 0 1rem
|
|
316
|
+
.posts
|
|
317
|
+
margin: 0
|
|
318
|
+
// hover 放大覆盖(与 photo 卡片一致,见 .post-card.post.photo:hover 注释)
|
|
319
|
+
.post-card.topic:hover
|
|
320
|
+
.cover:before
|
|
321
|
+
transform: translateZ(0) scale(var(--cover-zoom))
|
|
322
|
+
|
|
252
323
|
.post-list.archives
|
|
253
324
|
@media screen and (max-width: $device-mobile)
|
|
254
325
|
margin: 1rem 0
|
|
@@ -25,16 +25,7 @@
|
|
|
25
25
|
&:after
|
|
26
26
|
font-size: 0.25em
|
|
27
27
|
h2:not([class])
|
|
28
|
-
|
|
29
|
-
content: ''
|
|
30
|
-
display: inline-block
|
|
31
|
-
width: 12px
|
|
32
|
-
height: 1.2em
|
|
33
|
-
background: $c-accent
|
|
34
|
-
transform: skewX(-20deg)
|
|
35
|
-
margin: 0 0.5em
|
|
36
|
-
vertical-align: top
|
|
37
|
-
position: relative
|
|
28
|
+
story-title()
|
|
38
29
|
|
|
39
30
|
h3:not([class])
|
|
40
31
|
position: relative
|
|
@@ -4,23 +4,67 @@
|
|
|
4
4
|
.article.banner
|
|
5
5
|
--text-banner: var(--text)
|
|
6
6
|
background: var(--block)
|
|
7
|
+
// 背景图同时作为横幅自身背景承载(跟随 corner-shape),子图保留用于 hover 滤镜
|
|
8
|
+
background-image: var(--bg-url)
|
|
9
|
+
background-size: cover
|
|
10
|
+
background-position: center
|
|
7
11
|
margin: 0
|
|
8
12
|
height: unset
|
|
13
|
+
// Safari 26.4/26.5 合成层裁剪 bug(WebKit 312584/319993,STP 242/249 才修):
|
|
14
|
+
// 带 filter:blur() 的合成子层(同图模糊层 :before/:after)不执行父级 overflow:hidden + border-radius 圆角裁剪;
|
|
15
|
+
// 子层自身 border-radius/overflow 无效(319993 复现注释),父层 clip-path 实测仍被绕过。
|
|
16
|
+
// 官方建议(WebKit 67950):让圆角父层自身成为层叠上下文并强制合成,使圆角裁剪在合成层层面作用于全部子层。
|
|
17
|
+
// 对照:正常工作的 cover 卡片 .post-card 自带 z-index:0 + position:relative(层叠上下文)。
|
|
18
|
+
// clip-path 保留作为正常浏览器裁剪与额外防御;移动端圆角归零时随 `.banner.top` 一并关闭(见 tag-plugins/banner.styl)
|
|
19
|
+
isolation: isolate
|
|
20
|
+
transform: translateZ(0)
|
|
21
|
+
// clip-path 会把角落硬裁为普通圆角,覆盖 corner-shape;支持 corner-shape 的浏览器移除,
|
|
22
|
+
// 仅在不支持的浏览器(Safari/Firefox)保留圆角兜底
|
|
23
|
+
@supports not (corner-shape: superellipse(1))
|
|
24
|
+
clip-path: 'inset(0 round %s)' % $border-card-l
|
|
9
25
|
|
|
10
26
|
.article.banner
|
|
11
27
|
.bg+.content
|
|
12
28
|
min-height: 200px
|
|
13
29
|
aspect-ratio: hexo-config('article.banner_ratio')
|
|
30
|
+
position: relative
|
|
14
31
|
--text-banner: white
|
|
15
32
|
--button-hover-bg: rgba(white, 0.25)
|
|
16
33
|
|
|
17
34
|
.article.banner .content
|
|
18
35
|
.top
|
|
36
|
+
display: flex
|
|
37
|
+
flex-direction: column
|
|
38
|
+
justify-content: flex-start
|
|
19
39
|
align-items: flex-start
|
|
20
40
|
margin: 1rem calc(1rem - 4px)
|
|
41
|
+
.top-row
|
|
42
|
+
display: flex
|
|
43
|
+
justify-content: space-between
|
|
44
|
+
align-items: flex-start
|
|
45
|
+
width: 100%
|
|
46
|
+
.right
|
|
47
|
+
display: flex
|
|
48
|
+
align-items: center
|
|
49
|
+
flex-shrink: 0
|
|
50
|
+
white-space: nowrap
|
|
51
|
+
.reading
|
|
52
|
+
opacity: .8
|
|
53
|
+
padding: 4px
|
|
54
|
+
.meta-row
|
|
55
|
+
width: 100%
|
|
56
|
+
.bottom
|
|
57
|
+
margin-top: auto
|
|
21
58
|
.title
|
|
22
59
|
font-size: $fsh1
|
|
23
60
|
color: var(--text-banner)
|
|
61
|
+
.subtitle
|
|
62
|
+
// 小字用主题色变体(split 模式下由插件写入 --text-banner-theme)
|
|
63
|
+
color: var(--text-banner-theme, var(--text-banner))
|
|
64
|
+
.reading
|
|
65
|
+
color: var(--text-banner-theme, var(--text-banner))
|
|
66
|
+
.meta-row
|
|
67
|
+
color: var(--text-banner-theme, var(--text-banner))
|
|
24
68
|
h1
|
|
25
69
|
line-height: 1.2
|
|
26
70
|
margin: 0.25rem 0
|
|
@@ -30,48 +74,28 @@
|
|
|
30
74
|
|
|
31
75
|
|
|
32
76
|
|
|
33
|
-
//
|
|
77
|
+
// 背景图覆盖层:与文章列表封面统一(常驻同图渐变模糊层 + 黑色蒙版,hover 放大/变暗)
|
|
34
78
|
.article.banner
|
|
79
|
+
cover-overlay(var(--bg-url), both, '.bg+.content')
|
|
80
|
+
.bg
|
|
81
|
+
// hover 放大用 1.5s 缓动,亮度/饱和度仍按 0.2s(与文章列表封面一致)
|
|
82
|
+
filter: brightness(var(--img-br)) saturate(var(--img-sat))
|
|
83
|
+
transition: all .2s ease-out, transform 1.5s ease-out
|
|
84
|
+
-moz-transition: all .2s ease-out, transform 1.5s ease-out
|
|
85
|
+
-webkit-transition: all .2s ease-out, transform 1.5s ease-out
|
|
86
|
+
-o-transition: all .2s ease-out, transform 1.5s ease-out
|
|
87
|
+
&:hover .bg
|
|
88
|
+
transform: scale(var(--cover-zoom))
|
|
35
89
|
.bg+.content
|
|
36
|
-
|
|
37
|
-
--blur-px: 1em
|
|
38
|
-
--blur-sat: 100%
|
|
90
|
+
// 大尺寸 banner 的模糊层高度按原观感覆盖(默认值见 cover-overlay)
|
|
39
91
|
--blur-height-top: 6rem
|
|
40
92
|
--blur-height-bottom: 7rem
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
--blur-height-top: 6rem
|
|
46
|
-
--blur-height-bottom: 7rem
|
|
47
|
-
--blur-opacity: 1
|
|
48
|
-
background: var(--blur-bg)
|
|
49
|
-
trans1 all
|
|
50
|
-
&:before,&:after
|
|
51
|
-
content: ''
|
|
52
|
-
position: absolute
|
|
53
|
-
z-index 0
|
|
54
|
-
top: 0
|
|
55
|
-
left: 0
|
|
56
|
-
width: 100%
|
|
57
|
-
height: 100%
|
|
58
|
-
// Chromium: corner-shape + overflow:hidden 的合成层裁剪与 backdrop-filter 不兼容,
|
|
59
|
-
// 渐变模糊改用同图模糊层(filter + mask)实现,观感与 backdrop-filter 等价
|
|
60
|
-
background-image: var(--bg-url)
|
|
61
|
-
background-size: cover
|
|
62
|
-
background-position: center
|
|
63
|
-
filter: blur(var(--blur-px)) saturate(var(--blur-sat))
|
|
64
|
-
trans1 all
|
|
65
|
-
opacity var(--blur-opacity)
|
|
66
|
-
pointer-events: none
|
|
67
|
-
&:before
|
|
68
|
-
mask: linear-gradient(black, rgba(black, 0.75) calc(var(--blur-height-top) * 0.5), transparent var(--blur-height-top))
|
|
69
|
-
-webkit-mask: linear-gradient(black, rgba(black, 0.75) calc(var(--blur-height-top) * 0.5), transparent var(--blur-height-top))
|
|
70
|
-
&:after
|
|
71
|
-
mask: linear-gradient(to top, black, rgba(black, 0.75) calc(var(--blur-height-bottom) * 0.5), transparent var(--blur-height-bottom))
|
|
72
|
-
-webkit-mask: linear-gradient(to top, black, rgba(black, 0.75) calc(var(--blur-height-bottom) * 0.5), transparent var(--blur-height-bottom))
|
|
93
|
+
&:before, &:after
|
|
94
|
+
// 模糊层自身也加 clip-path:该合成层是 Safari 跳过父级圆角裁剪的直接漏出源
|
|
95
|
+
@supports not (corner-shape: superellipse(1))
|
|
96
|
+
clip-path: 'inset(0 round %s)' % $border-card-l
|
|
73
97
|
.top,.bottom
|
|
74
|
-
z-index 1
|
|
98
|
+
z-index: 1
|
|
75
99
|
|
|
76
100
|
|
|
77
101
|
.article.banner
|
|
@@ -1,31 +1,24 @@
|
|
|
1
1
|
// 面包屑导航
|
|
2
2
|
.bread-nav
|
|
3
3
|
font-weight: 500
|
|
4
|
-
|
|
5
|
-
justify-content: space-between
|
|
6
|
-
color: var(--text-banner)
|
|
4
|
+
color: var(--text-banner-theme, var(--text-banner))
|
|
7
5
|
.left
|
|
8
6
|
flex: 1
|
|
9
7
|
min-width: 0
|
|
8
|
+
display: flex
|
|
9
|
+
align-items: baseline
|
|
10
10
|
.flex-row
|
|
11
11
|
display: flex
|
|
12
12
|
align-items: baseline
|
|
13
13
|
flex-direction: row
|
|
14
|
-
#breadcrumb
|
|
15
|
-
.reading.right
|
|
16
|
-
margin-left: auto
|
|
17
|
-
white-space: nowrap
|
|
18
|
-
opacity: .8
|
|
19
|
-
.ai-label.right
|
|
20
|
-
margin-left: auto
|
|
21
14
|
a
|
|
22
|
-
color: var(--text-banner)
|
|
15
|
+
color: var(--text-banner-theme, var(--text-banner))
|
|
23
16
|
padding: 4px
|
|
24
17
|
border-radius: 2px
|
|
25
18
|
&:hover
|
|
26
19
|
background: var(--button-hover-bg)
|
|
27
20
|
span
|
|
28
|
-
color: var(--text-banner)
|
|
21
|
+
color: var(--text-banner-theme, var(--text-banner))
|
|
29
22
|
span.sep
|
|
30
23
|
opacity 0.5
|
|
31
24
|
margin: 0
|
|
@@ -63,12 +56,12 @@
|
|
|
63
56
|
a
|
|
64
57
|
display: flex
|
|
65
58
|
align-items: center
|
|
66
|
-
color: var(--text-banner)
|
|
59
|
+
color: var(--text-banner-theme, var(--text-banner))
|
|
67
60
|
svg
|
|
68
61
|
margin-right: 4px
|
|
69
62
|
&.bold
|
|
70
63
|
font-weight: 600
|
|
71
|
-
color: var(--text-banner)
|
|
64
|
+
color: var(--text-banner-theme, var(--text-banner))
|
|
72
65
|
span
|
|
73
66
|
margin-left: 4px
|
|
74
67
|
&:hover
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// 描述 + 文章链接列表公共组件(友链文章订阅 friends_and_posts、专栏卡片 topic_card 共用)
|
|
2
|
+
.post-panel
|
|
3
|
+
display: flex
|
|
4
|
+
justify-content: space-between
|
|
5
|
+
flex-direction: column
|
|
6
|
+
height: 100%
|
|
7
|
+
position: relative
|
|
8
|
+
// 与友链卡片一致的行高(友链上下文由 .user-post-card 提供,专栏上下文在 md-text 下需自行声明)
|
|
9
|
+
line-height: 1.2
|
|
10
|
+
.desc
|
|
11
|
+
font-size: 1.2rem
|
|
12
|
+
color: var(--text-p3)
|
|
13
|
+
font-weight: 400
|
|
14
|
+
margin: 1rem 0
|
|
15
|
+
margin-right: auto
|
|
16
|
+
position: relative
|
|
17
|
+
&:before
|
|
18
|
+
position: absolute
|
|
19
|
+
font-weight: 900
|
|
20
|
+
font-size: 32px
|
|
21
|
+
color: var(--block-border)
|
|
22
|
+
top: 0
|
|
23
|
+
content: '“'
|
|
24
|
+
left: -16px
|
|
25
|
+
trans1 all
|
|
26
|
+
.posts
|
|
27
|
+
margin: 0.5rem 0 1rem 0
|
|
28
|
+
display: flex
|
|
29
|
+
flex-direction: column
|
|
30
|
+
align-items: flex-start
|
|
31
|
+
.post-link
|
|
32
|
+
display: flex
|
|
33
|
+
flex-direction: column
|
|
34
|
+
color: var(--text-p1)
|
|
35
|
+
position: relative
|
|
36
|
+
trans1 color
|
|
37
|
+
&+.post-link
|
|
38
|
+
margin-top: 1rem
|
|
39
|
+
&:before
|
|
40
|
+
content: ''
|
|
41
|
+
position: absolute
|
|
42
|
+
left: -12px
|
|
43
|
+
top: 2px
|
|
44
|
+
height: 'calc(%s - 2px)' % $fs-14
|
|
45
|
+
width: 4px
|
|
46
|
+
border-radius: 4px
|
|
47
|
+
background: var(--block-border)
|
|
48
|
+
trans1 all
|
|
49
|
+
&:hover
|
|
50
|
+
color: var(--accent)
|
|
51
|
+
&:hover:before
|
|
52
|
+
background: var(--accent)
|
|
53
|
+
height: 100%
|
|
54
|
+
top: 0
|
|
55
|
+
span
|
|
56
|
+
display: -webkit-box
|
|
57
|
+
-webkit-box-orient: vertical
|
|
58
|
+
overflow: hidden
|
|
59
|
+
-webkit-line-clamp: 1
|
|
60
|
+
position: relative
|
|
61
|
+
.title
|
|
62
|
+
font-size: $fs-14
|
|
63
|
+
font-weight: 500
|
|
64
|
+
max-width: 100%
|
|
65
|
+
display: -webkit-box
|
|
66
|
+
-webkit-box-orient: vertical
|
|
67
|
+
overflow: hidden
|
|
68
|
+
-webkit-line-clamp: 2
|
|
69
|
+
position: relative
|
|
70
|
+
.date
|
|
71
|
+
font-size: $fs-12
|
|
72
|
+
color: var(--text-p3)
|
|
73
|
+
margin-top: 0.25rem
|
|
74
|
+
.no-post
|
|
75
|
+
font-size: $fs-13
|
|
76
|
+
color: var(--text-p4)
|