hexo-theme-stellar 1.40.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 +90 -0
- package/CONTRIBUTING.md +2 -1
- package/README.md +50 -21
- package/README_EN.md +113 -0
- package/_config.yml +40 -12
- package/_data/icons.yml +248 -37
- package/languages/en.yml +6 -0
- package/languages/zh-CN.yml +6 -0
- package/languages/zh-TW.yml +6 -0
- package/layout/_partial/comments/artalk/script.ejs +25 -8
- package/layout/_partial/comments/beaudar/script.ejs +1 -0
- package/layout/_partial/comments/twikoo/script.ejs +1 -0
- package/layout/_partial/comments/utterances/script.ejs +1 -0
- package/layout/_partial/comments/waline/script.ejs +1 -0
- package/layout/_partial/cover/index.ejs +0 -3
- package/layout/_partial/head.ejs +43 -7
- package/layout/_partial/main/article/article_tags.ejs +16 -0
- package/layout/_partial/main/navbar/article_banner.ejs +33 -20
- package/layout/_partial/main/notebook/note_card.ejs +1 -1
- package/layout/_partial/main/notebook/paginator.ejs +2 -2
- package/layout/_partial/main/pin_slider.ejs +61 -30
- package/layout/_partial/main/post_list/latest_post_card.ejs +25 -0
- package/layout/_partial/main/post_list/paginator.ejs +2 -2
- 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/menubtn.ejs +2 -2
- package/layout/_partial/scripts/bootstrap.ejs +35 -0
- package/layout/_partial/scripts/defines.ejs +27 -2
- package/layout/_partial/scripts.ejs +39 -7
- package/layout/_partial/sidebar/logo.ejs +1 -1
- package/layout/_partial/sidebar/menu.ejs +1 -1
- package/layout/_partial/sidebar/search.ejs +1 -1
- package/layout/_partial/widgets/author.ejs +1 -1
- package/layout/_partial/widgets/components/link.ejs +2 -2
- package/layout/_partial/widgets/ghuser.ejs +1 -1
- package/layout/_partial/widgets/related.ejs +1 -1
- package/layout/_partial/widgets/toc.ejs +3 -3
- package/layout/_partial/widgets/tree.ejs +1 -1
- package/layout/_plugins/adaptive_text.ejs +11 -0
- package/layout/_plugins/copycode.ejs +2 -2
- package/layout/_plugins/fancybox.ejs +4 -2
- package/layout/_plugins/mermaid.ejs +3 -2
- package/layout/_plugins/scrollreveal.ejs +22 -16
- package/layout/_plugins/search/local_search.ejs +4 -3
- package/layout/_plugins/swiper.ejs +2 -1
- package/layout/categories.ejs +1 -1
- package/layout/index.ejs +10 -2
- package/layout/index_topic.ejs +4 -4
- package/layout/page.ejs +3 -0
- package/layout/tags.ejs +1 -0
- package/package.json +3 -3
- package/scripts/events/lib/doc_tree.js +12 -208
- package/scripts/events/lib/notebooks.js +8 -148
- package/scripts/events/lib/utils.js +10 -1
- package/scripts/filters/index.js +1 -0
- package/scripts/filters/lib/img_lazyload.js +4 -0
- package/scripts/filters/lib/img_onerror.js +4 -0
- package/scripts/filters/lib/md_table.js +46 -0
- package/scripts/generators/search.js +12 -18
- package/scripts/generators/stellar-icons.js +47 -0
- package/scripts/helpers/ai_label.js +29 -0
- package/scripts/helpers/icon.js +2 -2
- package/scripts/helpers/json_ld.js +10 -13
- package/scripts/helpers/related_posts.js +0 -7
- package/scripts/helpers/seo.js +9 -0
- package/scripts/helpers/subtitle.js +8 -0
- package/scripts/lib/ai_label.js +55 -0
- package/scripts/lib/doc_tree.js +267 -0
- package/scripts/lib/notebooks.js +181 -0
- package/scripts/lib/search_index.js +82 -0
- package/scripts/lib/seo.js +79 -0
- package/scripts/lib/subtitle.js +24 -0
- package/scripts/tags/lib/about.js +2 -2
- package/scripts/tags/lib/albums.js +1 -1
- package/scripts/tags/lib/banner.js +5 -4
- package/scripts/tags/lib/chat.js +49 -49
- package/scripts/tags/lib/copy.js +1 -1
- package/scripts/tags/lib/friends.js +1 -1
- package/scripts/tags/lib/gallery.js +1 -1
- package/scripts/tags/lib/hashtag.js +1 -1
- package/scripts/tags/lib/image.js +3 -3
- package/scripts/tags/lib/posters.js +1 -1
- package/scripts/tags/lib/sites.js +2 -2
- package/source/css/_common/base.styl +5 -9
- package/source/css/_common/cover-overlay.styl +111 -0
- package/source/css/_common/device.styl +3 -3
- 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/md-table.styl +23 -0
- package/source/css/_components/pages/archives.styl +5 -22
- package/source/css/_components/pages/article-story.styl +5 -14
- package/source/css/_components/partial/article-banner.styl +61 -37
- package/source/css/_components/partial/article-tags.styl +13 -0
- package/source/css/_components/partial/bread-nav.styl +19 -12
- package/source/css/_components/partial/navbar.styl +11 -3
- 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 +25 -5
- 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/table.styl +16 -11
- package/source/css/_components/tag-plugins/timeline.styl +4 -0
- package/source/css/_components/widgets/components.styl +6 -0
- package/source/css/_components/widgets/list.styl +6 -0
- package/source/css/_components/widgets/timeline.styl +2 -2
- package/source/css/_components/widgets/toc.styl +13 -7
- package/source/css/_components/widgets/widgets.styl +8 -7
- package/source/css/_custom.styl +9 -21
- package/source/css/_defines/func.styl +28 -3
- package/source/css/_plugins/index.styl +0 -18
- package/source/css/_plugins/lazyload.styl +1 -0
- package/source/css/{_plugins/comments → comments}/artalk.styl +4 -0
- package/source/css/{_plugins/comments → comments}/twikoo.styl +4 -0
- package/source/css/{_plugins → plugins}/mermaid.styl +3 -0
- package/source/css/{_plugins → plugins}/swiper.styl +5 -1
- package/source/js/color.js +325 -0
- package/source/js/icons.js +60 -0
- package/source/js/main.js +115 -1
- package/source/js/plugins/adaptive-text.js +146 -0
- package/source/js/search/highlight.js +82 -0
- package/source/js/search/local-search.js +294 -103
- package/source/js/services/friends_and_posts.js +1 -1
- package/source/js/services/timeline.js +1 -1
- package/source/js/services/weibo.js +3 -3
- package/source/js/services.js +179 -0
- package/source/js/tagtree.js +29 -0
- package/source/js/theme.js +61 -0
- package/{layout/_partial/scripts/utils.ejs → source/js/utils.js} +27 -11
- package/layout/_partial/cover/post_cover.ejs +0 -37
- package/layout/_partial/scripts/services.ejs +0 -178
- package/layout/_partial/scripts/sidebar.ejs +0 -25
- package/layout/_partial/scripts/tagtree.ejs +0 -29
- package/layout/_partial/scripts/theme.ejs +0 -67
- /package/source/css/{_plugins/comments → comments}/beaudar.styl +0 -0
- /package/source/css/{_plugins/comments → comments}/utterances.styl +0 -0
- /package/source/css/{_plugins/comments → comments}/waline.styl +0 -0
- /package/source/css/{_plugins → plugins}/fancybox.styl +0 -0
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
border-radius: $border-image
|
|
3
3
|
&.top
|
|
4
4
|
border-radius: $border-card-l
|
|
5
|
+
// 背景图同时作为横幅自身背景承载(跟随 corner-shape),子图保留用于 hover 滤镜
|
|
6
|
+
background-image: var(--bg-url)
|
|
7
|
+
background-size: cover
|
|
8
|
+
background-position: center
|
|
5
9
|
position: relative
|
|
6
10
|
overflow: hidden
|
|
7
11
|
display: flex
|
|
@@ -15,12 +19,15 @@
|
|
|
15
19
|
z-index: 0
|
|
16
20
|
.content
|
|
17
21
|
z-index: 1
|
|
22
|
+
position: relative
|
|
18
23
|
width: 100%
|
|
19
24
|
height: 100%
|
|
20
25
|
display: flex
|
|
21
26
|
flex-direction: column
|
|
22
27
|
justify-content: space-between
|
|
23
28
|
.top
|
|
29
|
+
// 文字区保持在背景图(img.bg z-index 0)之上
|
|
30
|
+
z-index: 1
|
|
24
31
|
display: flex
|
|
25
32
|
justify-content: space-between
|
|
26
33
|
align-items: center
|
|
@@ -37,7 +44,8 @@
|
|
|
37
44
|
.link
|
|
38
45
|
margin: 0
|
|
39
46
|
border-radius: 4px
|
|
40
|
-
color:
|
|
47
|
+
color: var(--text-banner-theme, var(--text-banner))
|
|
48
|
+
opacity: .8
|
|
41
49
|
padding: 2px 6px
|
|
42
50
|
background: none
|
|
43
51
|
line-height: 1.5
|
|
@@ -48,10 +56,12 @@
|
|
|
48
56
|
&:after
|
|
49
57
|
content: none
|
|
50
58
|
&:hover
|
|
51
|
-
color:
|
|
59
|
+
color: var(--text-banner-theme, var(--text-banner))
|
|
60
|
+
opacity: 1
|
|
52
61
|
background: rgba(white, 0.25)
|
|
53
62
|
&.active
|
|
54
|
-
color:
|
|
63
|
+
color: var(--text-banner-theme, var(--text-banner))
|
|
64
|
+
opacity: 1
|
|
55
65
|
background: rgba(white, 0.25)
|
|
56
66
|
|
|
57
67
|
.back
|
|
@@ -64,7 +74,7 @@
|
|
|
64
74
|
svg
|
|
65
75
|
width: 20px
|
|
66
76
|
height: 20px
|
|
67
|
-
fill:
|
|
77
|
+
fill: var(--text-banner-theme, var(--text-banner))
|
|
68
78
|
.banner-link
|
|
69
79
|
position: absolute
|
|
70
80
|
top: 0
|
|
@@ -91,13 +101,17 @@
|
|
|
91
101
|
width: 48px
|
|
92
102
|
height: 48px
|
|
93
103
|
.bottom
|
|
104
|
+
// 同 .top:文字区保持在背景图之上
|
|
105
|
+
z-index: 1
|
|
94
106
|
display: flex
|
|
95
107
|
padding: 1rem
|
|
96
108
|
width: 100%
|
|
97
109
|
box-sizing: border-box
|
|
98
110
|
.title
|
|
99
111
|
font-size: 1.5rem
|
|
100
|
-
font-weight:
|
|
112
|
+
font-weight: 700
|
|
113
|
+
// 与封面 headline 同款描边,避免标题在复杂背景上发虚
|
|
114
|
+
text-shadow: 0 2px 4px rgba(0,0,0,0.2)
|
|
101
115
|
.avatar+.text-area
|
|
102
116
|
margin-left: 0.75rem
|
|
103
117
|
.text-area .text
|
|
@@ -108,26 +122,54 @@
|
|
|
108
122
|
font-size: 1.2rem
|
|
109
123
|
.subtitle
|
|
110
124
|
font-size: $fs-14
|
|
125
|
+
color: var(--text-banner-theme, var(--text-banner))
|
|
111
126
|
.content:only-child
|
|
112
127
|
color: var(--text-p1)
|
|
113
128
|
.bg+.content
|
|
114
|
-
|
|
129
|
+
--text-banner: white
|
|
130
|
+
color: var(--text-banner)
|
|
115
131
|
.avatar
|
|
116
|
-
border: 2px solid
|
|
132
|
+
border: 2px solid var(--text-banner)
|
|
117
133
|
margin: 0
|
|
118
134
|
.bottom
|
|
119
|
-
background-image: linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0.2))
|
|
120
135
|
text-shadow: 0 0 1px rgba(0,0,0,0.12)
|
|
121
136
|
|
|
122
137
|
.tag-plugin.banner
|
|
123
|
-
|
|
138
|
+
// 内容区用绝对定位铺满整卡:避免 flex 百分比高度(height: 100%)在不同浏览器解析不一致,
|
|
139
|
+
// 导致 .top/.bottom 无法贴顶/贴底(navbar 掉到中间)
|
|
140
|
+
.content
|
|
141
|
+
position: absolute
|
|
142
|
+
top: 0
|
|
143
|
+
left: 0
|
|
144
|
+
right: 0
|
|
145
|
+
bottom: 0
|
|
146
|
+
// banner 标签不使用渐变模糊覆盖层(cover-overlay 仅用于封面/页顶 banner):
|
|
147
|
+
// 纯背景图 + 自适应文字颜色,hover 保留背景图放大与变暗
|
|
148
|
+
--img-br: 100%
|
|
149
|
+
--img-sat: 100%
|
|
150
|
+
--cover-zoom: 1.05
|
|
124
151
|
&:hover
|
|
152
|
+
--img-br: 75%
|
|
153
|
+
--img-sat: 120%
|
|
125
154
|
img.bg
|
|
126
|
-
|
|
155
|
+
transform: scale(var(--cover-zoom))
|
|
156
|
+
img.bg
|
|
157
|
+
filter: brightness(var(--img-br)) saturate(var(--img-sat))
|
|
158
|
+
// 封面放大用 1.5s 缓动,其余属性(亮度/饱和度)保持主题默认 0.2s
|
|
159
|
+
transition: all .2s ease-out, transform 1.5s ease-out
|
|
160
|
+
-moz-transition: all .2s ease-out, transform 1.5s ease-out
|
|
161
|
+
-webkit-transition: all .2s ease-out, transform 1.5s ease-out
|
|
162
|
+
-o-transition: all .2s ease-out, transform 1.5s ease-out
|
|
127
163
|
|
|
128
164
|
.tag-plugin.banner .navbar a.active
|
|
129
|
-
blur-effect()
|
|
165
|
+
// 不使用 blur-effect()(backdrop-filter):banner 是 overflow:hidden + 圆角/连续曲率的裁剪容器,
|
|
166
|
+
// backdrop-filter 在部分浏览器(Safari / 旧版 Chromium)会破坏父级圆角裁剪,
|
|
167
|
+
// hover 放大背景图时四角变直角;改用与 hover 一致的半透明白底
|
|
168
|
+
background: rgba(white, 0.25)
|
|
169
|
+
&:hover
|
|
170
|
+
background-color: var(--card)
|
|
130
171
|
|
|
131
172
|
@media screen and (max-width: $device-mobile-max)
|
|
132
173
|
.banner.top
|
|
133
174
|
border-radius: 0
|
|
175
|
+
clip-path: none
|
|
@@ -67,96 +67,15 @@
|
|
|
67
67
|
display: block
|
|
68
68
|
width: 64px
|
|
69
69
|
height: 64px
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
.previews
|
|
73
|
-
display: flex
|
|
74
|
-
justify-content: space-between
|
|
75
|
-
flex-direction: column
|
|
76
|
-
height: 100%
|
|
77
|
-
position: relative
|
|
78
|
-
.empty
|
|
79
|
-
min-height: 1rem
|
|
80
|
-
.desc
|
|
81
|
-
font-size: 1.2rem
|
|
82
|
-
color: var(--text-p3)
|
|
83
|
-
font-weight: 400
|
|
84
|
-
margin: 1rem 0
|
|
85
|
-
margin-right: auto
|
|
86
|
-
position: relative
|
|
87
|
-
&:before
|
|
88
|
-
position: absolute
|
|
89
|
-
font-weight: 900
|
|
90
|
-
font-size: 32px
|
|
91
|
-
color: var(--block-border)
|
|
92
|
-
top: 0
|
|
93
|
-
content: '“'
|
|
94
|
-
left: -16px
|
|
95
|
-
trans1 all
|
|
96
|
-
.spacer
|
|
97
|
-
height: 100%
|
|
98
|
-
.posts
|
|
99
|
-
margin: 0.5rem 0 1rem 0
|
|
100
|
-
display: flex
|
|
101
|
-
flex-direction: column
|
|
102
|
-
align-items: flex-start
|
|
103
|
-
.post-link
|
|
104
|
-
display: flex
|
|
105
|
-
flex-direction: column
|
|
106
|
-
color: var(--text-p1)
|
|
107
|
-
position: relative
|
|
108
|
-
trans1 color
|
|
109
|
-
&+.post-link
|
|
110
|
-
margin-top: 1rem
|
|
111
|
-
&:before
|
|
112
|
-
content: ''
|
|
113
|
-
position: absolute
|
|
114
|
-
left: -12px
|
|
115
|
-
top: 2px
|
|
116
|
-
height: 'calc(%s - 2px)' % $fs-14
|
|
117
|
-
width: 4px
|
|
118
|
-
border-radius: 4px
|
|
119
|
-
background: var(--block-border)
|
|
120
|
-
trans1 all
|
|
121
|
-
&:hover:before
|
|
122
|
-
background: var(--accent)
|
|
123
|
-
// height: calc(100% - 4px)
|
|
124
|
-
height: 100%
|
|
125
|
-
top: 0
|
|
126
|
-
span
|
|
127
|
-
display: -webkit-box
|
|
128
|
-
-webkit-box-orient: vertical
|
|
129
|
-
overflow: hidden
|
|
130
|
-
-webkit-line-clamp: 1
|
|
131
|
-
position: relative
|
|
132
|
-
.title
|
|
133
|
-
font-size: $fs-14
|
|
134
|
-
font-weight: 500
|
|
135
|
-
max-width: 100%
|
|
136
|
-
display: -webkit-box
|
|
137
|
-
-webkit-box-orient: vertical
|
|
138
|
-
overflow: hidden
|
|
139
|
-
-webkit-line-clamp: 2
|
|
140
|
-
position: relative
|
|
141
|
-
.date
|
|
142
|
-
font-size: $fs-12
|
|
143
|
-
color: var(--text-p3)
|
|
144
|
-
margin-top: 0.25rem
|
|
145
|
-
.no-post
|
|
146
|
-
font-size: $fs-13
|
|
147
|
-
color: var(--text-p4)
|
|
148
|
-
|
|
149
|
-
|
|
150
70
|
// transform
|
|
151
71
|
.users-posts-wrap .user-post-card
|
|
152
72
|
&:hover
|
|
153
|
-
.
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
73
|
+
.post-panel
|
|
74
|
+
.desc
|
|
75
|
+
&:before
|
|
76
|
+
color: var(--accent)
|
|
77
|
+
transform: scale(1.2) translateX(-4px)
|
|
157
78
|
.card-link:hover
|
|
158
79
|
.lazy-box
|
|
159
80
|
transform: scale(1.2) rotate(8deg)
|
|
160
81
|
box-shadow: $boxshadow-card-float
|
|
161
|
-
.post-link:hover
|
|
162
|
-
color: var(--accent)
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
display: flex
|
|
3
3
|
flex-direction: column
|
|
4
4
|
align-items: center
|
|
5
|
-
padding-top: var(--gap-
|
|
6
|
-
padding-bottom: var(--gap-
|
|
5
|
+
padding-top: var(--gap-base)
|
|
6
|
+
padding-bottom: var(--gap-base)
|
|
7
7
|
>.content
|
|
8
8
|
border-left: 1px dashed var(--text-meta)
|
|
9
9
|
border-right: 1px dashed var(--text-meta)
|
|
@@ -95,4 +95,4 @@
|
|
|
95
95
|
p
|
|
96
96
|
margin: 0
|
|
97
97
|
>.title
|
|
98
|
-
border-top: 1px solid var(--text-meta)
|
|
98
|
+
border-top: 1px solid var(--text-meta)
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
display: flex
|
|
3
3
|
flex-direction: column
|
|
4
4
|
align-items: center
|
|
5
|
-
padding-top: var(--gap-
|
|
6
|
-
padding-bottom: var(--gap-
|
|
5
|
+
padding-top: var(--gap-base)
|
|
6
|
+
padding-bottom: var(--gap-base)
|
|
7
7
|
>.content
|
|
8
8
|
display: flex
|
|
9
9
|
flex-direction: column
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
>.body
|
|
23
23
|
overflow: auto
|
|
24
24
|
scrollbar()
|
|
25
|
-
margin: 'calc(%s - 4px) %s' % var(--gap-
|
|
25
|
+
margin: 'calc(%s - 4px) %s' % var(--gap-base)
|
|
26
26
|
.main
|
|
27
27
|
p
|
|
28
28
|
margin: 0;
|
|
@@ -100,4 +100,4 @@
|
|
|
100
100
|
top: calc(100% + 1rem - 6px)
|
|
101
101
|
bottom: calc(-1rem - 6px)
|
|
102
102
|
border-radius: 4px
|
|
103
|
-
background: var(--accent)
|
|
103
|
+
background: var(--accent)
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
// 表格标签(#466):{% table style:scroll|wrap|compact %}
|
|
2
2
|
.tag-plugin.table
|
|
3
3
|
table
|
|
4
|
-
|
|
4
|
+
display: table
|
|
5
|
+
border-collapse: separate
|
|
6
|
+
border-spacing: 0
|
|
5
7
|
width: 100%
|
|
8
|
+
border: 1px solid var(--block-border)
|
|
9
|
+
border-radius: $border-card
|
|
10
|
+
overflow: hidden
|
|
11
|
+
th
|
|
12
|
+
border-top: none
|
|
13
|
+
th, td
|
|
14
|
+
border-left: 1px solid var(--block-border)
|
|
15
|
+
&:first-child
|
|
16
|
+
border-left: none
|
|
6
17
|
&.table-scroll
|
|
7
18
|
overflow-x: auto
|
|
8
19
|
-webkit-overflow-scrolling: touch
|
|
@@ -14,24 +25,18 @@
|
|
|
14
25
|
&.table-wrap
|
|
15
26
|
table
|
|
16
27
|
table-layout: fixed
|
|
17
|
-
border-collapse: separate
|
|
18
|
-
border-spacing: 0
|
|
19
|
-
border: 1px solid var(--block-border)
|
|
20
|
-
border-radius: $border-card
|
|
21
|
-
overflow: hidden
|
|
22
28
|
tr
|
|
23
29
|
white-space: normal
|
|
24
|
-
th
|
|
25
|
-
border-top: none
|
|
26
30
|
th, td
|
|
27
31
|
word-break: break-word
|
|
28
32
|
overflow-wrap: anywhere
|
|
29
33
|
padding: 8px 1em
|
|
30
|
-
border-left: 1px solid var(--block-border)
|
|
31
|
-
&:first-child
|
|
32
|
-
border-left: none
|
|
33
34
|
&.table-compact
|
|
35
|
+
overflow-x: auto
|
|
36
|
+
-webkit-overflow-scrolling: touch
|
|
37
|
+
scrollbar()
|
|
34
38
|
table
|
|
39
|
+
min-width: max-content
|
|
35
40
|
th, td
|
|
36
41
|
padding: 4px 1em
|
|
37
42
|
line-height: 1.4
|
|
@@ -48,6 +48,12 @@
|
|
|
48
48
|
filter: grayscale(100%) brightness(0.8) opacity(0.8)
|
|
49
49
|
trans1 filter
|
|
50
50
|
flex-shrink: 0
|
|
51
|
+
.linklist .link .active-dot
|
|
52
|
+
flex-shrink: 0
|
|
53
|
+
width: 8px
|
|
54
|
+
height: 8px
|
|
55
|
+
border-radius: 50%
|
|
56
|
+
background: x-theme-gradient()
|
|
51
57
|
|
|
52
58
|
.widget-body .linklist.left
|
|
53
59
|
grid-gap: 2px
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
z-index 1
|
|
15
15
|
margin-top: 0.25rem
|
|
16
16
|
.header
|
|
17
|
-
margin: 0.25rem var(--gap-
|
|
17
|
+
margin: 0.25rem var(--gap-base)
|
|
18
18
|
.user-info
|
|
19
19
|
background: none
|
|
20
20
|
padding-right: 0
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
display: none
|
|
23
23
|
|
|
24
24
|
.header:before
|
|
25
|
-
left: calc(6px - var(--gap-
|
|
25
|
+
left: calc(6px - var(--gap-base))
|
|
26
26
|
.body
|
|
27
27
|
border-radius: $border-card
|
|
28
28
|
padding: 0.5rem 1rem
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
margin: 0
|
|
32
32
|
list-style: none
|
|
33
33
|
a
|
|
34
|
-
--padding: calc(var(--gap-
|
|
34
|
+
--padding: calc(var(--gap-base) / 2)
|
|
35
35
|
--padding-offset: calc(0 - var(--padding))
|
|
36
36
|
padding: 4px var(--padding)
|
|
37
37
|
margin: 0 var(--padding)
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
top: 0
|
|
62
62
|
padding: 1rem 0
|
|
63
63
|
&:first-child
|
|
64
|
-
top: var(--gap-
|
|
64
|
+
top: var(--gap-page)
|
|
65
65
|
padding-top: 1rem
|
|
66
66
|
.widget-body .toc
|
|
67
67
|
max-height: 70vh
|
|
@@ -142,14 +142,14 @@
|
|
|
142
142
|
grid-template-rows: 0fr
|
|
143
143
|
|
|
144
144
|
// 操作按钮(回到顶部 / 参与讨论)
|
|
145
|
-
.widget-wrapper.toc .widget-
|
|
145
|
+
.widget-wrapper.toc .widget-footer:before
|
|
146
146
|
content: ''
|
|
147
147
|
position absolute
|
|
148
148
|
background: var(--block-border)
|
|
149
149
|
top: 0
|
|
150
150
|
height: 1px
|
|
151
|
-
left: var(--gap-
|
|
152
|
-
right: var(--gap-
|
|
151
|
+
left: var(--gap-base)
|
|
152
|
+
right: var(--gap-base)
|
|
153
153
|
.widget-wrapper.toc .widget-footer
|
|
154
154
|
margin-top: 8px
|
|
155
155
|
color: var(--text-p2)
|
|
@@ -160,12 +160,18 @@
|
|
|
160
160
|
align-items: center
|
|
161
161
|
color: inherit
|
|
162
162
|
font-size: $fs-14
|
|
163
|
-
padding: 8px var(--gap-
|
|
163
|
+
padding: 8px var(--gap-base)
|
|
164
164
|
border-radius: $border-bar
|
|
165
165
|
trans1 all
|
|
166
|
-
svg
|
|
166
|
+
svg
|
|
167
|
+
width: 16px
|
|
168
|
+
height: 16px
|
|
169
|
+
flex-shrink: 0
|
|
170
|
+
margin-right: 8px
|
|
171
|
+
img
|
|
167
172
|
height: 16px
|
|
168
173
|
width: auto
|
|
174
|
+
flex-shrink: 0
|
|
169
175
|
margin-right: 8px
|
|
170
176
|
a:hover
|
|
171
177
|
background: var(--block-border)
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
scrollbar(0, 0)
|
|
11
11
|
z-index: 1
|
|
12
12
|
line-height: 1.2
|
|
13
|
-
margin: 0 var(--gap-
|
|
13
|
+
margin: 0 var(--gap-base)
|
|
14
14
|
.widget-wrapper
|
|
15
15
|
.widget-header
|
|
16
|
-
padding-left: var(--gap-
|
|
17
|
-
padding-right: var(--gap-
|
|
16
|
+
padding-left: var(--gap-base)
|
|
17
|
+
padding-right: var(--gap-base)
|
|
18
18
|
display: flex
|
|
19
19
|
justify-content: space-between
|
|
20
20
|
align-items: baseline
|
|
@@ -64,19 +64,20 @@
|
|
|
64
64
|
.l_left .widgets
|
|
65
65
|
padding-bottom: 64px
|
|
66
66
|
.l_right .widgets
|
|
67
|
-
padding:
|
|
67
|
+
padding: 0
|
|
68
68
|
&:empty
|
|
69
69
|
display: none
|
|
70
70
|
.widget-wrapper:first-child
|
|
71
71
|
margin-top: 0
|
|
72
72
|
.widget-wrapper
|
|
73
73
|
.widget-header
|
|
74
|
-
padding-left: var(--gap-
|
|
75
|
-
padding-right: var(--gap-
|
|
74
|
+
padding-left: var(--gap-base)
|
|
75
|
+
padding-right: var(--gap-base)
|
|
76
76
|
// 小屏幕
|
|
77
77
|
@media screen and (max-width: $device-laptop)
|
|
78
|
+
padding: var(--gap-base) 0
|
|
78
79
|
.widget-wrapper
|
|
79
|
-
margin-top: var(--gap-
|
|
80
|
+
margin-top: var(--gap-base)
|
|
80
81
|
border-radius: $border-card-s
|
|
81
82
|
// 大屏幕
|
|
82
83
|
@media screen and (min-width: $device-laptop)
|
package/source/css/_custom.styl
CHANGED
|
@@ -42,22 +42,11 @@ $c-link = convert(hexo-config('style.color.link'))
|
|
|
42
42
|
|
|
43
43
|
$c-base-hue = 210deg // 背景/文本颜色的主基调(一般看不出来不需要修改)
|
|
44
44
|
|
|
45
|
-
// icons
|
|
46
|
-
|
|
47
|
-
$iQuoteLeft = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24'%3E%3C!-- Icon from BoxIcons Solid by Atisa - https://creativecommons.org/licenses/by/4.0/ --%3E%3Cpath fill='currentColor' d='M3.691 6.292C5.094 4.771 7.217 4 10 4h1v2.819l-.804.161c-1.37.274-2.323.813-2.833 1.604A2.9 2.9 0 0 0 6.925 10H10a1 1 0 0 1 1 1v7c0 1.103-.897 2-2 2H3a1 1 0 0 1-1-1v-5l.003-2.919c-.009-.111-.199-2.741 1.688-4.789M20 20h-6a1 1 0 0 1-1-1v-5l.003-2.919c-.009-.111-.199-2.741 1.688-4.789C16.094 4.771 18.217 4 21 4h1v2.819l-.804.161c-1.37.274-2.323.813-2.833 1.604A2.9 2.9 0 0 0 17.925 10H21a1 1 0 0 1 1 1v7c0 1.103-.897 2-2 2'/%3E%3C/svg%3E"
|
|
48
|
-
$iQuoteRight = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24'%3E%3C!-- Icon from BoxIcons Solid by Atisa - https://creativecommons.org/licenses/by/4.0/ --%3E%3Cpath fill='currentColor' d='M20.309 17.708C22.196 15.66 22.006 13.03 22 13V5a1 1 0 0 0-1-1h-6c-1.103 0-2 .897-2 2v7a1 1 0 0 0 1 1h3.078a2.9 2.9 0 0 1-.429 1.396c-.508.801-1.465 1.348-2.846 1.624l-.803.16V20h1c2.783 0 4.906-.771 6.309-2.292m-11.007 0C11.19 15.66 10.999 13.03 10.993 13V5a1 1 0 0 0-1-1h-6c-1.103 0-2 .897-2 2v7a1 1 0 0 0 1 1h3.078a2.9 2.9 0 0 1-.429 1.396c-.508.801-1.465 1.348-2.846 1.624l-.803.16V20h1c2.783 0 4.906-.771 6.309-2.292'/%3E%3C/svg%3E"
|
|
49
|
-
|
|
50
|
-
$iH3Left = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24'%3E%3C!-- Icon from Solar by 480 Design - https://creativecommons.org/licenses/by/4.0/ --%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M13.488 4.43a.75.75 0 0 1 .081 1.058L7.988 12l5.581 6.512a.75.75 0 1 1-1.138.976l-6-7a.75.75 0 0 1 0-.976l6-7a.75.75 0 0 1 1.057-.081' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M17.75 5a.75.75 0 0 0-1.32-.488l-6 7a.75.75 0 0 0 0 .976l6 7A.75.75 0 0 0 17.75 19z'/%3E%3C/svg%3E"
|
|
51
|
-
$iH3Right = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24'%3E%3C!-- Icon from Solar by 480 Design - https://creativecommons.org/licenses/by/4.0/ --%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.512 4.43a.75.75 0 0 0-.081 1.058L16.012 12l-5.581 6.512a.75.75 0 1 0 1.138.976l6-7a.75.75 0 0 0 0-.976l-6-7a.75.75 0 0 0-1.057-.081' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' d='M6.25 5a.75.75 0 0 1 1.32-.488l6 7a.75.75 0 0 1 0 .976l-6 7A.75.75 0 0 1 6.25 19z'/%3E%3C/svg%3E"
|
|
52
|
-
|
|
53
|
-
$iLoadingIcon = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%231cd0fd' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath stroke-dasharray='16' stroke-dashoffset='16' d='M12 3c4.97 0 9 4.03 9 9'%3E%3Canimate fill='freeze' attributeName='stroke-dashoffset' dur='0.6s' values='16;0'/%3E%3CanimateTransform attributeName='transform' dur='3s' repeatCount='indefinite' type='rotate' values='0 12 12;360 12 12'/%3E%3C/path%3E%3Cpath stroke-dasharray='64' stroke-dashoffset='64' stroke-opacity='0.3' d='M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9Z'%3E%3Canimate fill='freeze' attributeName='stroke-dashoffset' dur='2.4s' values='64;0'/%3E%3C/path%3E%3C/g%3E%3C/svg%3E"
|
|
54
|
-
|
|
55
|
-
|
|
56
45
|
$border-card-l = convert(hexo-config('style.border-radius.card-l'))
|
|
57
46
|
$border-card = convert(hexo-config('style.border-radius.card'))
|
|
58
47
|
$border-card-s = convert(hexo-config('style.border-radius.card-s'))
|
|
59
48
|
$border-bar = convert(hexo-config('style.border-radius.bar'))
|
|
60
|
-
$bar-item-gap =
|
|
49
|
+
$bar-item-gap = 4px // bar 容器内按钮/标签之间的间距与距边距离(gap + padding 共用)
|
|
61
50
|
$border-bar-container = 'calc(%s + %s)' % ($border-bar $bar-item-gap) // bar 容器圆角 = 按钮圆角($border-bar)+ 间距,保持同心
|
|
62
51
|
$border-image-l = convert(hexo-config('style.border-radius.image-l'))
|
|
63
52
|
$border-image = convert(hexo-config('style.border-radius.image'))
|
|
@@ -75,10 +64,14 @@ $corner-shape = convert(hexo-config('style.corner-shape'))
|
|
|
75
64
|
|
|
76
65
|
// 侧边栏文字内容宽度
|
|
77
66
|
--side-content-width: 224px
|
|
78
|
-
//
|
|
79
|
-
--gap-
|
|
80
|
-
//
|
|
81
|
-
--gap-
|
|
67
|
+
// 组件内部基础间距(margin/padding 统一)
|
|
68
|
+
--gap-base: 16px
|
|
69
|
+
// 页面级留白(侧边栏/内容区/列间距),笔记本及以上放宽
|
|
70
|
+
--gap-page: 16px
|
|
71
|
+
@media screen and (min-width: $device-laptop)
|
|
72
|
+
--gap-page: 32px
|
|
73
|
+
// 右栏宽度增量(在 --width-sidebar 基础上加宽)
|
|
74
|
+
--rightbar-width-extra: calc(var(--gap-base) * 2)
|
|
82
75
|
|
|
83
76
|
--gap-p: 'calc(%s + 4px)' % $fs-body // gap for paragraph
|
|
84
77
|
--gap-p-compact: 'calc(%s * 0.75)' % $fs-body
|
|
@@ -94,11 +87,6 @@ $corner-shape = convert(hexo-config('style.corner-shape'))
|
|
|
94
87
|
@media screen and (max-width: $device-mobile-max)
|
|
95
88
|
--side-content-width: 224px
|
|
96
89
|
|
|
97
|
-
// 动态计算值
|
|
98
|
-
:root
|
|
99
|
-
// 元素文本内容到容器边缘的间距
|
|
100
|
-
--gap-max: calc(var(--gap-margin) + var(--gap-padding))
|
|
101
|
-
|
|
102
90
|
// shadow
|
|
103
91
|
$boxshadow-card = 0 1px 2px 0px rgba(0, 0, 0, 0.1)
|
|
104
92
|
$boxshadow-float = 0 4px 8px 0px rgba(0, 0, 0, 0.05)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
svg-mask-icon($
|
|
2
|
-
-webkit-mask-image:
|
|
1
|
+
svg-mask-icon($img)
|
|
2
|
+
-webkit-mask-image: $img
|
|
3
3
|
-webkit-mask-repeat: no-repeat
|
|
4
4
|
-webkit-mask-position: center
|
|
5
5
|
-webkit-mask-size: contain
|
|
6
|
-
mask-image:
|
|
6
|
+
mask-image: $img
|
|
7
7
|
mask-repeat: no-repeat
|
|
8
8
|
mask-position: center
|
|
9
9
|
mask-size: contain
|
|
@@ -109,6 +109,31 @@ hover-block($v, $h, $br = 4px)
|
|
|
109
109
|
&:hover
|
|
110
110
|
background: var(--block-border)
|
|
111
111
|
|
|
112
|
+
// 标签胶囊(标签页 /blog/tags/ 与文章底部标签复用;间距由容器负边距抵消)
|
|
113
|
+
tag-chip()
|
|
114
|
+
display: inline-flex
|
|
115
|
+
align-items: center
|
|
116
|
+
position: relative
|
|
117
|
+
color: var(--text-p2)
|
|
118
|
+
margin: .5rem
|
|
119
|
+
padding: .5em .75rem
|
|
120
|
+
border-radius: 999px
|
|
121
|
+
background: var(--block)
|
|
122
|
+
font-size: $fs-13
|
|
123
|
+
font-weight: 500
|
|
124
|
+
trans1 all
|
|
125
|
+
svg
|
|
126
|
+
width: 1em
|
|
127
|
+
height: 1em
|
|
128
|
+
margin-right: .25em
|
|
129
|
+
opacity: .4
|
|
130
|
+
&:hover
|
|
131
|
+
color: var(--text)
|
|
132
|
+
background: var(--block-border)
|
|
133
|
+
svg
|
|
134
|
+
color: var(--theme)
|
|
135
|
+
opacity: 1
|
|
136
|
+
|
|
112
137
|
floatable-trans()
|
|
113
138
|
trans2 transform box-shadow
|
|
114
139
|
floatable-float()
|
|
@@ -2,29 +2,11 @@
|
|
|
2
2
|
@import 'aplayer'
|
|
3
3
|
|
|
4
4
|
// 根据主题配置加载
|
|
5
|
-
if hexo-config('plugins.swiper.enable')
|
|
6
|
-
@import 'swiper'
|
|
7
5
|
if hexo-config('plugins.scrollreveal.enable')
|
|
8
6
|
@import 'scrollreveal'
|
|
9
|
-
if hexo-config('plugins.fancybox.enable')
|
|
10
|
-
@import 'fancybox'
|
|
11
|
-
if hexo-config('plugins.mermaid.style_optimization')
|
|
12
|
-
@import 'mermaid'
|
|
13
7
|
if hexo-config('plugins.copycode.enable')
|
|
14
8
|
@import 'copycode'
|
|
15
9
|
if hexo-config('plugins.tianli_gpt.enable')
|
|
16
10
|
@import 'tianli_gpt'
|
|
17
11
|
if hexo-config('plugins.katex.enable')
|
|
18
12
|
@import 'katex'
|
|
19
|
-
|
|
20
|
-
// 评论
|
|
21
|
-
if hexo-config('comments.service') == 'beaudar' or index(hexo-config('comments.custom_css'), 'beaudar') >= 0
|
|
22
|
-
@import 'comments/beaudar'
|
|
23
|
-
if hexo-config('comments.service') == 'twikoo' or index(hexo-config('comments.custom_css'), 'twikoo') >= 0
|
|
24
|
-
@import 'comments/twikoo'
|
|
25
|
-
if hexo-config('comments.service') == 'utterances' or index(hexo-config('comments.custom_css'), 'utterances') >= 0
|
|
26
|
-
@import 'comments/utterances'
|
|
27
|
-
if hexo-config('comments.service') == 'waline' or index(hexo-config('comments.custom_css'), 'waline') >= 0
|
|
28
|
-
@import 'comments/waline'
|
|
29
|
-
if hexo-config('comments.service') == 'artalk' or index(hexo-config('comments.custom_css'), 'artalk') >= 0
|
|
30
|
-
@import 'comments/artalk'
|