hexo-theme-stellar 1.42.0 → 1.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/.claude/skills/stellar-theme-dev/SKILL.md +2 -0
  2. package/CHANGELOG.md +42 -0
  3. package/THIRD-PARTY-NOTICES.md +28 -0
  4. package/_config.yml +20 -10
  5. package/_data/icons.yml +10 -9
  6. package/languages/en.yml +11 -0
  7. package/languages/zh-CN.yml +11 -0
  8. package/languages/zh-TW.yml +11 -0
  9. package/layout/_partial/comments/artalk/layout.ejs +1 -1
  10. package/layout/_partial/comments/beaudar/layout.ejs +1 -1
  11. package/layout/_partial/comments/giscus/layout.ejs +1 -1
  12. package/layout/_partial/comments/twikoo/layout.ejs +1 -1
  13. package/layout/_partial/comments/utterances/layout.ejs +1 -1
  14. package/layout/_partial/comments/waline/layout.ejs +1 -1
  15. package/layout/_partial/components/collection-item.ejs +44 -0
  16. package/layout/_partial/components/collection.ejs +26 -0
  17. package/layout/_partial/components/widget-frame.ejs +35 -0
  18. package/layout/_partial/cover/wiki_cover.ejs +82 -26
  19. package/layout/_partial/dropdown.ejs +62 -0
  20. package/layout/_partial/head.ejs +9 -0
  21. package/layout/_partial/main/navbar/breadcrumb/blog.ejs +1 -1
  22. package/layout/_partial/main/post_list/archive_item.ejs +12 -0
  23. package/layout/_partial/main/post_list/topic_card.ejs +21 -9
  24. package/layout/_partial/main/post_list/wiki_card.ejs +49 -10
  25. package/layout/_partial/scripts/bootstrap.ejs +3 -1
  26. package/layout/_partial/scripts/defines.ejs +2 -8
  27. package/layout/_partial/scripts/lazyload.ejs +0 -3
  28. package/layout/_partial/scripts.ejs +1 -0
  29. package/layout/_partial/sidebar/index_leftbar.ejs +12 -2
  30. package/layout/_partial/sidebar/logo.ejs +1 -1
  31. package/layout/_partial/sidebar/menu.ejs +21 -23
  32. package/layout/_partial/widgets/components/linklist.ejs +23 -21
  33. package/layout/_partial/widgets/linklist.ejs +7 -12
  34. package/layout/_partial/widgets/recent.ejs +52 -41
  35. package/layout/_partial/widgets/related.ejs +47 -36
  36. package/layout/_partial/widgets/tagtree.ejs +70 -54
  37. package/layout/_partial/widgets/toc.ejs +37 -62
  38. package/layout/_partial/widgets/tree.ejs +38 -51
  39. package/layout/_plugins/index.ejs +25 -0
  40. package/layout/_plugins/mermaid.ejs +3 -4
  41. package/layout/archive.ejs +11 -20
  42. package/layout/collection-preview.ejs +60 -0
  43. package/layout/index_topic.ejs +12 -6
  44. package/layout/index_wiki.ejs +49 -3
  45. package/layout/layout.ejs +4 -3
  46. package/package.json +1 -1
  47. package/scripts/events/index.js +0 -2
  48. package/scripts/filters/lib/img_lazyload.js +184 -40
  49. package/scripts/generators/stellar-icons.js +1 -1
  50. package/scripts/lib/subtitle.js +5 -1
  51. package/scripts/tags/index.js +1 -0
  52. package/scripts/tags/lib/about.js +1 -1
  53. package/scripts/tags/lib/albums.js +1 -1
  54. package/scripts/tags/lib/banner.js +1 -1
  55. package/scripts/tags/lib/dropdown.js +64 -0
  56. package/scripts/tags/lib/friends.js +1 -1
  57. package/scripts/tags/lib/gallery.js +3 -3
  58. package/scripts/tags/lib/image.js +1 -1
  59. package/scripts/tags/lib/posters.js +1 -1
  60. package/scripts/tags/lib/sites.js +8 -4
  61. package/source/css/_common/base.styl +4 -4
  62. package/source/css/_common/blockquote.styl +2 -2
  63. package/source/css/_common/dropdown.styl +132 -0
  64. package/source/css/_common/html.styl +1 -1
  65. package/source/css/_common/loading.styl +5 -2
  66. package/source/css/_common/title.styl +8 -8
  67. package/source/css/_components/collection.styl +188 -0
  68. package/source/css/_components/layout.styl +1 -1
  69. package/source/css/_components/list.styl +44 -46
  70. package/source/css/_components/md.styl +3 -3
  71. package/source/css/_components/page-transition.styl +22 -0
  72. package/source/css/_components/pages/archives.styl +19 -18
  73. package/source/css/_components/pages/article-indent.styl +2 -2
  74. package/source/css/_components/pages/article-story.styl +9 -5
  75. package/source/css/_components/pages/collection-preview.styl +68 -0
  76. package/source/css/_components/pages/notebook.styl +11 -9
  77. package/source/css/_components/partial/article-footer.styl +7 -4
  78. package/source/css/_components/partial/cover.styl +280 -1
  79. package/source/css/_components/partial/related.styl +10 -6
  80. package/source/css/_components/sidebar/footer.styl +65 -12
  81. package/source/css/_components/sidebar/nav-area.styl +6 -1
  82. package/source/css/_components/sidebar/search.styl +6 -2
  83. package/source/css/_components/tag-plugins/chat.styl +1 -1
  84. package/source/css/_components/tag-plugins/folders.styl +4 -4
  85. package/source/css/_components/tag-plugins/folding.styl +3 -3
  86. package/source/css/_components/tag-plugins/hashtag.styl +2 -3
  87. package/source/css/_components/tag-plugins/mdrender.styl +1 -1
  88. package/source/css/_components/tag-plugins/note.styl +4 -4
  89. package/source/css/_components/tag-plugins/poetry.styl +5 -5
  90. package/source/css/_components/tag-plugins/quot.styl +1 -2
  91. package/source/css/_components/tag-plugins/quote.styl +1 -1
  92. package/source/css/_components/tag-plugins/tabs.styl +2 -2
  93. package/source/css/_components/tag-plugins/timeline.styl +4 -4
  94. package/source/css/_components/widgets/ghrepo.styl +4 -0
  95. package/source/css/_components/widgets/markdown.styl +1 -14
  96. package/source/css/_components/widgets/timeline.styl +2 -2
  97. package/source/css/_components/widgets/toc.styl +22 -20
  98. package/source/css/_components/widgets/widgets.styl +13 -1
  99. package/source/css/_components/wiki-card.styl +209 -0
  100. package/source/css/_custom.styl +22 -20
  101. package/source/css/_plugins/lazyload.styl +8 -5
  102. package/source/css/comments/utterances.styl +2 -2
  103. package/source/css/comments/waline.styl +24 -0
  104. package/source/css/plugins/mermaid.styl +31 -12
  105. package/source/js/icons.js +1 -1
  106. package/source/js/main.js +62 -6
  107. package/source/js/plugins/adaptive-text.js +46 -2
  108. package/source/js/plugins/dropdown.js +435 -0
  109. package/source/js/plugins/galaxy.js +423 -0
  110. package/source/js/search/algolia-search.js +1 -1
  111. package/source/js/search/local-search.js +1 -1
  112. package/source/js/services/ghinfo.js +31 -3
  113. package/source/js/services/siteinfo.js +26 -0
  114. package/source/js/services/sites.js +6 -2
  115. package/source/js/services.js +5 -2
  116. package/source/js/tagtree.js +7 -7
  117. package/source/js/utils.js +1 -1
  118. package/layout/_partial/widgets/components/link.ejs +0 -21
  119. package/source/css/_components/sidebar/menu.styl +0 -77
  120. package/source/css/_components/widgets/components.styl +0 -68
  121. package/source/css/_components/widgets/list.styl +0 -46
  122. package/source/css/_components/widgets/related.styl +0 -40
@@ -19,24 +19,25 @@
19
19
  z-index: -1
20
20
  border-radius: 4px
21
21
  background: var(--theme)
22
- a.post
23
- display: inline-flex
24
- align-items: baseline
25
- margin: 0.25rem 0
26
- color: var(--text-p1)
27
- trans2 color border
28
- border-bottom: 1px dashed var(--text-meta)
22
+
23
+ .post-list .archive-list a.post
24
+ display: inline-flex
25
+ align-items: baseline
26
+ margin: 0.25rem 0
27
+ color: var(--text-p1)
28
+ trans2 color border
29
+ border-bottom: 1px dashed var(--text-meta)
30
+ time
31
+ font-family: $ff-code
32
+ margin-right: 1em
33
+ font-weight: 700
34
+ flex-shrink: 0
35
+ color: var(--text-p4)
36
+ &:hover
37
+ border-bottom: 1px solid var(--theme)
38
+ color: var(--text)
29
39
  time
30
- font-family: $ff-code
31
- margin-right: 1em
32
- font-weight: 700
33
- flex-shrink: 0
34
- color: var(--text-p4)
35
- &:hover
36
- border-bottom: 1px solid var(--theme)
37
- color: var(--text)
38
- time
39
- color: var(--theme)
40
+ color: var(--theme)
40
41
 
41
42
 
42
43
 
@@ -52,7 +53,7 @@
52
53
  align-items: center
53
54
  justify-content: space-between
54
55
  font-weight: 500
55
- font-size: $fsp2
56
+ font-size: $fs-content-2
56
57
  span
57
58
  display: flex
58
59
  align-items: center
@@ -1,6 +1,6 @@
1
1
  .l_body[text-indent] article.content
2
2
  p:not([class])
3
- text-indent: 'calc(%s * 2)' % var(--fsp)
3
+ text-indent: 'calc(%s * 2)' % var(--fs-content)
4
4
  text-align: justify
5
5
  a
6
- text-indent: 0
6
+ text-indent: 0
@@ -1,5 +1,9 @@
1
1
  .l_body[type=story] .md-text.content
2
- --fsp: 'calc(%s + 1px)' % $fs-body
2
+ --fs-content-base: 'calc(%s + 2px)' % var(--fs-root)
3
+ --fs-content: var(--fs-content-base)
4
+ --fsh2: 'calc(%s + 11px)' % var(--fs-content)
5
+ --fsh3: 'calc(%s + 7px)' % var(--fs-content)
6
+ --fsh4: 'calc(%s + 4px)' % var(--fs-content)
3
7
  --gap-p: 2rem
4
8
  >div.tag-plugin,>p>img
5
9
  margin-top: 2.4rem
@@ -67,7 +71,7 @@
67
71
  background: x-theme-alpha(1)
68
72
 
69
73
  ol,ul
70
- margin-left: 'calc(%s * 2)' % var(--fsp)
74
+ margin-left: 'calc(%s * 2)' % var(--fs-content)
71
75
  h1,h2,h3,h4,h5,h6
72
76
  text-align: center
73
77
  margin: 2em 0 1.5em
@@ -88,7 +92,7 @@
88
92
 
89
93
  .l_body[type=story] .md-text.content>blockquote, .md-text.content .tag-plugin.blockquote
90
94
  text-align: center
91
- --inset: calc(var(--fsp) * 2)
95
+ --inset: calc(var(--fs-content) * 2)
92
96
  margin-left: var(--inset)
93
97
  margin-right: var(--inset)
94
98
  background: var(--block)
@@ -112,7 +116,7 @@
112
116
  svg-mask-icon(var(--icon-quote-right))
113
117
  p:not([class])
114
118
  color: var(--text-p2)
115
- font-size: $fs-body
119
+ font-size: var(--fs-content)
116
120
  text-indent: 2em
117
121
  &:hover
118
122
  &:before,&:after
@@ -124,6 +128,6 @@
124
128
 
125
129
 
126
130
  .l_body[text-indent] .tag-plugin.tabs .tab-content .tab-pane>p:not([class])
127
- text-indent: 'calc(%s * 2)' % var(--fsp)
131
+ text-indent: 'calc(%s * 2)' % var(--fs-content)
128
132
  a
129
133
  text-indent: 0
@@ -0,0 +1,68 @@
1
+ .collection-preview
2
+ padding: 2rem 1rem
3
+ >h1, >p
4
+ max-width: 720px
5
+ margin-left: auto
6
+ margin-right: auto
7
+
8
+ .collection-preview__grid
9
+ display: grid
10
+ grid-template-columns: repeat(2, minmax(0, 1fr))
11
+ gap: var(--gap-page)
12
+ align-items: start
13
+ margin-top: 2rem
14
+ @media screen and (max-width: $device-tablet)
15
+ grid-template-columns: minmax(0, 1fr)
16
+
17
+ .collection-preview__theme
18
+ max-width: 720px
19
+ margin: 1rem auto 0
20
+ display: flex
21
+ align-items: center
22
+ justify-content: flex-end
23
+ gap: 8px
24
+ color: var(--text-p3)
25
+ font-size: $fs-12
26
+ button
27
+ border: 0
28
+ border-radius: $border-button
29
+ padding: 4px 8px
30
+ color: var(--text-p2)
31
+ background: var(--block)
32
+ cursor: pointer
33
+ &:focus-visible
34
+ outline: 2px solid var(--theme)
35
+ outline-offset: 2px
36
+
37
+ .collection-preview__surface
38
+ box-sizing: border-box
39
+ width: 100%
40
+ margin: 0 auto
41
+ padding: var(--gap-base)
42
+ border-radius: $border-card-l
43
+ background: var(--card)
44
+ box-shadow: $boxshadow-card
45
+ &[data-preview-width='240']
46
+ max-width: 240px
47
+ &[data-preview-width='320']
48
+ max-width: 320px
49
+ &[data-preview-width='720']
50
+ width: unquote('min(720px, calc(100vw - 2 * var(--gap-page)))')
51
+ max-width: none
52
+ grid-column: 1 / -1
53
+ &[data-ui-surface='glass']
54
+ background: linear-gradient(135deg, rgba(white, .42), rgba(white, .12)), url(https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.13/image/sidebar-bg1@small.jpg) center / cover
55
+ >header
56
+ display: flex
57
+ justify-content: space-between
58
+ gap: 8px
59
+ color: var(--text-p1)
60
+ padding: 0 var(--gap-base) var(--gap-base)
61
+ code
62
+ color: var(--text-p3)
63
+ background: none
64
+ padding: 0
65
+ .widget-wrapper
66
+ margin-top: 0
67
+ .widget-wrapper+.widget-wrapper
68
+ margin-top: 24px
@@ -33,16 +33,18 @@
33
33
  margin-right: 2px
34
34
  opacity: .4
35
35
 
36
- .widget-body.tag-tree .tag-subtree > a > .tag-switcher-wrapper
36
+ .tag-tree .tag-subtree > .tag-tree__link > .tag-switcher-wrapper
37
37
  width: 1.75rem
38
38
  height: 0.875rem
39
+ flex-shrink: 0
40
+ margin-left: auto
39
41
  display: flex
40
42
  justify-content: end
41
43
  align-items: center
42
44
  &:hover
43
45
  color: var(--theme)
44
46
 
45
- .widget-body.tag-tree .tag-subtree.parent-tag > a .tag-switcher
47
+ .tag-tree .tag-subtree.is-parent > .tag-tree__link .tag-switcher
46
48
  display: inline-block
47
49
  height: 0.5rem
48
50
  width: 0.5rem
@@ -50,16 +52,16 @@
50
52
  border-style: none solid solid none
51
53
  transform: translateX(-25%) rotate(-45deg)
52
54
 
53
- .widget-body.tag-tree .tag-subtree.parent-tag.expanded > a .tag-switcher
55
+ .tag-tree .tag-subtree.is-parent.is-expanded > .tag-tree__link .tag-switcher
54
56
  transform: translateY(-25%) rotate(45deg)
55
57
 
56
- .widget-body.tag-tree .tag-subtree.parent-tag > .tag-subtree
58
+ .tag-tree .tag-subtree.is-parent > .tag-subtree
57
59
  display: none
58
60
 
59
- .widget-body.tag-tree .tag-subtree.parent-tag.expanded > .tag-subtree
61
+ .tag-tree .tag-subtree.is-parent.is-expanded > .tag-subtree
60
62
  display: block
61
63
 
62
- .widget-body.tag-tree .tag-subtree .tagcon
63
- font-size: smaller
64
- opacity: 0.4
65
- margin-right: 0.25rem
64
+ .tag-tree .tag-subtree
65
+ min-width: 0
66
+ >.ui-collection__item
67
+ width: 100%
@@ -13,7 +13,7 @@
13
13
  font-weight: 500
14
14
  font-size: $fsh5
15
15
  .body
16
- --fsp: $fsp2
16
+ --fs-content: $fs-content-2
17
17
  >.link
18
18
  margin: 0
19
19
  height: 0
@@ -28,13 +28,13 @@
28
28
  overflow: hidden
29
29
  padding-left: 1rem
30
30
  li
31
- font-size: var(--fsp)
31
+ font-size: var(--fs-content)
32
32
  .post-title
33
33
  margin: 0
34
34
  line-height: 1.2
35
35
  word-break: break-all
36
36
  p
37
- --fsp: $fsp2
37
+ --fs-content: $fs-content-2
38
38
  section+section
39
39
  margin-top: 1rem
40
40
  padding-top: 1rem
@@ -91,11 +91,14 @@
91
91
  .article-footer .social-wrap
92
92
  grid-gap: 0.5rem 2rem
93
93
  margin: 1rem 0 0.5rem
94
- grid-template-columns: repeat(auto-fill, 20px);
95
94
  a.social
96
95
  background: none
97
96
  border-radius: 4px
98
97
  padding: 0
98
+ img
99
+ display: block
100
+ height: 24px
101
+ width 24px
99
102
 
100
103
  .article-footer .qrcode
101
104
  width: 128px
@@ -16,7 +16,7 @@
16
16
  flex-direction: column
17
17
  justify-content: center
18
18
  align-items: center
19
- font-size: var(--fsp)
19
+ font-size: var(--fs-content)
20
20
  .cover-title
21
21
  font-weight: 700
22
22
  font-size: 1.5rem
@@ -64,3 +64,282 @@
64
64
  .cover-title
65
65
  &:first-child
66
66
  font-size: 3rem
67
+
68
+
69
+ .l_cover.wiki-hero
70
+ min-height: 640px
71
+ overflow: hidden
72
+ isolation: isolate
73
+ color: var(--text)
74
+ text-align: left
75
+ .wiki-cover-background
76
+ position: absolute
77
+ z-index: -1
78
+ inset: 0
79
+ overflow: hidden
80
+ background: var(--background)
81
+ &.image
82
+ .wiki-cover-background-image,
83
+ .wiki-cover-background-blur
84
+ position: absolute
85
+ inset: 0
86
+ width: 100%
87
+ height: 100%
88
+ object-fit: cover
89
+ .wiki-cover-background-image
90
+ z-index: 0
91
+ .wiki-cover-background-blur
92
+ z-index: 1
93
+ filter: blur(18px)
94
+ // 以透明度遮罩渐入模糊层;clip-path 会在 80% 处硬切,丢失过渡。
95
+ mask: linear-gradient(to top, black 0%, rgba(black, .75) 10%, transparent 20%)
96
+ -webkit-mask: linear-gradient(to top, black 0%, rgba(black, .75) 10%, transparent 20%)
97
+ transform: scale(1.03)
98
+ .wiki-cover-background-overlay
99
+ position: absolute
100
+ z-index: 2
101
+ inset: 0
102
+ pointer-events: none
103
+ background: linear-gradient(to bottom, transparent 0%, transparent 80%, var(--background) 100%)
104
+ &.galaxy
105
+ background: #000000
106
+ canvas
107
+ display: block
108
+ width: 100%
109
+ height: 100%
110
+ pointer-events: none
111
+ .wiki-navbar
112
+ position: absolute
113
+ top: 2rem
114
+ left: 0
115
+ right: 0
116
+ .wiki-cover-layout
117
+ width: calc(100% - 4rem)
118
+ max-width: 1120px
119
+ height: 100%
120
+ margin: 0 auto
121
+ position: relative
122
+ color: var(--text-banner, var(--text))
123
+ // 未配置背景时没有 data-text-adaptive,不会运行自适应取色。
124
+ .wiki-cover-layout:not([data-text-adaptive])
125
+ --text-banner-theme: var(--text-p2)
126
+ .wiki-cover-release,
127
+ .wiki-cover-actions a.button
128
+ border-color: var(--block-border)
129
+ .wiki-navbar-home
130
+ display: inline-flex
131
+ align-items: center
132
+ min-height: 1.5rem
133
+ padding: 0
134
+ border: 0
135
+ color: var(--text-banner, var(--text))
136
+ font-size: 1rem
137
+ font-weight: 700
138
+ line-height: 1.5rem
139
+ text-decoration: none
140
+ background: transparent
141
+ box-shadow: none
142
+ &:hover
143
+ color: var(--text-banner, var(--text))
144
+ background: transparent
145
+ opacity: .8
146
+ .wiki-cover-content
147
+ width: 100%
148
+ max-width: none
149
+ height: 100%
150
+ margin: 0
151
+ display: grid
152
+ grid-template-columns: minmax(0, 1fr) minmax(320px, .9fr)
153
+ gap: clamp(3rem, 8vw, 8rem)
154
+ align-items: center
155
+ .wiki-cover-intro
156
+ max-width: 560px
157
+ display: flex
158
+ flex-direction: column
159
+ align-items: stretch
160
+ gap: 2rem
161
+ .wiki-cover-release
162
+ display: inline-flex
163
+ align-items: center
164
+ min-height: 1.75rem
165
+ align-self: flex-start
166
+ box-sizing: border-box
167
+ padding: .25rem .75rem
168
+ margin: 0
169
+ border: 1px solid unquote('color-mix(in srgb, var(--text-banner-theme, white) 50%, transparent)')
170
+ border-radius: 100px
171
+ color: inherit
172
+ font-size: $fs-12
173
+ font-weight: 700
174
+ line-height: 1.2
175
+ text-decoration: none
176
+ transition: opacity .25s ease
177
+ .wiki-cover-release-value
178
+ display: none
179
+ &.is-loading
180
+ // 请求期间仅保留标签高度,避免标题在数据返回时跳动。
181
+ opacity: 0
182
+ pointer-events: none
183
+ &.loaded
184
+ opacity: 1
185
+ .wiki-cover-release-value
186
+ display: inline
187
+ &:hover
188
+ color: inherit
189
+ background: unquote('color-mix(in srgb, var(--text-banner-theme, var(--background)) 20%, transparent)')
190
+ .cover-title
191
+ margin: 0
192
+ // 标题自身以 contrast 模式计算,始终在黑白之间切换,不继承容器主题色。
193
+ color: var(--text-banner, var(--text))
194
+ // 主题色仅作为外发光轮廓,保留黑白标题的对比度。
195
+ text-shadow: 0 0 16px unquote('color-mix(in srgb, var(--text-banner-theme, currentColor) 30%, transparent)'), 0 0 32px unquote('color-mix(in srgb, var(--text-banner-theme, currentColor) 20%, transparent)'), 0 0 64px unquote('color-mix(in srgb, var(--text-banner-theme, currentColor) 10%, transparent)')
196
+ font-size: clamp(2.5rem, 3vw, 4.75rem)
197
+ .description
198
+ margin: 0
199
+ color: var(--text-banner-theme, var(--text-p2))
200
+ line-height: 1.75
201
+ text-shadow: 0 0 8px unquote('color-mix(in srgb, var(--text-banner-theme, currentColor) 50%, transparent)'), 0 0 16px unquote('color-mix(in srgb, var(--text-banner-theme, currentColor) 10%, transparent)')
202
+ .wiki-cover-actions
203
+ display: flex
204
+ flex-wrap: wrap
205
+ gap: 1rem
206
+ a.button
207
+ display: inline-flex
208
+ align-items: center
209
+ gap: .5rem
210
+ padding: .5rem 1.25rem .5rem 1rem
211
+ border-radius: 100px
212
+ border: 1px solid unquote('color-mix(in srgb, var(--text-banner-theme, white) 50%, transparent)')
213
+ color: inherit
214
+ background: unquote('color-mix(in srgb, var(--text-banner-theme, var(--background)) 20%, transparent)')
215
+ backdrop-filter: blur(12px)
216
+ trans1 background
217
+ svg
218
+ width: 1.5rem
219
+ height: 1.5rem
220
+ &:hover
221
+ color: inherit
222
+ background: unquote('color-mix(in srgb, var(--text-banner-theme, var(--background)) 50%, transparent)')
223
+ &.wiki-cover-source
224
+ border-color: var(--text-banner, var(--text))
225
+ color: var(--text-banner, var(--text))
226
+ background: var(--text-banner, var(--text))
227
+ svg, span
228
+ filter: invert(1)
229
+ &:hover
230
+ color: var(--text-banner, var(--text))
231
+ background: var(--text-banner, var(--text))
232
+ .wiki-cover-preview
233
+ width: 100%
234
+ border-radius: 1.25rem
235
+ overflow: hidden
236
+ box-shadow: 0 24px 60px rgba(0,0,0,.18)
237
+ > img
238
+ display: block
239
+ width: 100%
240
+ max-height: 62vh
241
+ object-fit: contain
242
+ background: var(--card)
243
+ .wiki-cover-terminal
244
+ position: relative
245
+ min-height: 150px
246
+ padding: 1rem
247
+ color: var(--text-banner-theme)
248
+ background: unquote('color-mix(in srgb, var(--text-banner-theme, var(--background)) 20%, transparent)')
249
+ backdrop-filter: blur(12px) brightness(0.8)
250
+ font-family: $ff-code
251
+ .wiki-cover-terminal-toolbar
252
+ display: flex
253
+ align-items: center
254
+ justify-content: space-between
255
+ margin-bottom: 1.4rem
256
+ .wiki-cover-terminal-tabs
257
+ display: flex
258
+ gap: .5rem
259
+ button
260
+ padding: .5rem .75rem
261
+ border-radius: 8px
262
+ color: inherit
263
+ opacity 0.5
264
+ font-family: inherit
265
+ font-size: $fs-13
266
+ line-height: 1
267
+ font-weight: 500
268
+ &.active
269
+ opacity 1
270
+ background: unquote('color-mix(in srgb, var(--text-banner-theme, var(--background)) 20%, transparent)')
271
+ pre
272
+ margin: 0
273
+ padding: 0
274
+ overflow-x: auto
275
+ color: inherit
276
+ background: transparent
277
+ font: 1rem
278
+ line-height: 1.8
279
+ code span
280
+ display: block
281
+ code span:before
282
+ content: '$ '
283
+ color: #8ca5ff
284
+ .wiki-cover-copy
285
+ display: inline-flex
286
+ align-items: center
287
+ gap: .5rem
288
+ padding: .5rem .75rem .5rem .5rem
289
+ border-radius: 8px
290
+ color: var(--text-banner, var(--text))
291
+ font-family: inherit
292
+ font-size: $fs-13
293
+ line-height: 1
294
+ background: unquote('color-mix(in srgb, var(--text-banner-theme, var(--background)) 20%, transparent)')
295
+ trans1 background
296
+ &:hover
297
+ background: unquote('color-mix(in srgb, var(--text-banner-theme, var(--background)) 50%, transparent)')
298
+ &.without-preview .wiki-cover-content
299
+ grid-template-columns: minmax(0, 560px)
300
+ justify-content: center
301
+
302
+ @media screen and (max-width: $device-tablet)
303
+ .l_cover.wiki-hero
304
+ height: auto
305
+ min-height: 100vh
306
+ padding: 7rem 0 4rem
307
+ .wiki-cover-layout
308
+ width: calc(100% - 3rem)
309
+ max-width: 620px
310
+ height: auto
311
+ display: grid
312
+ grid-template-rows: auto 1fr
313
+ position: static
314
+ .wiki-navbar
315
+ position: absolute
316
+ top: 1.5rem
317
+ left: 1.5rem
318
+ right: 1.5rem
319
+ padding-top: 0
320
+ .wiki-cover-content
321
+ height: auto
322
+ margin-bottom: 5rem
323
+ grid-template-columns: 1fr
324
+ gap: 5rem
325
+ .wiki-cover-intro
326
+ max-width: none
327
+ .wiki-cover-preview
328
+ max-width: 620px
329
+
330
+ @media screen and (max-width: $device-mobile)
331
+ .l_cover.wiki-hero
332
+ .wiki-cover-layout
333
+ width: calc(100% - 2rem)
334
+ .wiki-navbar
335
+ left: 1rem
336
+ right: 1rem
337
+ .cover-title
338
+ font-size: 2rem
339
+ .wiki-cover-actions
340
+ a.button
341
+ padding: .25rem .75rem .25rem .5rem
342
+
343
+ @media (prefers-reduced-motion: reduce)
344
+ .l_cover.wiki-hero .wiki-cover-background.galaxy canvas
345
+ display: none
@@ -31,8 +31,8 @@ article.md-text.content+.related-wrap
31
31
  .title
32
32
  color: var(--text-p1)
33
33
  font-weight: 500
34
- --fsp: $fsp1
35
- font-size: var(--fsp)
34
+ --fs-content: $fs-content-1
35
+ font-size: var(--fs-content)
36
36
  trans2 color border
37
37
  position: relative
38
38
  padding-bottom: 2px
@@ -40,8 +40,8 @@ article.md-text.content+.related-wrap
40
40
  line-height: 1.6
41
41
  .excerpt
42
42
  color: var(--text-p3)
43
- --fsp: $fsp3
44
- font-size: var(--fsp)
43
+ --fs-content: $fs-content-3
44
+ font-size: var(--fs-content)
45
45
  margin-top: 0.5rem
46
46
  display: -webkit-box
47
47
  -webkit-box-orient: vertical
@@ -99,9 +99,13 @@ article.md-text.content+.related-wrap
99
99
  .cmt-body
100
100
  min-height: 150px
101
101
  position: relative
102
- svg.loading
102
+ .lazy-icon
103
+ position: absolute
103
104
  top: 60px
105
+ left: 50%
106
+ transform: translateX(-50%)
107
+ z-index: -1
104
108
  iframe
105
109
  border-radius: 4px
106
110
  border: none
107
- width: 100%
111
+ width: 100%
@@ -2,22 +2,75 @@
2
2
  margin: 0.5rem var(--gap-base) 1rem
3
3
 
4
4
  .social-wrap
5
- display: grid
6
- grid-gap: 0.25rem 0.25rem
7
- grid-template-columns: repeat(auto-fill, 32px)
5
+ display: flex
6
+ flex-wrap: wrap
7
+ gap: 0.5rem
8
+ align-items: center
8
9
  text-align: center
9
10
  .social
10
11
  line-height: 0
11
- display: inline-block
12
- padding: 6px
13
- border-radius: 32px
12
+ display: inline-flex
13
+ align-items: center
14
+ box-sizing: border-box
15
+ flex: 0 0 auto
16
+ height: 32px
17
+ padding: 4px
18
+ border-radius: 8px
14
19
  filter: grayscale(100%)
15
20
  overflow: hidden
16
- background: transparent
17
- trans3: box-shadow background transform
18
- &:hover
19
- z-index: 1
20
- filter: unset
21
- background: var(--bg-a100)
21
+ background: var(--ui-item-bg)
22
+ box-shadow: none
22
23
  img
24
+ flex: initial
25
+ width: auto
26
+ height: auto
23
27
  border-radius: 2px
28
+ svg
29
+ flex: initial
30
+ height: 24px
31
+ width: 24px
32
+
33
+ .social-spacer
34
+ flex: 1 1 0
35
+ min-width: 0
36
+ height: 32px
37
+ pointer-events: none
38
+
39
+ .social-dropdown
40
+ position: relative
41
+ box-sizing: border-box
42
+ flex: 0 0 auto
43
+ height: 32px
44
+ line-height: 0
45
+ >.dropdown-trigger.social
46
+ >img, >svg
47
+ opacity: .5
48
+ // JS 未加载时保留向上展开的原生 details 兜底;正常情况下菜单会移入全局浮层。
49
+ >.dropdown-menu
50
+ top: auto
51
+ bottom: calc(100% + 0.5rem)
52
+ &:first-child:not(:last-child) >.dropdown-menu, &:only-child >.dropdown-menu
53
+ left: 0
54
+ transform: none
55
+ &:last-child:not(:first-child) >.dropdown-menu
56
+ right: 0
57
+ left: auto
58
+ transform: none
59
+
60
+ .social:hover
61
+ background: var(--ui-item-bg-hover)
62
+ box-shadow: var(--ui-item-shadow-hover)
63
+
64
+ .social-dropdown[open] > .dropdown-trigger.social
65
+ background: var(--ui-item-bg-active)
66
+ box-shadow: var(--ui-item-shadow-active)
67
+
68
+ .social:hover, .social-dropdown[open] > .dropdown-trigger.social
69
+ z-index: 1
70
+ filter: unset
71
+ >img, >svg
72
+ opacity: 1
73
+ svg [fill="currentColor"]
74
+ fill: var(--item-grad)
75
+ svg [stroke="currentColor"]
76
+ stroke: var(--item-grad)
@@ -1,2 +1,7 @@
1
1
  .nav-area
2
- margin: 2rem 0
2
+ margin: 2rem 0
3
+ .menu
4
+ width: 100%
5
+ margin: 0
6
+ .ui-collection__title
7
+ font-size: $fs-15