hexo-theme-solitude 1.7.7 → 1.7.9
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 +13 -9
- package/README_zh-cn.md +13 -9
- package/README_zh-tw.md +13 -9
- package/_config.yml +35 -8
- package/languages/en.yml +26 -1
- package/languages/zh-CN.yml +26 -1
- package/languages/zh-TW.yml +26 -1
- package/layout/includes/head/config.pug +32 -1
- package/layout/includes/inject/body.pug +12 -22
- package/layout/includes/inject/head.pug +2 -2
- package/layout/includes/layout.pug +4 -0
- package/layout/includes/rightmenu.pug +80 -0
- package/layout/index.pug +2 -2
- package/package.json +1 -1
- package/plugins.yml +0 -4
- package/scripts/event/cdn.js +6 -1
- package/scripts/event/merge_config.js +173 -62
- package/scripts/tags/gallery.js +27 -44
- package/scripts/tags/link.js +40 -13
- package/source/css/_global/function.styl +6 -1
- package/source/css/_highlight/prismjs/line-number.styl +2 -1
- package/source/css/_layout/article-container.styl +3 -1
- package/source/css/{_page/_home → _layout}/recent-post.styl +5 -0
- package/source/css/_layout/rightmenu.styl +1 -1
- package/source/css/_page/_about/reward.styl +0 -2
- package/source/css/_page/_home/{banner.styl → carousel.styl} +6 -3
- package/source/css/_page/_home/home-top.styl +0 -4
- package/source/css/_page/_home/home.styl +3 -7
- package/source/css/_page/other.styl +1 -1
- package/source/css/_page/says.styl +1 -1
- package/source/css/_tags/button.styl +1 -1
- package/source/css/_tags/gallery.styl +97 -57
- package/source/js/main.js +23 -24
- package/source/js/right_menu.js +230 -0
- package/source/js/search/algolia.js +10 -0
- package/source/js/search/local.js +13 -13
- package/source/js/tw_cn.js +102 -52
- package/source/css/_post/content.styl +0 -0
- /package/source/css/{_page/_home → _layout}/pagination.styl +0 -0
package/README.md
CHANGED
@@ -4,10 +4,12 @@
|
|
4
4
|
|
5
5
|
<img src=".github/logo.svg" alt="Solitude logo" height="200">
|
6
6
|
|
7
|
-
|
7
|
+
<h1>Hexo Theme Solitude</h1>
|
8
8
|
|
9
|
-
|
9
|
+
An elegant Hexo theme that supports lazy loading, PWA, Latex, and multiple comment systems.
|
10
10
|
|
11
|
+
Theme is fully licensed and designed by the author of [@张洪Heo](https://github.com/zhheo)!
|
12
|
+
|
11
13
|

|
12
14
|

|
13
15
|

|
@@ -44,7 +46,7 @@
|
|
44
46
|
## Features
|
45
47
|
|
46
48
|
- Pjax、LazyLoad、PWA
|
47
|
-
- Comments(Twikoo、Waline)
|
49
|
+
- Comments(Twikoo、Waline、Valine、Discuss)
|
48
50
|
- ColorMode
|
49
51
|
- Lightbox(medium-zoom、fancybox)
|
50
52
|
- Mathematical formulas(Latex)
|
@@ -70,12 +72,14 @@
|
|
70
72
|
|
71
73
|
Check out the [Documentation](https://solitude-docs.efu.me/) for more information.
|
72
74
|
|
73
|
-
##
|
75
|
+
## Sponsors
|
74
76
|
|
75
|
-
<
|
76
|
-
<
|
77
|
-
|
77
|
+
<p align="center">
|
78
|
+
<a href="https://cdn.jsdelivr.net/gh/efuo/static/sponsors.svg">
|
79
|
+
<img src='https://cdn.jsdelivr.net/gh/efuo/static/sponsors.svg'/>
|
80
|
+
</a>
|
81
|
+
</p>
|
78
82
|
|
79
|
-
|
83
|
+
## License
|
80
84
|
|
81
|
-
|
85
|
+
[MIT](./LICENSE) License © 2023-PRESENT [Efu](https://github.com/efuo)
|
package/README_zh-cn.md
CHANGED
@@ -4,9 +4,11 @@
|
|
4
4
|
|
5
5
|
<img src=".github/logo.svg" alt="Solitude logo" height="200">
|
6
6
|
|
7
|
-
<h1
|
7
|
+
<h1>Hexo Theme Solitude</h1>
|
8
8
|
|
9
|
-
|
9
|
+
一款优雅的 Hexo 主题,支持懒加载、PWA、Latex以及多种评论系统。
|
10
|
+
|
11
|
+
主题由 [@张洪Heo](https://github.com/zhheo) 作者全权授权、设计!
|
10
12
|
|
11
13
|

|
12
14
|

|
@@ -44,7 +46,7 @@
|
|
44
46
|
## 特性
|
45
47
|
|
46
48
|
- 页面懒加载(Pjax)、图片懒加载(LazyLoad)、离线应用(PWA)
|
47
|
-
- 评论(Twikoo、Waline)
|
49
|
+
- 评论(Twikoo、Waline、Valine、Discuss)
|
48
50
|
- 显示切换(ColorMode)
|
49
51
|
- 灯箱(medium-zoom、fancybox)
|
50
52
|
- 数学公式(Latex)
|
@@ -70,12 +72,14 @@
|
|
70
72
|
|
71
73
|
前往 [文档](https://solitude-docs.efu.me/) 获取更多信息。
|
72
74
|
|
73
|
-
##
|
75
|
+
## 赞助者
|
74
76
|
|
75
|
-
<
|
76
|
-
<
|
77
|
-
|
77
|
+
<p align="center">
|
78
|
+
<a href="https://cdn.jsdelivr.net/gh/efuo/static/sponsors.svg">
|
79
|
+
<img src='https://cdn.jsdelivr.net/gh/efuo/static/sponsors.svg'/>
|
80
|
+
</a>
|
81
|
+
</p>
|
78
82
|
|
79
|
-
|
83
|
+
## 版权
|
80
84
|
|
81
|
-
|
85
|
+
[MIT](./LICENSE) License © 2023-至今 [Efu](https://github.com/efuo)
|
package/README_zh-tw.md
CHANGED
@@ -4,9 +4,11 @@
|
|
4
4
|
|
5
5
|
<img src=".github/logo.svg" alt="Solitude logo" height="200">
|
6
6
|
|
7
|
-
<h1
|
7
|
+
<h1>Hexo Theme Solitude</h1>
|
8
8
|
|
9
|
-
|
9
|
+
一款優雅的 Hexo 主題,支援懶載入、PWA、Latex以及多種評論系統。
|
10
|
+
|
11
|
+
主題由 [@张洪Heo](https://github.com/zhheo) 全權授權、設計!
|
10
12
|
|
11
13
|

|
12
14
|

|
@@ -44,7 +46,7 @@
|
|
44
46
|
## 特性
|
45
47
|
|
46
48
|
- 頁面懶載入(Pjax)、圖片懶載入(LazyLoad)、離線應用(PWA)
|
47
|
-
-
|
49
|
+
- 評論(Twikoo、Waline、Valine、Discuss)
|
48
50
|
- 顯示切換(ColorMode)
|
49
51
|
- 燈箱(medium-zoom、fancybox)
|
50
52
|
- 數學公式(Latex)
|
@@ -70,12 +72,14 @@
|
|
70
72
|
|
71
73
|
前往 [文檔](https://solitude-docs.efu.me) 獲取更多資訊。
|
72
74
|
|
73
|
-
##
|
75
|
+
## 贊助者
|
74
76
|
|
75
|
-
<
|
76
|
-
<
|
77
|
-
|
77
|
+
<p align="center">
|
78
|
+
<a href="https://cdn.jsdelivr.net/gh/efuo/static/sponsors.svg">
|
79
|
+
<img src='https://cdn.jsdelivr.net/gh/efuo/static/sponsors.svg'/>
|
80
|
+
</a>
|
81
|
+
</p>
|
78
82
|
|
79
|
-
|
83
|
+
## 版權
|
80
84
|
|
81
|
-
|
85
|
+
[MIT](./LICENSE) License © 2023-至今 [Efu](https://github.com/efuo)
|
package/_config.yml
CHANGED
@@ -138,11 +138,11 @@ hometop:
|
|
138
138
|
# Shadow color
|
139
139
|
color: "none"
|
140
140
|
|
141
|
-
|
142
|
-
|
141
|
+
# carousel
|
142
|
+
# 顶部推荐轮播图
|
143
143
|
# 使用方法:在文章的front matter中添加“recommend: true”
|
144
144
|
# tip:建议开了这个就不要开hometop,其功能类似
|
145
|
-
|
145
|
+
carousel: false
|
146
146
|
|
147
147
|
# --------------------------------------
|
148
148
|
# Aside Settings
|
@@ -510,8 +510,7 @@ music:
|
|
510
510
|
# 音乐胶囊
|
511
511
|
# capsule music
|
512
512
|
capsule:
|
513
|
-
enable:
|
514
|
-
false
|
513
|
+
enable: false
|
515
514
|
# 歌单id / playlist id
|
516
515
|
id: 8407304077
|
517
516
|
# 播放列表的服务商。netease:网易云 / tencent:腾讯 / kugou:酷狗 / xiami:小米 / baidu:百度
|
@@ -577,7 +576,7 @@ keyboard:
|
|
577
576
|
copy:
|
578
577
|
enable: true
|
579
578
|
copyright: # Turn on Link copyright information after copying.(开启后将在默认增加版权信息)
|
580
|
-
enable:
|
579
|
+
enable: true
|
581
580
|
limit: 50 # word count. (字数)
|
582
581
|
|
583
582
|
# 懒加载
|
@@ -627,7 +626,7 @@ fancybox: false
|
|
627
626
|
# mediumZoom
|
628
627
|
mediumZoom: false
|
629
628
|
|
630
|
-
# mermaid
|
629
|
+
# mermaid tags plugin
|
631
630
|
# https://mermaid.js.org/
|
632
631
|
mermaid: false
|
633
632
|
|
@@ -808,6 +807,35 @@ google_adsense:
|
|
808
807
|
# Only when auto ads are turned off, you need to fill in the slot id, which can be obtained after creating an ad space in the Google Adsense background according to the ad unit
|
809
808
|
slot: # 4236388782
|
810
809
|
|
810
|
+
# 自定义右键菜单 (Custom Right Menu)
|
811
|
+
right_menu:
|
812
|
+
enable: false
|
813
|
+
commentBarrage: false # 是否显示热评开关 / Whether to display the hot comment switch.
|
814
|
+
translate: # 翻译功能(仅支持简繁)/ Translation function (Simplified and Traditional Chinese only)
|
815
|
+
enable: false
|
816
|
+
defaultEncoding: 2 # 1: 默认繁体 2: 默认简体
|
817
|
+
translateDelay: 0 # 翻译迟疑时间
|
818
|
+
# 自定义菜单项列表 / Customize the list of menu items.
|
819
|
+
custom_list:
|
820
|
+
# - name: 随机短文
|
821
|
+
# url:
|
822
|
+
# click: toRandomPost()
|
823
|
+
# id: menu-randomPost
|
824
|
+
# class:
|
825
|
+
# icon: st-signal-tower-fill
|
826
|
+
# - name: 全部分类
|
827
|
+
# url: /categories/
|
828
|
+
# click:
|
829
|
+
# id:
|
830
|
+
# class:
|
831
|
+
# icon: st-checkbox-multiple-blank-fill
|
832
|
+
# - name: 全部标签
|
833
|
+
# url: /tags/
|
834
|
+
# click:
|
835
|
+
# id:
|
836
|
+
# class:
|
837
|
+
# icon: st-price-tag-fill
|
838
|
+
|
811
839
|
# CDN
|
812
840
|
# Don't modify the following settings unless you know how they work
|
813
841
|
# 非必要请不要修改
|
@@ -844,7 +872,6 @@ CDN:
|
|
844
872
|
# aplayer_js:
|
845
873
|
# meting_js:
|
846
874
|
# pace_js:
|
847
|
-
# lunr_js:
|
848
875
|
# swiper_css:
|
849
876
|
# swiper_js:
|
850
877
|
# busuanzi_js:
|
package/languages/en.yml
CHANGED
@@ -2,6 +2,7 @@ more: More
|
|
2
2
|
star: Behold, those who found delight in this piece also perused
|
3
3
|
random: Around
|
4
4
|
upload: 'datetime: '
|
5
|
+
totalk: You don't need to delete blank lines, just type in your comments.
|
5
6
|
|
6
7
|
theme:
|
7
8
|
dark: dark
|
@@ -142,4 +143,28 @@ comment:
|
|
142
143
|
commentBarrage:
|
143
144
|
title: Hot
|
144
145
|
|
145
|
-
f12: Developer mode is turned on, please follow the GPL.
|
146
|
+
f12: Developer mode is turned on, please follow the GPL.
|
147
|
+
|
148
|
+
right_menu:
|
149
|
+
copy: Copy
|
150
|
+
paste: Paste
|
151
|
+
comment: ToTalk
|
152
|
+
new: Open
|
153
|
+
link: Copy
|
154
|
+
img: Copy
|
155
|
+
downloadImg: Download
|
156
|
+
search: Search
|
157
|
+
dark: Light
|
158
|
+
light: Dark
|
159
|
+
chs_to_cht: 轉為繁體
|
160
|
+
cht_to_chs: 转为简体
|
161
|
+
img_error: This image cannot be copied or downloaded.
|
162
|
+
barrage:
|
163
|
+
open: OpenBarrage
|
164
|
+
close: CloseBarrage
|
165
|
+
music:
|
166
|
+
start: Play
|
167
|
+
stop: Pause
|
168
|
+
back: Back
|
169
|
+
forward: Forward
|
170
|
+
copyMusicName: CopyName
|
package/languages/zh-CN.yml
CHANGED
@@ -2,6 +2,7 @@ more: 更多
|
|
2
2
|
star: 喜欢这篇的人也看了
|
3
3
|
random: 随便逛逛
|
4
4
|
upload: 发布时间:
|
5
|
+
totalk: 无需删除空行,直接输入评论即可
|
5
6
|
|
6
7
|
# Language: 简体中文
|
7
8
|
theme:
|
@@ -144,4 +145,28 @@ comment:
|
|
144
145
|
commentBarrage:
|
145
146
|
title: 热评
|
146
147
|
|
147
|
-
f12: 开发者模式已打开,请遵循GPL协议。
|
148
|
+
f12: 开发者模式已打开,请遵循GPL协议。
|
149
|
+
|
150
|
+
right_menu:
|
151
|
+
copy: 复制选中文本
|
152
|
+
paste: 粘贴文本
|
153
|
+
comment: 引用到评论
|
154
|
+
new: 新窗口打开
|
155
|
+
link: 复制链接地址
|
156
|
+
img: 复制此图片
|
157
|
+
downloadImg: 下载此图片
|
158
|
+
search: 站内搜索
|
159
|
+
dark: 浅色模式
|
160
|
+
light: 深色模式
|
161
|
+
chs_to_cht: 轉為繁體
|
162
|
+
cht_to_chs: 转为简体
|
163
|
+
img_error: 此图片无法复制与下载
|
164
|
+
barrage:
|
165
|
+
open: 显示热评
|
166
|
+
close: 关闭热评
|
167
|
+
music:
|
168
|
+
start: 播放音乐
|
169
|
+
stop: 暂停音乐
|
170
|
+
back: 切换到上一首
|
171
|
+
forward: 切换到下一首
|
172
|
+
copyMusicName: 复制歌名
|
package/languages/zh-TW.yml
CHANGED
@@ -2,6 +2,7 @@ more: 更多
|
|
2
2
|
star: 喜歡這篇的人也看了
|
3
3
|
random: 随便逛逛
|
4
4
|
upload: 發佈時間:
|
5
|
+
totalk: 無需刪除空行,直接輸入評論即可
|
5
6
|
|
6
7
|
# Language: 繁體中文 (台灣)
|
7
8
|
theme:
|
@@ -144,4 +145,28 @@ comment:
|
|
144
145
|
commentBarrage:
|
145
146
|
title: 熱評
|
146
147
|
|
147
|
-
f12: 開發者模式已打開,請遵循GPL協定。
|
148
|
+
f12: 開發者模式已打開,請遵循GPL協定。
|
149
|
+
|
150
|
+
right_menu:
|
151
|
+
copy: 複製選中文本
|
152
|
+
paste: 粘貼文本
|
153
|
+
comment: 引用到評論
|
154
|
+
new: 新窗口打開
|
155
|
+
link: 複製連結位址
|
156
|
+
img: 複製此圖片
|
157
|
+
downloadImg: 下載此圖片
|
158
|
+
search: 站內搜索
|
159
|
+
dark: 淺色模式
|
160
|
+
light: 深色模式
|
161
|
+
chs_to_cht: 轉為繁體
|
162
|
+
cht_to_chs: 转为简体
|
163
|
+
img_error: 此圖片無法複製與下載
|
164
|
+
barrage:
|
165
|
+
open: 顯示熱評
|
166
|
+
close: 關閉熱評
|
167
|
+
music:
|
168
|
+
start: 播放音樂
|
169
|
+
stop: 暫停音樂
|
170
|
+
back: 切換到上一首
|
171
|
+
forward: 切換到下一首
|
172
|
+
copyMusicName: 複製歌名
|
@@ -105,6 +105,7 @@
|
|
105
105
|
month: _p('time.month')
|
106
106
|
},
|
107
107
|
f12: _p('f12'),
|
108
|
+
totalk: _p('totalk')
|
108
109
|
}
|
109
110
|
|
110
111
|
if (theme.search.enable) {
|
@@ -122,6 +123,35 @@
|
|
122
123
|
}
|
123
124
|
}
|
124
125
|
|
126
|
+
let rightMenu = false
|
127
|
+
if (theme.right_menu.enable) {
|
128
|
+
rightMenu = {
|
129
|
+
mode: {
|
130
|
+
dark: _p('right_menu.light'),
|
131
|
+
light: _p('right_menu.dark'),
|
132
|
+
},
|
133
|
+
img_error: _p('right_menu.img_error')
|
134
|
+
}
|
135
|
+
if (theme.capsule.enable) {
|
136
|
+
rightMenu.music = {
|
137
|
+
start: _p('right_menu.music.start'),
|
138
|
+
stop: _p('right_menu.music.stop'),
|
139
|
+
}
|
140
|
+
}
|
141
|
+
if(theme.comment.enable && theme.comment.commentBarrage){
|
142
|
+
rightMenu.barrage = {
|
143
|
+
open: _p('right_menu.barrage.open'),
|
144
|
+
close: _p('right_menu.barrage.close')
|
145
|
+
}
|
146
|
+
}
|
147
|
+
if(theme.right_menu.translate.enable){
|
148
|
+
rightMenu.translate = {
|
149
|
+
translateDelay: theme.right_menu.translate.translateDelay,
|
150
|
+
defaultEncoding: theme.right_menu.translate.defaultEncoding
|
151
|
+
}
|
152
|
+
}
|
153
|
+
}
|
154
|
+
|
125
155
|
script.
|
126
156
|
const GLOBAL_CONFIG = {
|
127
157
|
root: '!{config.root}',
|
@@ -157,5 +187,6 @@ script.
|
|
157
187
|
},
|
158
188
|
comment: !{comment},
|
159
189
|
lightbox: '!{ theme.mediumZoom ? "mediumZoom" : (theme.fancybox ? "fancybox" : "null")}',
|
160
|
-
post_ai: !{post_ai}
|
190
|
+
post_ai: !{post_ai},
|
191
|
+
right_menu: !{rightMenu ? JSON.stringify(rightMenu) : false},
|
161
192
|
};
|
@@ -26,8 +26,8 @@ div
|
|
26
26
|
script.
|
27
27
|
dark()
|
28
28
|
|
29
|
-
if theme.translate.enable
|
30
|
-
script(src=url_for(theme.cdn.
|
29
|
+
if theme.right_menu.translate.enable
|
30
|
+
script(src=url_for(theme.cdn.translate_js))
|
31
31
|
|
32
32
|
if theme.katex && theme.katex.enable
|
33
33
|
if theme.katex.per_page && (is_post() || is_page())
|
@@ -44,7 +44,7 @@ div
|
|
44
44
|
script(src=url_for(theme.cdn.medium_zoom))
|
45
45
|
if theme.fancybox
|
46
46
|
script(src=url_for(theme.cdn.fancyapps_ui))
|
47
|
-
if theme.says.home_mini
|
47
|
+
if (theme.says.home_mini && theme.says.enable) || theme.carousel
|
48
48
|
script(src=url_for(theme.cdn.swiper_js))
|
49
49
|
|
50
50
|
if theme.post_ai.enable
|
@@ -90,13 +90,12 @@ div
|
|
90
90
|
if theme.loading.pace
|
91
91
|
script(src=url_for(theme.cdn.pace_js))
|
92
92
|
|
93
|
-
if theme.search.enable
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
script(src=url_for(theme.cdn.lunr_js))
|
93
|
+
if theme.search.enable && theme.search.type === "algolia"
|
94
|
+
script(src=url_for(theme.cdn.instantsearch))
|
95
|
+
script(src=url_for(theme.cdn.algolia_search))
|
96
|
+
|
97
|
+
if theme.right_menu.enable
|
98
|
+
script(src=url_for(theme.cdn.right_menu_js))
|
100
99
|
|
101
100
|
if theme.extends.body
|
102
101
|
each item in theme.extends.body
|
@@ -106,20 +105,11 @@ div#js-pjax
|
|
106
105
|
if theme.mermaid
|
107
106
|
script.
|
108
107
|
mermaid.run();
|
109
|
-
if is_home() && theme.
|
110
|
-
script.
|
111
|
-
sco.initbbtalk();
|
112
|
-
if is_home() && theme.banner && site.posts.data.filter(item => item.recommend === true).slice(0,6) || false
|
108
|
+
if is_home() && theme.carousel && site.posts.data.filter(item => item.recommend === true).slice(0, 6) || false
|
113
109
|
script.
|
114
|
-
|
110
|
+
carousel_swiper()
|
115
111
|
if page.type === 'says' && theme.says.enable
|
116
112
|
script.
|
117
|
-
window.addEventListener('resize', utils.throttle(function () {
|
118
|
-
if (document.getElementById('waterfall')) {
|
119
|
-
sco.reflashEssayWaterFall();
|
120
|
-
}
|
121
|
-
}), 500);
|
122
|
-
sco.reflashEssayWaterFall();
|
123
113
|
GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".bber-content-img img"));
|
124
114
|
sco.changeTimeFormat(document.querySelectorAll('.bber-info-time time'))
|
125
115
|
if theme.busuanzi && (theme.aside.siteinfo.uv || theme.aside.siteinfo.pv)
|
@@ -128,7 +118,7 @@ div#js-pjax
|
|
128
118
|
script#config-diff.
|
129
119
|
var PAGE_CONFIG = {
|
130
120
|
is_post: !{is_post()},
|
131
|
-
is_page: !{
|
121
|
+
is_page: !{!is_post() && !is_home()},
|
132
122
|
is_home: !{is_home()},
|
133
123
|
page: '!{page.type}',
|
134
124
|
toc: !{!!page.toc},
|
@@ -8,7 +8,7 @@ if theme.capsule.enable || theme.music.enable
|
|
8
8
|
link(rel="stylesheet", href=url_for(theme.cdn.aplayer_css))
|
9
9
|
|
10
10
|
// swiper
|
11
|
-
if theme.says.home_mini
|
11
|
+
if (theme.says.home_mini && theme.says.enable) || theme.carousel
|
12
12
|
link(rel="stylesheet", href=url_for(theme.cdn.swiper_css))
|
13
13
|
|
14
14
|
if theme.lightbox && theme.fancybox
|
@@ -111,7 +111,7 @@ script.
|
|
111
111
|
)(window)
|
112
112
|
|
113
113
|
console.log(
|
114
|
-
"%c Program: Hexo %c Theme: Solitude %c Version: v1.7.
|
114
|
+
"%c Program: Hexo %c Theme: Solitude %c Version: v1.7.9",
|
115
115
|
"border-radius:5px 0 0 5px;padding: 5px 10px;color:white;background:#ff3842;",
|
116
116
|
"padding: 5px 10px;color:white;background:#3e9f50;",
|
117
117
|
"border-radius:0 5px 5px 0;padding: 5px 10px;background:#0084ff;color:white;"
|
@@ -0,0 +1,80 @@
|
|
1
|
+
- let custom_list = theme.right_menu.custom_list || []
|
2
|
+
|
3
|
+
div#rightMenu
|
4
|
+
div.rightMenu-group.rightMenu-small
|
5
|
+
div.rightMenu-item#menu-backward
|
6
|
+
i.solitude.st-arrow-left-line
|
7
|
+
div.rightMenu-item#menu-forward
|
8
|
+
i.solitude.st-arrow-right-line
|
9
|
+
div.rightMenu-item#menu-refresh
|
10
|
+
i.solitude.st-restart-line
|
11
|
+
div.rightMenu-item#menu-top
|
12
|
+
i.solitude.st-arrow-up-line
|
13
|
+
div.rightMenu-group.rightMenu-line.rightMenuPlugin
|
14
|
+
div.rightMenu-item#menu-copytext
|
15
|
+
i.solitude.st-copy-fill
|
16
|
+
span= _p('right_menu.copy')
|
17
|
+
div.rightMenu-item#menu-pastetext
|
18
|
+
i.solitude.st-clipboard-fill
|
19
|
+
span= _p('right_menu.paste')
|
20
|
+
if theme.comment.enable
|
21
|
+
div.rightMenu-item#menu-commenttext
|
22
|
+
i.solitude.st-chat-new-fill
|
23
|
+
span= _p('right_menu.comment')
|
24
|
+
div.rightMenu-item#menu-newwindow
|
25
|
+
i.solitude.st-window-fill
|
26
|
+
span= _p('right_menu.new')
|
27
|
+
div.rightMenu-item#menu-copylink
|
28
|
+
i.solitude.st-link-line
|
29
|
+
span= _p('right_menu.link')
|
30
|
+
div.rightMenu-item#menu-copyimg
|
31
|
+
i.solitude.st-copy-fill
|
32
|
+
span= _p('right_menu.img')
|
33
|
+
div.rightMenu-item#menu-downloadimg
|
34
|
+
i.solitude.st-download-cloud-fill
|
35
|
+
span= _p('right_menu.downloadImg')
|
36
|
+
if theme.search.enable
|
37
|
+
div.rightMenu-item#menu-search
|
38
|
+
i.solitude.st-search-line
|
39
|
+
span= _p('right_menu.search')
|
40
|
+
if theme.capsule.enable
|
41
|
+
div.rightMenu-item#menu-music-toggle
|
42
|
+
i.solitude.st-play-fill
|
43
|
+
span= _p('right_menu.music.start')
|
44
|
+
div.rightMenu-item#menu-music-back
|
45
|
+
i.solitude.st-skip-back-fill
|
46
|
+
span= _p('right_menu.music.back')
|
47
|
+
div.rightMenu-item#menu-music-forward
|
48
|
+
i.solitude.st-skip-forward-fill
|
49
|
+
span= _p('right_menu.music.forward')
|
50
|
+
div.rightMenu-item#menu-music-copyMusicName
|
51
|
+
i.solitude.st-copy-fill
|
52
|
+
span= _p('right_menu.music.copyMusicName')
|
53
|
+
div.rightMenu-group.rightMenu-line.rightMenuOther
|
54
|
+
each item,index in custom_list
|
55
|
+
a.rightMenu-item(id=item.id class=item.class href=item.href onclick=item.click)
|
56
|
+
i.solitude(class=item.icon)
|
57
|
+
span= item.name
|
58
|
+
div.rightMenu-group.rightMenu-line.rightMenuOther
|
59
|
+
if theme.right_menu.commentBarrage && theme.comment.enable && theme.comment.commentBarrage
|
60
|
+
div.rightMenu-item#menu-commentBarrage(onclick="sco.switchCommentBarrage()")
|
61
|
+
i.solitude.st-chat-fill
|
62
|
+
span.menu-commentBarrage-text= _p('right_menu.barrage.open')
|
63
|
+
div.rightMenu-item#menu-darkmode(onclick="sco.switchDarkMode()")
|
64
|
+
i.solitude.st-moon-clear-fill
|
65
|
+
case theme.display_mode.type
|
66
|
+
when 'auto'
|
67
|
+
when 'light'
|
68
|
+
span.menu-darkmode-text= _p('right_menu.light')
|
69
|
+
when 'dark'
|
70
|
+
span.menu-darkmode-text= _p('right_menu.dark')
|
71
|
+
if theme.right_menu.translate.enable
|
72
|
+
div.rightMenu-item#menu-translate
|
73
|
+
case theme.right_menu.translate.defaultEncoding
|
74
|
+
when 2
|
75
|
+
i.solitude.st-panben-line
|
76
|
+
span= _p('right_menu.chs_to_cht')
|
77
|
+
when 1
|
78
|
+
i.solitude.st-jianben-line
|
79
|
+
span= _p('right_menu.cht_to_chs')
|
80
|
+
div#rightmenu-mask
|
package/layout/index.pug
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
extends includes/layout
|
2
2
|
|
3
3
|
block content
|
4
|
-
if theme.hometop.enable || theme.says.home_mini
|
4
|
+
if theme.hometop.enable || (theme.says.home_mini && theme.says.enable)
|
5
5
|
#home_top
|
6
|
-
if theme.says.home_mini
|
6
|
+
if theme.says.home_mini && theme.says.enable
|
7
7
|
include ./includes/widgets/home/bbTimeList
|
8
8
|
if theme.hometop.enable && is_home_first_page()
|
9
9
|
include ./includes/widgets/home/hometop
|
package/package.json
CHANGED
package/plugins.yml
CHANGED
package/scripts/event/cdn.js
CHANGED
@@ -49,7 +49,12 @@ hexo.extend.filter.register('before_generate', () => {
|
|
49
49
|
file: 'js/music.js',
|
50
50
|
version
|
51
51
|
},
|
52
|
-
|
52
|
+
right_menu_js: {
|
53
|
+
name: 'hexo-theme-solitude',
|
54
|
+
file: 'js/right_menu.js',
|
55
|
+
version
|
56
|
+
},
|
57
|
+
translate_js:{
|
53
58
|
name: 'hexo-theme-solitude',
|
54
59
|
file: 'js/tw_cn.js',
|
55
60
|
version
|