hexo-theme-stellar 1.33.0 → 1.33.1
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/_config.yml +8 -13
- package/layout/_plugins/mathjax.ejs +47 -18
- package/package.json +1 -1
- package/source/css/_components/md.styl +2 -0
- package/source/css/_components/partial/navbar.styl +2 -2
- package/source/css/_custom.styl +4 -2
- package/source/css/_defines/func.styl +16 -8
- package/source/css/_defines/theme_base.styl +1 -1
package/_config.yml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
######## Stellar info ########
|
|
2
2
|
stellar:
|
|
3
|
-
version: '1.33.
|
|
3
|
+
version: '1.33.1'
|
|
4
4
|
homepage: 'https://xaoxuu.com/wiki/stellar/'
|
|
5
5
|
repo: 'https://github.com/xaoxuu/hexo-theme-stellar'
|
|
6
6
|
main_css: /css/main.css
|
|
@@ -392,12 +392,12 @@ tag_plugins:
|
|
|
392
392
|
prefix: ph:seal-question-fill
|
|
393
393
|
# {% emoji %}
|
|
394
394
|
emoji:
|
|
395
|
-
default: https://gcore.jsdelivr.net/gh/cdn-x/
|
|
395
|
+
default: https://gcore.jsdelivr.net/gh/cdn-x/emoticons@3.1/qq/{name}.gif
|
|
396
396
|
twemoji: https://gcore.jsdelivr.net/gh/twitter/twemoji/assets/svg/{name}.svg
|
|
397
|
-
qq: https://gcore.jsdelivr.net/gh/cdn-x/
|
|
398
|
-
aru: https://gcore.jsdelivr.net/gh/cdn-x/
|
|
399
|
-
tieba: https://gcore.jsdelivr.net/gh/cdn-x/
|
|
400
|
-
blobcat: https://gcore.jsdelivr.net/gh/cdn-x/
|
|
397
|
+
qq: https://gcore.jsdelivr.net/gh/cdn-x/emoticons@3.1/qq/{name}.gif
|
|
398
|
+
aru: https://gcore.jsdelivr.net/gh/cdn-x/emoticons@3.1/aru/{name}.gif
|
|
399
|
+
tieba: https://gcore.jsdelivr.net/gh/cdn-x/emoticons@3.1/tieba/{name}.png
|
|
400
|
+
blobcat: https://gcore.jsdelivr.net/gh/cdn-x/emoticons@3.1/blobcat/{name}.gif
|
|
401
401
|
icon:
|
|
402
402
|
# 留空时,图标和文字颜色相同
|
|
403
403
|
default_color: accent # theme, accent, red, orange, yellow, green, cyan, blue, purple
|
|
@@ -594,6 +594,7 @@ plugins:
|
|
|
594
594
|
# 需在Markdown文件开头加入mathjax: true
|
|
595
595
|
# 推荐使用Pandoc: npm uninstall hexo-renderer-marked --save & npm install hexo-renderer-pandoc --save
|
|
596
596
|
mathjax:
|
|
597
|
+
v3: false # 若使用 v3,需將 js 設置為 https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.2/es5/tex-mml-chtml.min.js
|
|
597
598
|
enable: # true # 可以在特定文章的 front-matter 中设置 mathjax: true 来开启,也可以在这里设置全局开启
|
|
598
599
|
js: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-AMS-MML_HTMLorMML
|
|
599
600
|
|
|
@@ -654,16 +655,10 @@ style:
|
|
|
654
655
|
image: 16px # 技术类文章插图圆角
|
|
655
656
|
image-s: 8px # 评论区图片圆角(部分评论支持)
|
|
656
657
|
color:
|
|
657
|
-
# 动态颜色(会根据明暗主题重设明度值,只用关心色相和饱和度即可)
|
|
658
|
-
background: 'hsl(212 16% 98%)' # 浅色背景颜色
|
|
659
|
-
block: 'hsl(212 8% 95%)' # 块背景颜色
|
|
660
|
-
code: 'hsl(220 20% 10%)' # 'hsl(14 100% 48%)' # 行内代码颜色
|
|
661
|
-
text: 'hsl(0 0% 20%)' # 文本颜色
|
|
662
658
|
# 主题色配置(不会根据明暗动态调整,请设置为通用的颜色)
|
|
663
659
|
theme: 'hsl(192 98% 55%)' # 主题色
|
|
664
660
|
accent: 'hsl(14 100% 57%)' # 强调色
|
|
665
661
|
link: 'hsl(207 90% 54%)' # 超链接颜色
|
|
666
|
-
hover: 'hsl(14 100% 57%)' # 按钮高亮颜色
|
|
667
662
|
animated_avatar:
|
|
668
663
|
animate: auto # auto, always
|
|
669
664
|
background: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/avatar/round/rainbow64@3x.webp
|
|
@@ -693,7 +688,7 @@ style:
|
|
|
693
688
|
blur-sat: 300%
|
|
694
689
|
# 技术文章内页各级标题前面的符号
|
|
695
690
|
header_prefix:
|
|
696
|
-
h2: '
|
|
691
|
+
h2: '#'
|
|
697
692
|
h3: '='
|
|
698
693
|
h4: '|'
|
|
699
694
|
h5: ':'
|
|
@@ -1,20 +1,49 @@
|
|
|
1
|
-
|
|
1
|
+
<% if (conf.v3) { %>
|
|
2
|
+
<script>
|
|
3
|
+
window.MathJax = {
|
|
4
|
+
tex: {
|
|
5
|
+
inlineMath: [
|
|
6
|
+
["$", "$"],
|
|
7
|
+
["\\(", "\\)"],
|
|
8
|
+
],
|
|
9
|
+
processEscapes: true,
|
|
10
|
+
skipTags: ["script", "noscript", "style", "textarea", "pre", "code"],
|
|
11
|
+
},
|
|
12
|
+
startup: {
|
|
13
|
+
ready() {
|
|
14
|
+
MathJax.startup.defaultReady();
|
|
15
|
+
MathJax.typesetPromise().then(() => {
|
|
16
|
+
const math = document.querySelectorAll("mjx-container");
|
|
17
|
+
math.forEach((element) => {
|
|
18
|
+
if (element.parentNode) {
|
|
19
|
+
element.parentNode.classList.add("has-jax");
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
</script>
|
|
27
|
+
<% } %>
|
|
28
|
+
<script id="MathJax-script" src="<%- conf.js %>" async></script>
|
|
29
|
+
<% if (!conf.v3) { %>
|
|
2
30
|
<script type="text/x-mathjax-config">
|
|
3
|
-
MathJax.Hub.Config({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
});
|
|
9
|
-
MathJax.Hub.Config({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
});
|
|
14
|
-
MathJax.Hub.Queue(function() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
});
|
|
31
|
+
MathJax.Hub.Config({
|
|
32
|
+
tex2jax: {
|
|
33
|
+
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
|
|
34
|
+
processEscapes: true
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
MathJax.Hub.Config({
|
|
38
|
+
tex2jax: {
|
|
39
|
+
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
MathJax.Hub.Queue(function() {
|
|
43
|
+
var all = MathJax.Hub.getAllJax(), i;
|
|
44
|
+
for(i=0; i < all.length; i += 1) {
|
|
45
|
+
all[i].SourceElement().parentNode.className += ' has-jax';
|
|
46
|
+
}
|
|
47
|
+
});
|
|
20
48
|
</script>
|
|
49
|
+
<% } %>
|
package/package.json
CHANGED
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
z-index: 1
|
|
36
36
|
trans1 all
|
|
37
37
|
&:hover
|
|
38
|
-
background: var(--bg-
|
|
38
|
+
background: var(--bg-a50)
|
|
39
39
|
&.active, &:hover
|
|
40
40
|
color: var(--text)
|
|
41
41
|
&.active
|
|
42
42
|
background: var(--bg-a60)
|
|
43
43
|
@media (prefers-color-scheme: dark)
|
|
44
44
|
background: rgba(white, 0.25)
|
|
45
|
-
box-shadow:
|
|
45
|
+
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)
|
|
46
46
|
cursor default
|
|
47
47
|
pointer-events: none
|
|
48
48
|
backdrop-filter: saturate(300%)
|
package/source/css/_custom.styl
CHANGED
|
@@ -35,8 +35,10 @@ $leftbar-background-color = hexo-config('style.leftbar.background-color')
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
// colors
|
|
38
|
-
$c-theme =
|
|
39
|
-
$c-accent =
|
|
38
|
+
$c-theme = convert(hexo-config('style.color.theme'))
|
|
39
|
+
$c-accent = convert(hexo-config('style.color.accent'))
|
|
40
|
+
$c-link = convert(hexo-config('style.color.link'))
|
|
41
|
+
|
|
40
42
|
$c-base-hue = 210deg // 背景/文本颜色的主基调(一般看不出来不需要修改)
|
|
41
43
|
|
|
42
44
|
// icons
|
|
@@ -136,6 +136,13 @@ hoverable-card()
|
|
|
136
136
|
newblur()
|
|
137
137
|
box-shadow: 0 0 2px rgba(black, .04), 0 2px 8px rgba(black, .04), 0 4px 16px rgba(black, .04)
|
|
138
138
|
trans1: all
|
|
139
|
+
text-shadow: 0 0 4px rgba(white, 1), 0 0 8px rgba(white, 0.8), 0 0 16px rgba(white, 0.6)
|
|
140
|
+
@media (prefers-color-scheme: dark)
|
|
141
|
+
text-shadow: 0 0 2px rgba(black, 0.2), 0 0 4px rgba(black, 0.4)
|
|
142
|
+
nav a:not(.active,:hover)
|
|
143
|
+
filter: drop-shadow(0 0 0 white) drop-shadow(0 0 4px white)
|
|
144
|
+
@media (prefers-color-scheme: dark)
|
|
145
|
+
filter: none
|
|
139
146
|
&:before,&:after
|
|
140
147
|
z-index -1
|
|
141
148
|
position: absolute
|
|
@@ -149,17 +156,18 @@ newblur()
|
|
|
149
156
|
&:before
|
|
150
157
|
backdrop-filter: blur(8px)
|
|
151
158
|
-webkit-backdrop-filter: blur(8px)
|
|
152
|
-
background:
|
|
159
|
+
background: rgba(white, 0.3)
|
|
160
|
+
margin: 1px
|
|
161
|
+
@media (prefers-color-scheme: dark)
|
|
162
|
+
background: rgba(white, 0.2)
|
|
153
163
|
&:after
|
|
154
|
-
--blur-px:
|
|
155
|
-
--blur-sat:
|
|
156
|
-
background: var(--bg-a50)
|
|
164
|
+
--blur-px: 16px
|
|
165
|
+
--blur-sat: 300%
|
|
157
166
|
backdrop-filter: saturate(var(--blur-sat)) blur(var(--blur-px))
|
|
158
167
|
-webkit-backdrop-filter: saturate(var(--blur-sat)) blur(var(--blur-px))
|
|
159
|
-
mask: linear-gradient(
|
|
160
|
-
-webkit-mask: linear-gradient(
|
|
168
|
+
mask: linear-gradient(white, 20%, transparent, 80%, white), linear-gradient(90deg, white, 20%, transparent, 80%, white)
|
|
169
|
+
-webkit-mask-image: linear-gradient(white, 20%, transparent, 80%, white), linear-gradient(90deg, white, 20%, transparent, 80%, white)
|
|
161
170
|
box-shadow: inset 0 0 4px 1px rgba(white, 0.5)
|
|
162
171
|
trans1 all
|
|
163
172
|
@media (prefers-color-scheme: dark)
|
|
164
|
-
|
|
165
|
-
background: var(--bg-a20)
|
|
173
|
+
box-shadow: inset 0 0 2px 1px rgba(white, 0.2)
|