hexo-theme-stellar 1.26.7 → 1.27.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 (150) hide show
  1. package/_config.yml +134 -94
  2. package/_data/icons.yml +8 -1
  3. package/_data/widgets.yml +19 -7
  4. package/languages/en.yml +4 -2
  5. package/languages/zh-CN.yml +3 -1
  6. package/languages/zh-TW.yml +4 -2
  7. package/layout/404.ejs +1 -1
  8. package/layout/_partial/{plugins/comments → comments}/artalk/script.ejs +2 -2
  9. package/layout/_partial/{plugins/comments/utterances → comments/giscus}/layout.ejs +5 -2
  10. package/layout/_partial/{plugins/comments → comments}/giscus/script.ejs +1 -4
  11. package/layout/_partial/{plugins/comments → comments}/layout.ejs +1 -1
  12. package/layout/_partial/{plugins/comments → comments}/twikoo/script.ejs +1 -1
  13. package/layout/_partial/comments/waline/script.ejs +43 -0
  14. package/layout/_partial/head.ejs +0 -1
  15. package/layout/_partial/main/article/article_footer.ejs +1 -1
  16. package/layout/_partial/main/footer.ejs +1 -1
  17. package/layout/_partial/main/navbar/article_banner.ejs +81 -17
  18. package/layout/_partial/main/navbar/ghinfo.ejs +1 -1
  19. package/layout/_partial/main/post_list/post_card.ejs +1 -1
  20. package/layout/_partial/menubtn.ejs +6 -3
  21. package/layout/_partial/scripts/defines.ejs +31 -0
  22. package/layout/_partial/scripts/services.ejs +29 -0
  23. package/layout/_partial/scripts/sidebar.ejs +25 -0
  24. package/layout/_partial/scripts/utils.ejs +158 -0
  25. package/layout/_partial/scripts.ejs +32 -0
  26. package/layout/_partial/sidebar/{index.ejs → index_leftbar.ejs} +22 -20
  27. package/layout/_partial/sidebar/index_rightbar.ejs +84 -0
  28. package/layout/_partial/sidebar/logo.ejs +1 -1
  29. package/layout/_partial/widgets/author.ejs +37 -0
  30. package/layout/_partial/widgets/components/edit.ejs +24 -0
  31. package/layout/_partial/widgets/ghissues.ejs +1 -1
  32. package/layout/_partial/widgets/ghrepo.ejs +2 -2
  33. package/layout/_partial/widgets/ghuser.ejs +2 -2
  34. package/layout/_partial/widgets/markdown.ejs +1 -1
  35. package/layout/_partial/widgets/recent.ejs +1 -5
  36. package/layout/_partial/widgets/related.ejs +1 -1
  37. package/layout/_partial/widgets/timeline.ejs +1 -1
  38. package/layout/_partial/widgets/toc.ejs +32 -85
  39. package/layout/_partial/widgets/tree.ejs +71 -0
  40. package/layout/_plugins/copycode.ejs +13 -0
  41. package/layout/_plugins/fancybox.ejs +32 -0
  42. package/layout/_plugins/heti.ejs +21 -0
  43. package/layout/_plugins/index.ejs +24 -0
  44. package/layout/_plugins/lazyload.ejs +21 -0
  45. package/layout/{_partial/plugins/parser/mathjax/script.ejs → _plugins/mathjax.ejs} +1 -1
  46. package/layout/_plugins/mermaid.ejs +29 -0
  47. package/layout/_plugins/preload.ejs +9 -0
  48. package/layout/_plugins/scrollreveal.ejs +15 -0
  49. package/layout/_plugins/search/local_search.ejs +8 -0
  50. package/layout/_plugins/swiper.ejs +26 -0
  51. package/layout/_plugins/tianli_gpt.ejs +11 -0
  52. package/layout/archive.ejs +9 -2
  53. package/layout/layout.ejs +9 -6
  54. package/layout/page.ejs +2 -10
  55. package/package.json +1 -1
  56. package/scripts/events/lib/doc_tree.js +8 -8
  57. package/scripts/events/lib/topic_tree.js +3 -0
  58. package/scripts/generators/author.js +1 -1
  59. package/scripts/helpers/parse_config.js +6 -5
  60. package/scripts/tags/lib/albums.js +2 -2
  61. package/scripts/tags/lib/button.js +1 -1
  62. package/scripts/tags/lib/emoji.js +1 -1
  63. package/scripts/tags/lib/friends.js +1 -1
  64. package/scripts/tags/lib/icon.js +10 -5
  65. package/scripts/tags/lib/link.js +2 -2
  66. package/scripts/tags/lib/md.js +1 -1
  67. package/scripts/tags/lib/posters.js +2 -2
  68. package/scripts/tags/lib/sites.js +1 -1
  69. package/scripts/tags/lib/timeline.js +2 -2
  70. package/source/css/_common/button.styl +8 -2
  71. package/source/css/_common/device.styl +39 -12
  72. package/source/css/_custom.styl +15 -16
  73. package/source/css/_defines/const.styl +1 -1
  74. package/source/css/_defines/func.styl +14 -4
  75. package/source/css/_defines/theme.styl +38 -27
  76. package/source/css/_layout/layout.styl +61 -26
  77. package/source/css/_layout/list.styl +1 -1
  78. package/source/css/_layout/main.styl +1 -4
  79. package/source/css/_layout/md.styl +16 -2
  80. package/source/css/_layout/pages/archives.styl +4 -0
  81. package/source/css/_layout/partial/article-banner.styl +14 -15
  82. package/source/css/_layout/partial/article-footer.styl +0 -5
  83. package/source/css/_layout/partial/footer.styl +8 -6
  84. package/source/css/_layout/partial/related.styl +4 -0
  85. package/source/css/_layout/sidebar/footer.styl +3 -1
  86. package/source/css/_layout/sidebar/logo.styl +3 -1
  87. package/source/css/_layout/sidebar/nav-area.styl +1 -1
  88. package/source/css/_layout/sidebar/sidebar.styl +23 -16
  89. package/source/css/_layout/tag-plugins/banner.styl +1 -8
  90. package/source/css/_layout/tag-plugins/common.styl +10 -5
  91. package/source/css/_layout/tag-plugins/icon.styl +6 -0
  92. package/source/css/_layout/tag-plugins/image.styl +1 -1
  93. package/source/css/_layout/tag-plugins/quot.styl +1 -1
  94. package/source/css/_layout/tag-plugins/timeline.styl +26 -27
  95. package/source/css/_layout/widgets/ghrepo.styl +1 -1
  96. package/source/css/_layout/widgets/ghuser.styl +9 -5
  97. package/source/css/_layout/widgets/list.styl +4 -2
  98. package/source/css/_layout/widgets/related.styl +0 -1
  99. package/source/css/_layout/widgets/timeline.styl +27 -21
  100. package/source/css/_layout/widgets/toc.styl +182 -0
  101. package/source/css/_layout/widgets/tree.styl +0 -0
  102. package/source/css/_layout/widgets/widgets.styl +26 -7
  103. package/source/css/_plugins/comments/twikoo.styl +6 -6
  104. package/source/css/_plugins/comments/waline.styl +13 -10
  105. package/source/css/_plugins/index.styl +2 -0
  106. package/source/css/_plugins/katex.styl +5 -0
  107. package/source/css/_plugins/mermaid.styl +49 -59
  108. package/source/css/_plugins/tianli_gpt.styl +208 -151
  109. package/source/js/main.js +48 -251
  110. package/source/js/plugins/copycode.js +24 -28
  111. package/source/js/search/local-search.js +32 -0
  112. package/source/js/services/fcircle.js +36 -0
  113. package/source/js/services/friends.js +27 -0
  114. package/source/js/services/ghinfo.js +33 -0
  115. package/source/js/services/mdrender.js +10 -0
  116. package/source/js/services/memos.js +73 -0
  117. package/source/js/services/siteinfo.js +38 -0
  118. package/source/js/services/sites.js +30 -0
  119. package/source/js/services/timeline.js +106 -0
  120. package/source/js/services/weibo.js +60 -0
  121. package/layout/_partial/main/navbar/article_top_area.ejs +0 -35
  122. package/layout/_partial/main/navbar/author_banner.ejs +0 -29
  123. package/layout/_partial/plugins/ai/tianli_gpt.ejs +0 -9
  124. package/layout/_partial/plugins/comments/waline/script.ejs +0 -39
  125. package/layout/_partial/plugins/parser/head.ejs +0 -3
  126. package/layout/_partial/plugins/parser/katex/head.ejs +0 -3
  127. package/layout/_partial/plugins/parser/katex/script.ejs +0 -4
  128. package/layout/_partial/plugins/parser/mermaid/script.ejs +0 -29
  129. package/layout/_partial/plugins/parser/script.ejs +0 -9
  130. package/layout/_partial/scripts/index.ejs +0 -176
  131. package/source/css/_layout/widgets/toc_blog.styl +0 -3
  132. package/source/css/_layout/widgets/toc_common.styl +0 -92
  133. package/source/css/_layout/widgets/toc_wiki.styl +0 -62
  134. package/source/js/plugins/fcircle.js +0 -92
  135. package/source/js/plugins/friends.js +0 -84
  136. package/source/js/plugins/ghinfo.js +0 -85
  137. package/source/js/plugins/linkcard.js +0 -48
  138. package/source/js/plugins/marked.js +0 -50
  139. package/source/js/plugins/memos.js +0 -132
  140. package/source/js/plugins/sites.js +0 -87
  141. package/source/js/plugins/timeline.js +0 -162
  142. package/source/js/plugins/weibo.js +0 -116
  143. /package/layout/_partial/{plugins/comments → comments}/artalk/layout.ejs +0 -0
  144. /package/layout/_partial/{plugins/comments → comments}/beaudar/layout.ejs +0 -0
  145. /package/layout/_partial/{plugins/comments → comments}/beaudar/script.ejs +0 -0
  146. /package/layout/_partial/{plugins/comments → comments}/script.ejs +0 -0
  147. /package/layout/_partial/{plugins/comments → comments}/twikoo/layout.ejs +0 -0
  148. /package/layout/_partial/{plugins/comments/giscus → comments/utterances}/layout.ejs +0 -0
  149. /package/layout/_partial/{plugins/comments → comments}/utterances/script.ejs +0 -0
  150. /package/layout/_partial/{plugins/comments → comments}/waline/layout.ejs +0 -0
@@ -1,22 +1,23 @@
1
- .widget-wrapper.ghuser
1
+ .widget-wrapper.user-card
2
2
  .widget-header+.widget-body
3
3
  margin: 0.75rem 0
4
- .widget-wrapper.ghuser .widget-body
4
+ .widget-wrapper.user-card .widget-body
5
5
  text-align: center
6
6
  background: var(--card)
7
7
  border-radius: $border-card
8
8
  padding: 1rem
9
9
  box-shadow: $boxshadow-card
10
10
 
11
- .widgets .widget-wrapper.ghuser
11
+ .widgets .widget-wrapper.user-card
12
12
  .avatar
13
13
  display: block
14
14
  border-radius: 100%
15
15
  margin: 1rem auto 1.25rem auto
16
- max-width: 75%
16
+ max-width: 128px
17
17
  overflow: hidden
18
- img
18
+ img
19
19
  display: block
20
+ aspect-ratio: 1
20
21
  @media screen and (max-width: $device-tablet)
21
22
  max-width: 50%
22
23
 
@@ -32,6 +33,7 @@
32
33
  .follow
33
34
  font-weight: 500
34
35
  border-radius: 64px
36
+ margin: 1rem 0 0
35
37
  padding: 0.5rem 1rem
36
38
  background: $color-theme
37
39
  color: var(--card)
@@ -45,6 +47,8 @@
45
47
  trans1: background
46
48
  svg
47
49
  margin-right: 6px
50
+ height: 1.5em
51
+ width: auto
48
52
  &:hover
49
53
  background: $color-hover
50
54
 
@@ -1,5 +1,4 @@
1
1
  .widget-wrapper.post-list .widget-body
2
- margin-top: 0.25rem
3
2
  a
4
3
  line-height: 1
5
4
  font-size: $fs-14
@@ -25,4 +24,7 @@
25
24
  height: 1em
26
25
  width: auto
27
26
  transform: scale(1.2)
28
-
27
+
28
+ .widget-wrapper.post-list
29
+ .widget-body+.widget-header
30
+ margin-top: 28px
@@ -1,7 +1,6 @@
1
1
 
2
2
  .widget-wrapper.post-card .widget-body
3
3
  max-width: 100%
4
- margin: 1rem 0
5
4
  .item+.item
6
5
  margin-top: 8px
7
6
  .item
@@ -1,34 +1,31 @@
1
- .widget-wrapper.timeline
1
+ .widget-wrapper.timeline
2
+ .tag-plugin.timeline
3
+ padding-left: 0
4
+ &:before
5
+ left: 6px
2
6
  .widget-body
3
- margin-top: 0.5rem
7
+ overflow hidden
4
8
  .body
5
9
  a
6
10
  trans1 all
7
- border-bottom: 1px solid var(--text)
8
- color: var(--text-p1)
11
+ word-break: break-all
9
12
  --fsp: $fsp2
10
- &:hover
11
- color: $color-hover
12
- border-bottom: 1px solid $color-hover
13
13
  .tag-plugin.timeline .timenode
14
+ z-index 1
15
+ margin-top: 0.25rem
14
16
  .header
15
- margin: 0.5rem 16px
16
- txt-ellipsis()
17
+ margin: 0.25rem var(--gap-padding)
17
18
  .user-info
18
- background: var(--alpha50)
19
- &:hover
20
- background: $color-hover
21
- color: var(--card)
22
- &:before
19
+ background: none
20
+ padding-right: 0
21
+ img
23
22
  display: none
24
- &+.timenode
25
- margin-top: 0.75rem
26
- .header p
27
- color: var(--text-p2)
23
+
24
+ .header:before
25
+ left: calc(6px - var(--gap-padding))
28
26
  .body
29
27
  border-radius: $border-card
30
- background: var(--alpha50)
31
- box-shadow: none
28
+ padding: 0.5rem 1rem
32
29
  p,li
33
30
  --fsp: $fsp3
34
31
  code
@@ -40,4 +37,13 @@
40
37
 
41
38
 
42
39
  .tag-plugin.timeline[api] .body .footer
43
- background: none
40
+ background: none
41
+
42
+ .l_left .widget-wrapper.timeline
43
+ .tag-plugin.timeline
44
+ padding-left: 0
45
+ &:before
46
+ content: none
47
+ .l_left .widget-wrapper.timeline .body
48
+ box-shadow: none
49
+ background: var(--alpha50)
@@ -0,0 +1,182 @@
1
+ .widget-wrapper.toc
2
+ background: var(--site-bg)
3
+ z-index 3
4
+ .widget-body
5
+ position relative
6
+ &:before
7
+ content: ''
8
+ position absolute
9
+ top: 6px
10
+ bottom: 6px
11
+ left: 0
12
+ width: 4px
13
+ background: var(--block)
14
+ border-radius: 4px
15
+
16
+ // 目录基本样式
17
+ .widget-wrapper.toc .toc
18
+ --fsp: $fsp2
19
+ padding: 0
20
+ margin: 0
21
+ position relative
22
+ list-style: none
23
+ li
24
+ margin: 0
25
+ list-style: none
26
+ a
27
+ --padding: calc(var(--gap-padding) / 2)
28
+ --padding-offset: calc(0 - var(--padding))
29
+ padding: 6px var(--padding)
30
+ margin: 0 var(--padding)
31
+ color: var(--text-p3)
32
+ display: block
33
+ position relative
34
+ border-radius: $border-bar
35
+ trans1 all
36
+ &.active:before
37
+ content: ''
38
+ position absolute
39
+ top: 6px
40
+ bottom: 6px
41
+ left: -8px
42
+ width: 4px
43
+ background: $color-theme
44
+ border-radius: 4px
45
+ &:hover
46
+ background: var(--block-hover)
47
+ color: var(--text)
48
+
49
+ // 固定位置
50
+ .l_right .widgets .widget-wrapper.toc
51
+ margin-top: 0
52
+ position: sticky
53
+ position: -webkit-sticky
54
+ top: 0
55
+ padding: 16px 0
56
+ &:first-child
57
+ top: 8px
58
+ padding-top: 8px
59
+ .widget-body .toc
60
+ max-height: 70vh
61
+ @media screen and (max-width: $device-laptop)
62
+ max-height: unset
63
+ overflow: auto
64
+ scrollbar(0, 0)
65
+
66
+
67
+
68
+ // 各级缩进样式
69
+ .widget-wrapper.toc .toc
70
+ .toc-item
71
+ font-weight: 500
72
+ --fsp: $fsp1
73
+ .toc-item .toc-item
74
+ font-weight: 400
75
+ --fsp: $fsp2
76
+ ol
77
+ padding-left: 0
78
+ .toc-child .toc-link
79
+ padding-left: 1.5rem
80
+ .toc-child .toc-child .toc-link
81
+ padding-left: 2.5rem
82
+ .toc-child .toc-child .toc-child .toc-link
83
+ padding-left: 3.5rem
84
+ .toc-child .toc-child .toc-child .toc-child .toc-link
85
+ padding-left: 4.5rem
86
+ .toc-child .toc-child .toc-child .toc-child .toc-child .toc-link
87
+ padding-left: 5rem
88
+
89
+ // 高亮样式
90
+ .widget-wrapper.toc .toc a.toc-link.active
91
+ color: var(--text)
92
+ &:before,&:after
93
+ content: ''
94
+
95
+ // 始终折叠
96
+ .widget-wrapper.toc[collapse='true']
97
+ .toc-item a.toc-link+ol
98
+ display: none
99
+ // 激活上级目录时显示子目录
100
+ .toc a.toc-link.active+ol
101
+ display: block
102
+
103
+ // 自动折叠
104
+ .widget-wrapper.toc[collapse='auto']
105
+ .toc-item a.toc-link+ol
106
+ display: none
107
+ // 激活上级目录时显示子目录
108
+ .toc a.toc-link.active+ol
109
+ display: block
110
+ // 鼠标放上去时显示子目录
111
+ &:hover a.toc-link+ol
112
+ display: block
113
+
114
+ // 子目录激活时显示
115
+ .widget-wrapper.toc[collapse='true'] ol:has(> .toc-item a.active)
116
+ display: block
117
+ .widget-wrapper.toc[collapse='auto'] ol:has(> .toc-item a.active)
118
+ display: block
119
+
120
+ // 手动折叠
121
+ .widget-wrapper.toc
122
+ .widget-body
123
+ display: grid
124
+ grid-template-rows: 1fr
125
+ trans1 all
126
+ overflow hidden
127
+ .l_right .widgets .widget-wrapper.toc .widget-header .cap-action:hover
128
+ background: var(--block-border)
129
+ .l_right .widgets .widget-wrapper.toc.collapse
130
+ .widget-header .cap-action
131
+ background: var(--block-border)
132
+ .widget-body
133
+ grid-template-rows: 0fr
134
+
135
+ // 编辑本文按钮
136
+ .widget-wrapper.toc .widget-body+.widget-footer:before
137
+ content: ''
138
+ position absolute
139
+ background: var(--block-border)
140
+ top: 0
141
+ height: 1px
142
+ left: var(--gap-padding)
143
+ right: var(--gap-padding)
144
+ .widget-wrapper.toc .widget-footer
145
+ margin-top: 8px
146
+ color: var(--text-p2)
147
+ position relative
148
+ padding-top: 8px
149
+ a
150
+ display: flex
151
+ align-items: center
152
+ color: inherit
153
+ font-size: $fs-14
154
+ padding: 8px var(--gap-padding)
155
+ border-radius: $border-bar
156
+ trans1 all
157
+ svg,img
158
+ height: 16px
159
+ width: auto
160
+ margin-right: 8px
161
+ a:hover
162
+ background: var(--block-hover)
163
+ color: var(--text)
164
+
165
+ .widget-wrapper.toc+.widget-wrapper
166
+ padding-top: 32px
167
+
168
+ @media screen and (max-width: $device-laptop)
169
+ .l_right
170
+ blur-effect()
171
+ .widgets
172
+ .widget-wrapper.toc
173
+ position: static
174
+ background: none
175
+ .widget-wrapper.toc .toc
176
+ a
177
+ color: var(--text-p2)
178
+ .widget-wrapper.toc .widget-footer
179
+ a
180
+ background: var(--alpha100)
181
+ a+a
182
+ margin-top: 4px
File without changes
@@ -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-l)
13
+ margin: 0 var(--gap-margin)
14
14
  .widget-wrapper
15
15
  .widget-header
16
- padding-left: var(--gap-l)
17
- padding-right: var(--gap-l)
16
+ padding-left: var(--gap-padding)
17
+ padding-right: var(--gap-padding)
18
18
  display: flex
19
19
  justify-content: space-between
20
20
  align-items: baseline
@@ -50,16 +50,35 @@
50
50
  fill: $color-hover
51
51
 
52
52
  .widget-body
53
- margin: 0.5rem 0
54
53
  color: var(--text-p1)
55
54
  p
56
55
  margin-top: .5em
57
56
  margin-bottom: .5em
58
57
  line-height: 1.5
59
- .widget-header+.widget-body
60
- margin-top: 0
61
58
 
62
59
 
63
60
  .widget-wrapper
64
61
  display: block
65
- margin: 32px 0
62
+ padding-bottom: 32px
63
+
64
+ .l_left .widgets
65
+ .widget-wrapper
66
+ &:first-child
67
+ margin-top: 32px
68
+
69
+ .l_right .widgets
70
+ &:empty
71
+ display: none
72
+ .widget-wrapper
73
+ .widget-header
74
+ padding-left: var(--gap-padding)
75
+ padding-right: var(--gap-padding)
76
+ // 小屏幕
77
+ @media screen and (max-width: $device-laptop)
78
+ .widget-wrapper
79
+ margin-top: var(--gap-margin)
80
+ border-radius: $border-card
81
+ // 大屏幕
82
+ @media screen and (min-width: $device-laptop)
83
+ .widget-wrapper.markdown .widget-body
84
+ background: var(--block)
@@ -106,15 +106,15 @@
106
106
  .tk-comments-no
107
107
  color: var(--text-p1);
108
108
 
109
- set_darkmode_comments()
109
+ _dark_comments()
110
110
  .cmt-body.twikoo
111
111
  --twikoo-lighttext: $color-link;
112
112
  --twikoo-secondtext: var(--text-p2);
113
113
  --twikoo-theme: $color-theme;
114
114
 
115
- if hexo-config('style.darkmode') == 'auto'
116
- @media (prefers-color-scheme: dark)
117
- set_darkmode_comments()
118
115
 
119
- if hexo-config('style.darkmode') == 'always'
120
- set_darkmode_comments()
116
+ if theme(dark)
117
+ _dark_comments()
118
+ else if theme(auto)
119
+ @media (prefers-color-scheme: dark)
120
+ _dark_comments()
@@ -1,4 +1,4 @@
1
- .cmt-body.waline
1
+ .cmt-body
2
2
  .wl-panel
3
3
  margin: 0.5em 0 !important
4
4
  .wl-meta-head
@@ -37,8 +37,8 @@
37
37
  --waline-avatar-radius: 50%;
38
38
  --waline-box-shadow: none;
39
39
 
40
-
41
- @media (prefers-color-scheme: dark)
40
+ .cmt-body.waline
41
+ ondark()
42
42
  --waline-white: #000;
43
43
  --waline-light-grey: #666;
44
44
  --waline-dark-grey: #999;
@@ -55,11 +55,14 @@
55
55
  /* 其他颜色 */
56
56
  --waline-info-bgcolor: #272727;
57
57
  --waline-info-color: #666;
58
+ .wl-count
59
+ padding: .375em;
60
+ font-weight: bold;
61
+ font-size: 1.25em;
62
+ color: #fff;
58
63
 
59
- .wl-count
60
- @media (prefers-color-scheme: dark)
61
- padding: .375em;
62
- font-weight: bold;
63
- font-size: 1.25em;
64
- color: #fff;
65
-
64
+ if theme(dark)
65
+ ondark()
66
+ else if theme(auto)
67
+ @media (prefers-color-scheme: dark)
68
+ ondark()
@@ -16,6 +16,8 @@ if hexo-config('plugins.copycode.enable')
16
16
  if hexo-config('plugins.tianli_gpt.enable')
17
17
  @import 'tianli_gpt'
18
18
 
19
+ if hexo-config('plugins.katex.enable')
20
+ @import 'katex'
19
21
 
20
22
  // 评论
21
23
  if hexo-config('comments.service') == 'beaudar'
@@ -0,0 +1,5 @@
1
+ .md-text
2
+ p.katex-block
3
+ .katex-display
4
+ overflow: scroll
5
+ scrollbar(0, 0)
@@ -1,18 +1,9 @@
1
1
  pre.mermaid
2
- display: inline-block
3
- width: 100%
4
- text-align: center
2
+ display: flex;
3
+ align-items: center;
4
+ justify-content: center;
5
5
  font-family: $ff-body
6
6
 
7
- .mermaid svg
8
- width: 100%
9
- display: inline-block
10
-
11
-
12
- .mermaid svg
13
- width: 100%
14
- display: inline-block
15
-
16
7
  .mermaid span,text
17
8
  font-family: $ff-body
18
9
 
@@ -23,103 +14,102 @@ pre.mermaid
23
14
  .mermaid rect.basic.label-container
24
15
  stroke: var(--block-border) !important
25
16
  fill: var(--block) !important
26
-
27
- set_mermaid_darkmode()
28
- .mermaid
17
+
18
+ _dark_mermaid()
19
+ .mermaid
29
20
  fill: #ccc !important
30
-
31
21
 
32
- .mermaid .error-icon
22
+
23
+ .mermaid .error-icon
33
24
  fill: #a44141 !important
34
-
35
25
 
36
- .mermaid .error-text
26
+
27
+ .mermaid .error-text
37
28
  fill: #ddd !important
38
29
  stroke: #ddd !important
39
-
40
30
 
41
- .mermaid .marker
31
+
32
+ .mermaid .marker
42
33
  fill: lightgrey !important
43
34
  stroke: lightgrey !important
44
-
45
35
 
46
- .mermaid .marker.cross
36
+
37
+ .mermaid .marker.cross
47
38
  stroke: lightgrey !important
48
-
49
39
 
50
- .mermaid .label
40
+
41
+ .mermaid .label
51
42
  color: #ccc !important
52
-
53
43
 
54
- .mermaid .cluster-label text
44
+
45
+ .mermaid .cluster-label text
55
46
  fill: #F9FFFE !important
56
-
57
47
 
58
- .mermaid .cluster-label span
48
+
49
+ .mermaid .cluster-label span
59
50
  color: #F9FFFE !important
60
-
51
+
61
52
 
62
53
  .mermaid .label text,
63
- .mermaid span
54
+ .mermaid span
64
55
  fill: #ccc !important
65
56
  color: #ccc !important
66
-
57
+
67
58
 
68
59
  .mermaid .node rect,
69
60
  .mermaid .node circle,
70
61
  .mermaid .node ellipse,
71
62
  .mermaid .node polygon,
72
- .mermaid .node path
63
+ .mermaid .node path
73
64
  fill: #1f2020 !important
74
65
  stroke: #81B1DB !important
75
-
76
66
 
77
- .mermaid .arrowheadPath
67
+
68
+ .mermaid .arrowheadPath
78
69
  fill: lightgrey !important
79
-
80
70
 
81
- .mermaid .edgePath .path
71
+
72
+ .mermaid .edgePath .path
82
73
  stroke: lightgrey !important
83
-
84
74
 
85
- .mermaid .flowchart-link
75
+
76
+ .mermaid .flowchart-link
86
77
  stroke: lightgrey !important
87
-
88
78
 
89
- .mermaid .edgeLabel
79
+
80
+ .mermaid .edgeLabel
90
81
  background-color: hsl(0, 0%, 34.4117647059%) !important
91
-
92
82
 
93
- .mermaid .edgeLabel rect
83
+
84
+ .mermaid .edgeLabel rect
94
85
  background-color: hsl(0, 0%, 34.4117647059%) !important
95
86
  fill: hsl(0, 0%, 34.4117647059%) !important
96
-
97
87
 
98
- .mermaid .cluster rect
88
+
89
+ .mermaid .cluster rect
99
90
  fill: hsl(180, 1.5873015873%, 28.3529411765%) !important
100
91
  stroke: rgba(255, 255, 255, 0.25) !important
101
-
102
92
 
103
- .mermaid .cluster text
93
+
94
+ .mermaid .cluster text
104
95
  fill: #F9FFFE !important
105
-
106
96
 
107
- .mermaid .cluster span
97
+
98
+ .mermaid .cluster span
108
99
  color: #F9FFFE !important
109
-
110
100
 
111
- .mermaid div.mermaidTooltip
101
+
102
+ .mermaid div.mermaidTooltip
112
103
  background: hsl(20, 1.5873015873%, 12.3529411765%) !important
113
104
  border: 1px solid rgba(255, 255, 255, 0.25) !important
114
-
115
105
 
116
- .mermaid .flowchartTitleText
106
+
107
+ .mermaid .flowchartTitleText
117
108
  fill: #ccc
118
-
119
109
 
120
- if hexo-config('style.darkmode') == 'auto'
121
- @media (prefers-color-scheme: dark)
122
- set_mermaid_darkmode()
123
110
 
124
- if hexo-config('style.darkmode') == 'always'
125
- set_mermaid_darkmode()
111
+ if theme(dark)
112
+ _dark_mermaid()
113
+ else if theme(auto)
114
+ @media (prefers-color-scheme: dark)
115
+ _dark_mermaid()