hexo-theme-stellar 1.39.1 → 1.41.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 +2 -2
- package/CHANGELOG.md +70 -0
- package/_config.yml +38 -11
- package/_data/icons.yml +250 -37
- package/languages/en.yml +8 -0
- package/languages/zh-CN.yml +8 -0
- package/languages/zh-TW.yml +8 -0
- package/layout/_partial/comments/artalk/script.ejs +26 -1
- 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/head.ejs +54 -9
- package/layout/_partial/main/article/article_tags.ejs +16 -0
- package/layout/_partial/main/navbar/article_banner.ejs +17 -0
- package/layout/_partial/main/navbar/dateinfo.ejs +1 -1
- 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 +2 -2
- package/layout/_partial/main/post_list/paginator.ejs +2 -2
- package/layout/_partial/main/post_list/post_card.ejs +11 -0
- package/layout/_partial/menubtn.ejs +2 -2
- package/layout/_partial/scripts/defines.ejs +26 -2
- package/layout/_partial/scripts.ejs +30 -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/markdown.ejs +1 -1
- package/layout/_partial/widgets/related.ejs +1 -1
- package/layout/_partial/widgets/toc.ejs +9 -2
- package/layout/_partial/widgets/tree.ejs +1 -1
- package/layout/_plugins/fancybox.ejs +4 -2
- package/layout/_plugins/mermaid.ejs +2 -1
- package/layout/_plugins/search/local_search.ejs +4 -3
- package/layout/_plugins/swiper.ejs +1 -0
- package/layout/categories.ejs +18 -8
- package/layout/page.ejs +8 -1
- package/layout/tags.ejs +1 -0
- package/package.json +5 -3
- package/scripts/commands/new-note.js +2 -2
- 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/category_tree.js +11 -0
- package/scripts/helpers/icon.js +2 -2
- package/scripts/helpers/json_ld.js +15 -13
- package/scripts/helpers/mdrender.js +29 -0
- package/scripts/helpers/reading_time.js +12 -0
- package/scripts/helpers/related_posts.js +0 -7
- package/scripts/helpers/seo.js +9 -0
- package/scripts/lib/ai_label.js +55 -0
- package/scripts/lib/category_tree.js +26 -0
- package/scripts/lib/doc_tree.js +267 -0
- package/scripts/lib/mdrender_html.js +97 -0
- package/scripts/lib/notebooks.js +181 -0
- package/scripts/lib/reading_time.js +16 -0
- package/scripts/lib/search_index.js +82 -0
- package/scripts/lib/seo.js +79 -0
- package/scripts/lib/wiki_readme.js +57 -0
- package/scripts/tags/index.js +2 -0
- package/scripts/tags/lib/about.js +2 -2
- package/scripts/tags/lib/albums.js +1 -1
- package/scripts/tags/lib/banner.js +1 -1
- 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/md.js +17 -9
- package/scripts/tags/lib/posters.js +1 -1
- package/scripts/tags/lib/sites.js +2 -2
- package/scripts/tags/lib/table.js +22 -0
- package/scripts/tags/lib/timeline.js +9 -9
- package/scripts/tags/lib/tip.js +23 -0
- package/source/css/_common/base.styl +5 -9
- package/source/css/_common/device.styl +6 -3
- package/source/css/_components/list.styl +11 -5
- package/source/css/_components/md-table.styl +23 -0
- package/source/css/_components/pages/archives.styl +9 -25
- package/source/css/_components/pages/article-story.styl +4 -4
- package/source/css/_components/partial/article-tags.styl +10 -0
- package/source/css/_components/partial/bread-nav.styl +23 -1
- package/source/css/_components/partial/navbar.styl +10 -2
- package/source/css/_components/sidebar/search.styl +30 -8
- package/source/css/_components/sidebar/sidebar.styl +10 -7
- package/source/css/_components/tag-plugins/table.styl +42 -0
- package/source/css/_components/tag-plugins/tip.styl +27 -0
- package/source/css/_components/widgets/components.styl +6 -0
- package/source/css/_components/widgets/list.styl +6 -0
- package/source/css/_components/widgets/toc.styl +1 -1
- package/source/css/_custom.styl +2 -13
- package/source/css/_defines/func.styl +47 -16
- package/source/css/_defines/theme_base.styl +3 -0
- package/source/css/_plugins/index.styl +0 -18
- 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/icons.js +60 -0
- package/source/js/main.js +206 -1
- package/source/js/search/highlight.js +82 -0
- package/source/js/search/local-search.js +294 -103
- package/source/js/services/mdrender.js +116 -7
- package/source/js/services/memos.js +60 -8
- package/source/js/services/timeline.js +1 -1
- package/source/js/services/waline_latest_comment.js +3 -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} +13 -10
- 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
|
@@ -34,14 +34,15 @@ ul,ol
|
|
|
34
34
|
// table
|
|
35
35
|
table:not([class])
|
|
36
36
|
border-collapse: collapse
|
|
37
|
-
|
|
37
|
+
display: block
|
|
38
|
+
overflow-x: auto
|
|
39
|
+
-webkit-overflow-scrolling: touch
|
|
38
40
|
margin: 1rem 0
|
|
39
41
|
max-width: 100%
|
|
40
42
|
vertical-align: text-top
|
|
41
43
|
--fsp: $fsp2
|
|
42
44
|
font-size: var(--fsp)
|
|
43
45
|
scrollbar(0,0)
|
|
44
|
-
display: table
|
|
45
46
|
th
|
|
46
47
|
background: var(--block)
|
|
47
48
|
border-top: 1px solid var(--block-border)
|
|
@@ -50,6 +51,8 @@ table:not([class])
|
|
|
50
51
|
padding: 4px 1em
|
|
51
52
|
line-height: 1.5
|
|
52
53
|
tr
|
|
54
|
+
word-break: keep-all
|
|
55
|
+
white-space: nowrap
|
|
53
56
|
border-bottom: 1px dashed var(--block-border)
|
|
54
57
|
trans()
|
|
55
58
|
&:hover
|
|
@@ -57,10 +60,3 @@ table:not([class])
|
|
|
57
60
|
|
|
58
61
|
@media screen and (min-width: $device-mobile-max)
|
|
59
62
|
width 100%
|
|
60
|
-
|
|
61
|
-
@media screen and (max-width: $device-mobile-max)
|
|
62
|
-
display: block
|
|
63
|
-
tr
|
|
64
|
-
word-break: keep-all
|
|
65
|
-
white-space:nowrap
|
|
66
|
-
|
|
@@ -12,12 +12,13 @@
|
|
|
12
12
|
grid-column-end: span 3
|
|
13
13
|
--inset: 2rem
|
|
14
14
|
right: 0
|
|
15
|
-
bottom: calc(var(--inset) *
|
|
15
|
+
bottom: calc(var(--inset) * 1)
|
|
16
16
|
margin-left: auto
|
|
17
17
|
margin-right: var(--inset)
|
|
18
18
|
float: right
|
|
19
19
|
z-index: 999999
|
|
20
20
|
display: flex
|
|
21
|
+
align-items: center
|
|
21
22
|
justify-content: center
|
|
22
23
|
flex-direction: column
|
|
23
24
|
gap: $bar-item-gap
|
|
@@ -37,8 +38,10 @@
|
|
|
37
38
|
color: var(--text)
|
|
38
39
|
background: none
|
|
39
40
|
box-sizing: border-box
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
flex: 0 0 auto
|
|
42
|
+
margin: 0 auto
|
|
43
|
+
width: 40px
|
|
44
|
+
height: 40px
|
|
42
45
|
padding: 4px
|
|
43
46
|
line-height: 0
|
|
44
47
|
font-size: 28px
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
position: absolute
|
|
14
14
|
left: 0
|
|
15
15
|
bottom: -2px
|
|
16
|
+
border-radius: 2px
|
|
16
17
|
z-index: -1
|
|
17
18
|
width: 100%
|
|
18
19
|
height: 0
|
|
@@ -69,11 +70,11 @@
|
|
|
69
70
|
transform: scale(1.05)
|
|
70
71
|
img
|
|
71
72
|
filter: brightness(var(--img-br)) saturate(var(--img-sat))
|
|
72
|
-
// 封面放大用
|
|
73
|
-
transition: all .2s ease-out, transform .5s ease-out
|
|
74
|
-
-moz-transition: all .2s ease-out, transform .5s ease-out
|
|
75
|
-
-webkit-transition: all .2s ease-out, transform .5s ease-out
|
|
76
|
-
-o-transition: all .2s ease-out, transform .5s ease-out
|
|
73
|
+
// 封面放大用 1.5s 缓动,其余属性(亮度/饱和度)保持主题默认 0.2s
|
|
74
|
+
transition: all .2s ease-out, transform 1.5s ease-out
|
|
75
|
+
-moz-transition: all .2s ease-out, transform 1.5s ease-out
|
|
76
|
+
-webkit-transition: all .2s ease-out, transform 1.5s ease-out
|
|
77
|
+
-o-transition: all .2s ease-out, transform 1.5s ease-out
|
|
77
78
|
.excerpt
|
|
78
79
|
margin: 1rem 0
|
|
79
80
|
@media screen and (max-width: $device-mobile)
|
|
@@ -105,6 +106,11 @@
|
|
|
105
106
|
object-fit: contain
|
|
106
107
|
svg
|
|
107
108
|
color: $c-red
|
|
109
|
+
.card-tags
|
|
110
|
+
display: flex
|
|
111
|
+
flex-wrap: wrap
|
|
112
|
+
align-items: center
|
|
113
|
+
gap: 0 .5rem
|
|
108
114
|
|
|
109
115
|
|
|
110
116
|
// common article
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// 普通 Markdown 表格滚动容器:宽度足够时铺满容器,内容超出时横向滚动
|
|
2
|
+
.md-table-scroll
|
|
3
|
+
overflow-x: auto
|
|
4
|
+
-webkit-overflow-scrolling: touch
|
|
5
|
+
max-width: 100%
|
|
6
|
+
margin: 1rem 0
|
|
7
|
+
scrollbar(0,0)
|
|
8
|
+
> table:not([class])
|
|
9
|
+
display: table
|
|
10
|
+
width: 100%
|
|
11
|
+
max-width: none
|
|
12
|
+
margin: 0
|
|
13
|
+
border-collapse: separate
|
|
14
|
+
border-spacing: 0
|
|
15
|
+
border: 1px solid var(--block-border)
|
|
16
|
+
border-radius: $border-card
|
|
17
|
+
overflow: hidden
|
|
18
|
+
th
|
|
19
|
+
border-top: none
|
|
20
|
+
th, td
|
|
21
|
+
border-left: 1px solid var(--block-border)
|
|
22
|
+
&:first-child
|
|
23
|
+
border-left: none
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
|
|
43
43
|
.post-list #cats
|
|
44
44
|
padding: 0
|
|
45
|
+
.cat-item
|
|
46
|
+
display: block
|
|
45
47
|
a.cat
|
|
46
48
|
display: flex
|
|
47
|
-
&.child
|
|
48
|
-
padding-left: 2rem
|
|
49
49
|
padding: .5em 1rem
|
|
50
50
|
border-radius: $border-bar
|
|
51
51
|
color: var(--text-p2)
|
|
@@ -72,35 +72,19 @@
|
|
|
72
72
|
.badge
|
|
73
73
|
opacity: 1
|
|
74
74
|
color: var(--theme)
|
|
75
|
+
.cat-children
|
|
76
|
+
margin-left: 1.25rem
|
|
77
|
+
padding-left: .75rem
|
|
78
|
+
border-left: 1px dashed var(--text-meta)
|
|
75
79
|
|
|
76
80
|
.post-list #tags
|
|
77
81
|
display: flex
|
|
78
82
|
flex-wrap: wrap
|
|
79
83
|
padding: 0
|
|
80
|
-
margin: 0 -
|
|
84
|
+
margin: 0 -0.5rem
|
|
81
85
|
a.tag
|
|
82
|
-
|
|
83
|
-
align-items: center
|
|
84
|
-
position: relative
|
|
85
|
-
color: var(--text-p2)
|
|
86
|
-
margin: 4px
|
|
87
|
-
padding: .5em .75rem
|
|
88
|
-
border-radius: 4px
|
|
89
|
-
background: var(--block)
|
|
90
|
-
font-size: $fs-13
|
|
91
|
-
font-weight: 500
|
|
92
|
-
&:before
|
|
93
|
-
content: "#"
|
|
94
|
-
margin-left: -2px
|
|
95
|
-
margin-right: 2px
|
|
96
|
-
opacity: .4
|
|
97
|
-
&:hover
|
|
98
|
-
&:before
|
|
99
|
-
color var(--theme)
|
|
100
|
-
opacity: 1
|
|
101
|
-
color: var(--text)
|
|
102
|
-
background: var(--block-border)
|
|
86
|
+
tag-chip()
|
|
103
87
|
|
|
104
88
|
@media screen and (min-width: $device-mobile)
|
|
105
89
|
.post-list.author #archive
|
|
106
|
-
padding: 1rem 0
|
|
90
|
+
padding: 1rem 0
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
vertical-align: middle
|
|
52
52
|
&:before
|
|
53
53
|
margin-left: -1em
|
|
54
|
-
svg-mask-icon(
|
|
54
|
+
svg-mask-icon(var(--icon-h3-left))
|
|
55
55
|
&:after
|
|
56
|
-
svg-mask-icon(
|
|
56
|
+
svg-mask-icon(var(--icon-h3-right))
|
|
57
57
|
|
|
58
58
|
h4:not([class])
|
|
59
59
|
position: relative
|
|
@@ -115,10 +115,10 @@
|
|
|
115
115
|
trans1 all
|
|
116
116
|
&:before
|
|
117
117
|
left: -0.3em
|
|
118
|
-
svg-mask-icon(
|
|
118
|
+
svg-mask-icon(var(--icon-quote-left))
|
|
119
119
|
&:after
|
|
120
120
|
right: -0.3em
|
|
121
|
-
svg-mask-icon(
|
|
121
|
+
svg-mask-icon(var(--icon-quote-right))
|
|
122
122
|
p:not([class])
|
|
123
123
|
color: var(--text-p2)
|
|
124
124
|
font-size: $fs-body
|
|
@@ -4,10 +4,20 @@
|
|
|
4
4
|
display: flex
|
|
5
5
|
justify-content: space-between
|
|
6
6
|
color: var(--text-banner)
|
|
7
|
+
.left
|
|
8
|
+
flex: 1
|
|
9
|
+
min-width: 0
|
|
7
10
|
.flex-row
|
|
8
11
|
display: flex
|
|
9
12
|
align-items: baseline
|
|
10
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
|
|
11
21
|
a
|
|
12
22
|
color: var(--text-banner)
|
|
13
23
|
padding: 4px
|
|
@@ -31,6 +41,18 @@
|
|
|
31
41
|
div#post-meta span.updated
|
|
32
42
|
visibility: visible
|
|
33
43
|
|
|
44
|
+
// 文章 AI 成分标签:彩色文字、无背景,颜色由内联 style 提供(banner 含图片时继承默认色)
|
|
45
|
+
.ai-label
|
|
46
|
+
display: inline-flex
|
|
47
|
+
align-items: center
|
|
48
|
+
gap: 4px
|
|
49
|
+
padding: 4px
|
|
50
|
+
white-space: nowrap
|
|
51
|
+
svg
|
|
52
|
+
height: 1em
|
|
53
|
+
width: auto
|
|
54
|
+
transform: scale(1.25)
|
|
55
|
+
|
|
34
56
|
.bread-nav .ghrepo
|
|
35
57
|
font-size: $fs-13
|
|
36
58
|
display: flex
|
|
@@ -50,4 +72,4 @@
|
|
|
50
72
|
span
|
|
51
73
|
margin-left: 4px
|
|
52
74
|
&:hover
|
|
53
|
-
opacity 1
|
|
75
|
+
opacity 1
|
|
@@ -7,11 +7,19 @@
|
|
|
7
7
|
.navbar-blur
|
|
8
8
|
margin: 0 1rem
|
|
9
9
|
position: relative
|
|
10
|
-
bar-
|
|
10
|
+
border-radius: $border-bar-container
|
|
11
|
+
corner-shape: $corner-shape
|
|
12
|
+
trans1: all
|
|
13
|
+
// 未吸顶:卡片样式(var(--card) 底色 + 文章卡片同款阴影),与文章卡片一致
|
|
14
|
+
background: var(--card)
|
|
15
|
+
box-shadow: $boxshadow-card
|
|
16
|
+
// 吸顶后恢复玻璃效果(bar-glass()),与之前行为一致
|
|
17
|
+
&.pinned
|
|
18
|
+
bar-glass()
|
|
19
|
+
background: transparent
|
|
11
20
|
|
|
12
21
|
.navbar-container
|
|
13
22
|
max-width: 100%
|
|
14
|
-
margin: 1px
|
|
15
23
|
border-radius: $border-bar-container
|
|
16
24
|
overflow: scroll visible
|
|
17
25
|
scrollbar(0, 0)
|
|
@@ -29,8 +29,9 @@
|
|
|
29
29
|
background: var(--leftbar-search-line, var(--bg-a100))
|
|
30
30
|
:root[data-theme="dark"] &
|
|
31
31
|
background: var(--leftbar-search-line, var(--bg-a20))
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
:root:not([data-theme]) &
|
|
33
|
+
@media screen and (prefers-color-scheme: dark)
|
|
34
|
+
background: var(--leftbar-search-line, var(--bg-a20))
|
|
34
35
|
z-index 0
|
|
35
36
|
trans1 all
|
|
36
37
|
&:after
|
|
@@ -62,8 +63,9 @@
|
|
|
62
63
|
color: var(--text-p3)
|
|
63
64
|
:root[data-theme="dark"] &
|
|
64
65
|
color: var(--text-p2)
|
|
65
|
-
|
|
66
|
-
color:
|
|
66
|
+
:root:not([data-theme]) &
|
|
67
|
+
@media screen and (prefers-color-scheme: dark)
|
|
68
|
+
color: var(--text-p2)
|
|
67
69
|
.search-button
|
|
68
70
|
border-radius: $border-bar
|
|
69
71
|
display: flex
|
|
@@ -122,18 +124,38 @@
|
|
|
122
124
|
border-radius: $border-card-s
|
|
123
125
|
trans1 background
|
|
124
126
|
&:hover
|
|
125
|
-
background: var(--bg-
|
|
127
|
+
background: var(--bg-a50)
|
|
126
128
|
li+li
|
|
127
129
|
margin-top: 8px
|
|
128
130
|
.search-result-title
|
|
131
|
+
display: block
|
|
132
|
+
overflow: hidden
|
|
133
|
+
color: var(--text-p1)
|
|
134
|
+
font-size: $fs-14
|
|
135
|
+
padding: 0.5rem 1rem
|
|
136
|
+
white-space: nowrap
|
|
137
|
+
text-overflow: ellipsis
|
|
138
|
+
|
|
139
|
+
.search-result-section
|
|
140
|
+
display: block
|
|
141
|
+
overflow: hidden
|
|
129
142
|
color: var(--text-p1)
|
|
130
143
|
font-weight: 700
|
|
131
144
|
font-size: $fs-15
|
|
145
|
+
text-overflow: ellipsis
|
|
146
|
+
white-space: nowrap
|
|
147
|
+
border-bottom: 1px solid var(--block-border)
|
|
148
|
+
padding-bottom: .5rem
|
|
149
|
+
margin-bottom: .5rem
|
|
150
|
+
&:before
|
|
151
|
+
content: '>'
|
|
152
|
+
margin-right: .5em
|
|
153
|
+
color: var(--theme)
|
|
132
154
|
|
|
133
155
|
.search-result-content
|
|
134
156
|
overflow: hidden
|
|
135
157
|
color: var(--text-p3)
|
|
136
|
-
margin:
|
|
158
|
+
margin: 0
|
|
137
159
|
max-height: 13em
|
|
138
160
|
text-align: justify
|
|
139
161
|
font-size: $fs-13
|
|
@@ -143,8 +165,8 @@
|
|
|
143
165
|
-webkit-line-clamp: 2
|
|
144
166
|
|
|
145
167
|
.search-keyword
|
|
146
|
-
color: $c-
|
|
147
|
-
border-bottom: 1px dashed $c-
|
|
168
|
+
color: $c-yellow
|
|
169
|
+
border-bottom: 1px dashed $c-yellow
|
|
148
170
|
font-weight: bold
|
|
149
171
|
filter grayscale(25%)
|
|
150
172
|
|
|
@@ -63,12 +63,14 @@
|
|
|
63
63
|
filter: saturate(var(--saturate)) blur(var(--blur-px)) opacity(var(--background-opacity))
|
|
64
64
|
:root[data-theme="dark"] &
|
|
65
65
|
--background-opacity: hexo-config('style.leftbar.background-opacity') * 0.75
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
:root:not([data-theme]) &
|
|
67
|
+
@media screen and (prefers-color-scheme: dark)
|
|
68
|
+
--background-opacity: hexo-config('style.leftbar.background-opacity') * 0.75
|
|
68
69
|
else if $leftbar-background-color-light || $leftbar-background-color-dark
|
|
69
70
|
background-color: convert($leftbar-background-color-light)
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
:root:not([data-theme]) &
|
|
72
|
+
@media screen and (prefers-color-scheme: dark)
|
|
73
|
+
background-color: convert($leftbar-background-color-dark)
|
|
72
74
|
|
|
73
75
|
.leftbar-container
|
|
74
76
|
height: calc(100vh - var(--gap-margin) * 2)
|
|
@@ -109,9 +111,10 @@
|
|
|
109
111
|
:root[data-theme="dark"] &
|
|
110
112
|
background: rgba(white, 0.05)
|
|
111
113
|
box-shadow: inset 0 0 32px 1px rgba(white, 0.1)
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
:root:not([data-theme]) &
|
|
115
|
+
@media screen and (prefers-color-scheme: dark)
|
|
116
|
+
background: rgba(white, 0.05)
|
|
117
|
+
box-shadow: inset 0 0 32px 1px rgba(white, 0.1)
|
|
115
118
|
|
|
116
119
|
@media screen and (max-width: $device-mobile-max)
|
|
117
120
|
.l_left
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// 表格标签(#466):{% table style:scroll|wrap|compact %}
|
|
2
|
+
.tag-plugin.table
|
|
3
|
+
table
|
|
4
|
+
display: table
|
|
5
|
+
border-collapse: separate
|
|
6
|
+
border-spacing: 0
|
|
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
|
|
17
|
+
&.table-scroll
|
|
18
|
+
overflow-x: auto
|
|
19
|
+
-webkit-overflow-scrolling: touch
|
|
20
|
+
scrollbar()
|
|
21
|
+
table
|
|
22
|
+
min-width: max-content
|
|
23
|
+
th, td
|
|
24
|
+
padding: 8px 1em
|
|
25
|
+
&.table-wrap
|
|
26
|
+
table
|
|
27
|
+
table-layout: fixed
|
|
28
|
+
tr
|
|
29
|
+
white-space: normal
|
|
30
|
+
th, td
|
|
31
|
+
word-break: break-word
|
|
32
|
+
overflow-wrap: anywhere
|
|
33
|
+
padding: 8px 1em
|
|
34
|
+
&.table-compact
|
|
35
|
+
overflow-x: auto
|
|
36
|
+
-webkit-overflow-scrolling: touch
|
|
37
|
+
scrollbar()
|
|
38
|
+
table
|
|
39
|
+
min-width: max-content
|
|
40
|
+
th, td
|
|
41
|
+
padding: 4px 1em
|
|
42
|
+
line-height: 1.4
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// 气泡注解标签(#602):{% tip text:注解 %}词句{% endtip %}
|
|
2
|
+
.tag-plugin.tip
|
|
3
|
+
position: relative
|
|
4
|
+
display: inline-block
|
|
5
|
+
border-bottom: 1px dashed var(--text-p3)
|
|
6
|
+
cursor: help
|
|
7
|
+
.tip-bubble
|
|
8
|
+
position: absolute
|
|
9
|
+
bottom: 135%
|
|
10
|
+
left: 50%
|
|
11
|
+
transform: translateX(-50%)
|
|
12
|
+
display: block
|
|
13
|
+
width: max-content
|
|
14
|
+
max-width: 18rem
|
|
15
|
+
padding: .35rem .7rem
|
|
16
|
+
bar-glass($border-bar)
|
|
17
|
+
text-shadow: none
|
|
18
|
+
color: var(--text-p1)
|
|
19
|
+
font-size: $fs-14
|
|
20
|
+
line-height: 1.5
|
|
21
|
+
white-space: normal
|
|
22
|
+
opacity: 0
|
|
23
|
+
pointer-events: none
|
|
24
|
+
transition: opacity .2s ease
|
|
25
|
+
z-index: 10
|
|
26
|
+
&:hover .tip-bubble, &:focus .tip-bubble
|
|
27
|
+
opacity: 1
|
|
@@ -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
|
package/source/css/_custom.styl
CHANGED
|
@@ -42,28 +42,17 @@ $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'))
|
|
64
53
|
$border-image-s = convert(hexo-config('style.border-radius.image-s'))
|
|
65
54
|
$border-button = 8px
|
|
66
|
-
$corner-shape = convert(hexo-config('style.corner-shape')
|
|
55
|
+
$corner-shape = convert(hexo-config('style.corner-shape'))
|
|
67
56
|
|
|
68
57
|
// 可以动态变化的属性
|
|
69
58
|
:root
|
|
@@ -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()
|
|
@@ -143,9 +168,10 @@ sidebar-light($bg = unquote('var(--bg-a50)'), $light = 0.38, $edge = 0.45, $dark
|
|
|
143
168
|
:root[data-theme="dark"] &
|
|
144
169
|
background: var(--leftbar-item-bg, linear-gradient(180deg, rgba(white, $dark-light), rgba(white, 0) 50%), $bg)
|
|
145
170
|
box-shadow: var(--leftbar-item-shadow, inset 0 1px 0 rgba(white, $dark-edge))
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
171
|
+
:root:not([data-theme]) &
|
|
172
|
+
@media (prefers-color-scheme: dark)
|
|
173
|
+
background: var(--leftbar-item-bg, linear-gradient(180deg, rgba(white, $dark-light), rgba(white, 0) 50%), $bg)
|
|
174
|
+
box-shadow: var(--leftbar-item-shadow, inset 0 1px 0 rgba(white, $dark-edge))
|
|
149
175
|
|
|
150
176
|
newblur($radius = 64px)
|
|
151
177
|
box-shadow: 0 0 2px rgba(black, .04), 0 2px 8px rgba(black, .04), 0 4px 16px rgba(black, .04)
|
|
@@ -153,14 +179,16 @@ newblur($radius = 64px)
|
|
|
153
179
|
text-shadow: 0 0 4px rgba(white, 1), 0 0 8px rgba(white, 0.8), 0 0 16px rgba(white, 0.6)
|
|
154
180
|
:root[data-theme="dark"] &
|
|
155
181
|
text-shadow: 0 0 2px rgba(black, 0.2), 0 0 4px rgba(black, 0.4)
|
|
156
|
-
|
|
157
|
-
|
|
182
|
+
:root:not([data-theme]) &
|
|
183
|
+
@media (prefers-color-scheme: dark)
|
|
184
|
+
text-shadow: 0 0 2px rgba(black, 0.2), 0 0 4px rgba(black, 0.4)
|
|
158
185
|
nav a:not(.active,:hover)
|
|
159
186
|
filter: drop-shadow(0 0 0 white) drop-shadow(0 0 4px white)
|
|
160
187
|
:root[data-theme="dark"] &
|
|
161
188
|
filter: none
|
|
162
|
-
|
|
163
|
-
|
|
189
|
+
:root:not([data-theme]) &
|
|
190
|
+
@media (prefers-color-scheme: dark)
|
|
191
|
+
filter: none
|
|
164
192
|
&:before,&:after
|
|
165
193
|
z-index -1
|
|
166
194
|
position: absolute
|
|
@@ -179,8 +207,9 @@ newblur($radius = 64px)
|
|
|
179
207
|
margin: 1px
|
|
180
208
|
:root[data-theme="dark"] &
|
|
181
209
|
background: rgba(white, 0.2)
|
|
182
|
-
|
|
183
|
-
|
|
210
|
+
:root:not([data-theme]) &
|
|
211
|
+
@media (prefers-color-scheme: dark)
|
|
212
|
+
background: rgba(white, 0.2)
|
|
184
213
|
&:after
|
|
185
214
|
--blur-px: 16px
|
|
186
215
|
--blur-sat: 300%
|
|
@@ -192,8 +221,9 @@ newblur($radius = 64px)
|
|
|
192
221
|
trans1 all
|
|
193
222
|
:root[data-theme="dark"] &
|
|
194
223
|
box-shadow: inset 0 0 2px 1px rgba(white, 0.2)
|
|
195
|
-
|
|
196
|
-
|
|
224
|
+
:root:not([data-theme]) &
|
|
225
|
+
@media (prefers-color-scheme: dark)
|
|
226
|
+
box-shadow: inset 0 0 2px 1px rgba(white, 0.2)
|
|
197
227
|
|
|
198
228
|
// 长条圆角玻璃 UI(navbar top 与 float-panel 共用)
|
|
199
229
|
bar-glass($radius = $border-bar-container)
|
|
@@ -220,8 +250,9 @@ bar-item-active()
|
|
|
220
250
|
background: var(--bg-a60)
|
|
221
251
|
:root[data-theme="dark"] &
|
|
222
252
|
background: rgba(white, 0.25)
|
|
223
|
-
|
|
224
|
-
|
|
253
|
+
:root:not([data-theme]) &
|
|
254
|
+
@media (prefers-color-scheme: dark)
|
|
255
|
+
background: rgba(white, 0.25)
|
|
225
256
|
box-shadow: 0 0 1px rgba(0, 0, 0, 0.04), 0 0 2px rgba(0, 0, 0, 0.04), 0 0 4px rgba(0, 0, 0, 0.08)
|
|
226
257
|
backdrop-filter: saturate(300%)
|
|
227
258
|
-webkit-backdrop-filter: saturate(300%)
|