hexo-theme-solitude 2.0.8 → 2.0.10
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/README.md +1 -1
- package/README_zh-Hans.md +3 -3
- package/README_zh-Hant.md +2 -2
- package/_config.yml +13 -3
- package/layout/includes/footer.pug +3 -3
- package/layout/includes/inject/body.pug +106 -100
- package/layout/includes/widgets/home/topGroup.pug +5 -5
- package/layout/includes/widgets/post/copyright.pug +1 -1
- package/package.json +4 -4
- package/plugins.yml +11 -1
- package/scripts/event/merge_config.js +425 -423
- package/scripts/helper/inject_head_js.js +13 -7
- package/scripts/tags/article.js +39 -0
- package/scripts/tags/chart.js +27 -0
- package/scripts/tags/gallery.js +1 -1
- package/scripts/tags/typeit.js +29 -0
- package/source/css/_layout/article-container.styl +2 -2
- package/source/css/_layout/recent-post.styl +27 -29
- package/source/css/_page/_home/home-top.styl +5 -5
- package/source/js/main.js +1 -1
- package/source/js/utils.js +1 -7
package/README.md
CHANGED
@@ -20,7 +20,7 @@ English丨[简体中文](README_zh-Hans.md)丨[繁体中文](README_zh-Hant.md)
|
|
20
20
|
[](https://discord.gg/HZXAnK4Sut)
|
21
21
|

|
22
22
|
|
23
|
-
[Documentation](https://solitude.js.org/)丨[Preview](https://
|
23
|
+
[Documentation](https://solitude.js.org/)丨[Preview](https://solitude.js.org/preview/)
|
24
24
|
|
25
25
|
</div>
|
26
26
|
|
package/README_zh-Hans.md
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
<h1>Solitude</h1>
|
6
6
|
|
7
7
|
一款优雅的 Hexo 主题,支持懒加载、PWA、Latex 以及多种评论系统。
|
8
|
-
|
8
|
+
|
9
9
|
主题设计由 [@张洪Heo](https://github.com/zhheo) 全权授权
|
10
10
|
|
11
11
|

|
@@ -20,7 +20,7 @@
|
|
20
20
|
[](https://discord.gg/HZXAnK4Sut)
|
21
21
|

|
22
22
|
|
23
|
-
[文档](https://solitude.js.org/)丨[预览](https://
|
23
|
+
[文档](https://solitude.js.org/)丨[预览](https://solitude.js.org/preview/zh/)
|
24
24
|
|
25
25
|
</div>
|
26
26
|
|
@@ -58,7 +58,7 @@
|
|
58
58
|
```yaml
|
59
59
|
theme: solitude
|
60
60
|
```
|
61
|
-
|
61
|
+
|
62
62
|
前往 [文档](https://solitude.js.org/) 获取更多信息。
|
63
63
|
|
64
64
|
## 赞助者
|
package/README_zh-Hant.md
CHANGED
@@ -20,7 +20,7 @@
|
|
20
20
|
[](https://discord.gg/HZXAnK4Sut)
|
21
21
|

|
22
22
|
|
23
|
-
[文档](https://solitude.js.org/)丨[預覽](https://
|
23
|
+
[文档](https://solitude.js.org/)丨[預覽](https://solitude.js.org/preview/zh/)
|
24
24
|
|
25
25
|
</div>
|
26
26
|
|
@@ -36,7 +36,7 @@
|
|
36
36
|
- 評論(Twikoo、Waline、Valine、Artalk、Giscus),支援雙評論
|
37
37
|
- 晝夜切換(ColorMode)
|
38
38
|
- 燈箱(medium-zoom、fancybox)
|
39
|
-
- 數學公式(Latex)
|
39
|
+
- 數學公式(Latex)
|
40
40
|
- 特色頁面:即刻短文、我的裝備、在線工具、音樂館、友鏈魚塘、相冊頁、豆瓣頁、留言彈幕頁。
|
41
41
|
- 文章功能:AI 摘要、代碼高亮。
|
42
42
|
|
package/_config.yml
CHANGED
@@ -297,8 +297,8 @@ post:
|
|
297
297
|
enable: true
|
298
298
|
author:
|
299
299
|
url: /about/ # Author link
|
300
|
-
# Default icon
|
301
|
-
#
|
300
|
+
# Default use site.icon
|
301
|
+
# 默认使用 site.icon
|
302
302
|
img:
|
303
303
|
# License
|
304
304
|
# 许可证
|
@@ -421,7 +421,7 @@ related_post:
|
|
421
421
|
footer:
|
422
422
|
# Information social icon
|
423
423
|
information:
|
424
|
-
author: false #
|
424
|
+
author: false # img url / false
|
425
425
|
left:
|
426
426
|
# Github: https://github.com/everfu || fab fa-github # Name: link || icon
|
427
427
|
# Mail: mailto:o@efu.me || fab fa-envelope
|
@@ -626,6 +626,16 @@ mediumZoom: false # mediumZoom
|
|
626
626
|
mermaid: false
|
627
627
|
# --------------------------- end ---------------------------
|
628
628
|
|
629
|
+
# --------------------------- start ---------------------------
|
630
|
+
# Chart.js
|
631
|
+
chart: false
|
632
|
+
# --------------------------- end ---------------------------
|
633
|
+
|
634
|
+
# --------------------------- start ---------------------------
|
635
|
+
# typeit
|
636
|
+
typeit: false
|
637
|
+
# --------------------------- end ---------------------------
|
638
|
+
|
629
639
|
# --------------------------- start ---------------------------
|
630
640
|
# OpenGraph
|
631
641
|
OpenGraph:
|
@@ -13,8 +13,8 @@ if theme.post.footer.enable && is_post()
|
|
13
13
|
if theme.post.footer.button.enable
|
14
14
|
a.footer-bar-link(href=url_for(theme.post.footer.button.url))= theme.post.footer.button.name
|
15
15
|
div#footer_deal
|
16
|
-
- var leftInfo = information.left
|
17
|
-
- var rightInfo = information.right
|
16
|
+
- var leftInfo = information.left || []
|
17
|
+
- var rightInfo = information.right || []
|
18
18
|
|
19
19
|
each value, label in leftInfo
|
20
20
|
- var array = value.split('||')
|
@@ -31,7 +31,7 @@ div#footer_deal
|
|
31
31
|
i.solitude(class=array[1])
|
32
32
|
div#st-footer
|
33
33
|
|
34
|
-
each value, x in group
|
34
|
+
each value, x in group || []
|
35
35
|
div.footer-group
|
36
36
|
h3.footer-title= x
|
37
37
|
div.footer-links
|
@@ -1,112 +1,118 @@
|
|
1
1
|
- page.type = is_post() ? 'post' : page.type
|
2
2
|
|
3
3
|
mixin katex
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
4
|
+
if theme.katex.copytex
|
5
|
+
script(src=url_for(theme.cdn.katex_copytex))
|
6
|
+
script.
|
7
|
+
(() => {
|
8
|
+
document.querySelectorAll('#article-container span.katex-display').forEach(item => {
|
9
|
+
utils.wrap(item, 'div', {class: 'katex-wrap'})
|
10
|
+
})
|
11
|
+
})();
|
12
12
|
|
13
13
|
div
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
if
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
14
|
+
script(src=url_for(theme.cdn.utils))
|
15
|
+
script(src=url_for(theme.cdn.main))
|
16
|
+
script(src=url_for(theme.cdn.waterfall))
|
17
|
+
script(src=url_for(theme.cdn.pjax))
|
18
|
+
|
19
|
+
if theme.post.share.enable && theme.post.share.list && theme.post.share.list.includes('qrcode')
|
20
|
+
script(src=url_for(theme.cdn.qrcode))
|
21
|
+
|
22
|
+
if theme.mermaid
|
23
|
+
script(src=url_for(theme.cdn.mermaid_js))
|
24
|
+
|
25
|
+
if theme.chart
|
26
|
+
script(src=url_for(theme.cdn.chart_js))
|
27
|
+
|
28
|
+
if theme.typeit
|
29
|
+
script(src=url_for(theme.cdn.typeit_js))
|
30
|
+
|
31
|
+
if theme.display_mode.universe
|
32
|
+
script(src=url_for(theme.cdn.universe_js))
|
33
|
+
script.
|
34
|
+
dark()
|
35
|
+
|
36
|
+
if theme.right_menu.enable && theme.right_menu.translate.enable
|
37
|
+
script(src=url_for(theme.cdn.translate_js))
|
38
|
+
|
39
|
+
if theme.katex && theme.katex.enable
|
40
|
+
if theme.katex.per_page && (is_post() || is_page())
|
41
|
+
+katex
|
42
|
+
else if page.katex
|
43
|
+
+katex
|
44
|
+
|
45
|
+
if theme.lazyload.enable
|
46
|
+
script(src=url_for(theme.cdn.lazyload))
|
47
|
+
script(src=url_for(theme.cdn.snackbar))
|
48
|
+
if theme.lightbox
|
49
|
+
if theme.mediumZoom
|
50
|
+
script(src=url_for(theme.cdn.medium_zoom))
|
51
|
+
if theme.fancybox
|
52
|
+
script(src=url_for(theme.cdn.fancyapps_ui))
|
53
|
+
if (theme.says.home_mini && theme.says.enable) || theme.carousel
|
54
|
+
script(src=url_for(theme.cdn.swiper_js))
|
55
|
+
|
56
|
+
if theme.post_ai.enable
|
57
|
+
script(src=url_for(theme.cdn.efu_ai))
|
58
|
+
|
59
|
+
if theme.capsule.enable || theme.music.enable || theme.says.enable
|
60
|
+
script.
|
61
|
+
var meting_api = '!{theme.meting_api}';
|
62
|
+
script(src=url_for(theme.cdn.aplayer_js))
|
63
|
+
script(src=url_for(theme.cdn.meting_js))
|
64
|
+
|
65
|
+
if theme.post.covercolor.enable
|
66
|
+
case theme.post.covercolor.mode
|
67
|
+
when 'local'
|
68
|
+
script(src=url_for(theme.cdn.cover_local))
|
69
|
+
when 'api'
|
54
70
|
script.
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
.
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
script.
|
97
|
-
mermaid.run();
|
98
|
-
if is_home() && theme.carousel && site.posts.data.filter(item => item.recommend === true).slice(0, 6) || false
|
99
|
-
script.
|
100
|
-
carousel_swiper()
|
101
|
-
if theme.busuanzi && (theme.aside.siteinfo.uv || theme.aside.siteinfo.pv)
|
102
|
-
if theme.busuanzi_use === 0
|
103
|
-
script(defer pjax src=url_for(theme.cdn.busuanzi_js))
|
104
|
-
else
|
105
|
-
script(defer pjax src=url_for(theme.cdn.busuanzi_qj_js))
|
71
|
+
const coverColorConfig = {
|
72
|
+
api: '!{theme.post.covercolor.api}',
|
73
|
+
time: !{theme.post.covercolor.time}
|
74
|
+
}
|
75
|
+
script(src=url_for(theme.cdn.cover_api))
|
76
|
+
|
77
|
+
if theme.loading.pace
|
78
|
+
script(src=url_for(theme.cdn.pace_js))
|
79
|
+
|
80
|
+
if theme.search.enable && theme.search.type === "algolia"
|
81
|
+
script(src=url_for(theme.cdn.instantsearch))
|
82
|
+
script(src=url_for(theme.cdn.algolia_search))
|
83
|
+
|
84
|
+
if theme.right_menu.enable
|
85
|
+
script(src=url_for(theme.cdn.right_menu_js))
|
86
|
+
|
87
|
+
if theme.extends.body
|
88
|
+
each item in theme.extends.body
|
89
|
+
!= item
|
90
|
+
|
91
|
+
.js-pjax
|
92
|
+
if is_home() && theme.says.enable && theme.says.home_mini
|
93
|
+
script.
|
94
|
+
sco.initbbtalk()
|
95
|
+
if page.type === 'says' && theme.says.enable
|
96
|
+
script.
|
97
|
+
GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".bber-content-img img"));
|
98
|
+
sco.changeTimeFormat(document.querySelectorAll('.bber-info-time time'))
|
99
|
+
if comment_js
|
100
|
+
include ../widgets/third-party/comments/js
|
101
|
+
if theme.mermaid
|
102
|
+
script.
|
103
|
+
mermaid.run();
|
104
|
+
if is_home() && theme.carousel && site.posts.data.filter(item => item.recommend === true).slice(0, 6) || false
|
105
|
+
script.
|
106
|
+
carousel_swiper()
|
107
|
+
if theme.busuanzi && (theme.aside.siteinfo.uv || theme.aside.siteinfo.pv)
|
108
|
+
if theme.busuanzi_use === 0
|
109
|
+
script(defer pjax src=url_for(theme.cdn.busuanzi_js))
|
110
|
+
else
|
111
|
+
script(defer pjax src=url_for(theme.cdn.busuanzi_qj_js))
|
106
112
|
|
107
113
|
|
108
114
|
if theme.footer.randomlink
|
109
|
-
|
115
|
+
include ../widgets/randomlink.pug
|
110
116
|
|
111
117
|
// pjax
|
112
118
|
!= partial("includes/widgets/third-party/pjax", {}, {cache: true})
|
@@ -1,12 +1,12 @@
|
|
1
1
|
- var filteredPosts = site.posts.data.filter(item => item.recommend === true).slice(0,6)
|
2
|
-
.
|
2
|
+
.top-post-group
|
3
3
|
each post in filteredPosts
|
4
|
-
.
|
4
|
+
.top-post-item
|
5
5
|
.post_cover
|
6
6
|
a(href=url_for(post.path), title=post.title)
|
7
|
-
span.
|
7
|
+
span.top-post-top-text= _p('home.recommend')
|
8
8
|
img.post_bg(alt=post.title, src=url_for(post.cover))
|
9
|
-
.
|
9
|
+
.top-post-info
|
10
10
|
a.article-title(href=url_for(post.path), title=post.title)= post.title
|
11
11
|
|
12
12
|
mixin todayCardContent
|
@@ -29,4 +29,4 @@ case theme.hometop.recommendList.url.startsWith('/')
|
|
29
29
|
window.open("#{theme.hometop.recommendList.url}", "_blank");
|
30
30
|
}
|
31
31
|
.todayCard#todayCard(onclick="GoTodayCard()")
|
32
|
-
+todayCardContent()
|
32
|
+
+todayCardContent()
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "hexo-theme-solitude",
|
3
|
-
"version": "2.0.
|
4
|
-
"description": "A beautiful, powerful, and efficient Hexo theme developed by
|
3
|
+
"version": "2.0.10",
|
4
|
+
"description": "A beautiful, powerful, and efficient Hexo theme developed by Ever Fu.",
|
5
5
|
"main": "package.json",
|
6
6
|
"scripts": {
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1"
|
@@ -11,7 +11,7 @@
|
|
11
11
|
"theme",
|
12
12
|
"solitude",
|
13
13
|
"Card UI Design",
|
14
|
-
"
|
14
|
+
"Ever Fu",
|
15
15
|
"hexo-theme-solitude"
|
16
16
|
],
|
17
17
|
"repository": {
|
@@ -26,7 +26,7 @@
|
|
26
26
|
"url": "https://github.com/everfu/hexo-theme-solitude/issues",
|
27
27
|
"email": "o@everfu.org"
|
28
28
|
},
|
29
|
-
"homepage": "https://
|
29
|
+
"homepage": "https://solitude.js.org",
|
30
30
|
"author": "Hexo-Theme-Solitude<o@everfu.org>",
|
31
31
|
"license": "MIT"
|
32
32
|
}
|
package/plugins.yml
CHANGED
@@ -109,8 +109,18 @@ fancyapps_css:
|
|
109
109
|
other_name: fancyapps-ui
|
110
110
|
mermaid_js:
|
111
111
|
name: mermaid
|
112
|
-
file: dist/mermaid.
|
112
|
+
file: dist/mermaid.js
|
113
113
|
version: 10.9.1
|
114
|
+
chart_js:
|
115
|
+
name: chart.js
|
116
|
+
file: dist/chart.umd.js
|
117
|
+
version: 4.4.1
|
118
|
+
other_name: Chart.js
|
119
|
+
typeit_js:
|
120
|
+
name: typeit
|
121
|
+
file: index.umd.min.js
|
122
|
+
version: 8.8.4
|
123
|
+
other_name: typeit
|
114
124
|
blueimp_md5:
|
115
125
|
name: blueimp-md5
|
116
126
|
file: js/md5.min.js
|