hexo-theme-solitude 1.7.2 → 1.7.3
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 +10 -10
- package/languages/en.yml +1 -5
- package/languages/zh-CN.yml +1 -4
- package/languages/zh-TW.yml +1 -4
- package/layout/includes/head/config.pug +40 -34
- package/layout/includes/inject/head.pug +1 -1
- package/layout/includes/page/says.pug +2 -2
- package/layout/post.pug +2 -1
- package/package.json +3 -3
- package/scripts/event/merge_config.js +1 -1
- package/scripts/event/welcome.js +7 -9
- package/source/css/_page/_about/about.styl +1 -1
- package/source/css/_page/other.styl +1 -1
- package/source/img/404.webp +0 -0
- package/source/img/pwa/favicon_512.ico +0 -0
- package/source/js/search/local.js +3 -4
package/_config.yml
CHANGED
@@ -29,7 +29,7 @@ site:
|
|
29
29
|
siteIcon: /img/pwa/favicon.ico
|
30
30
|
# 页脚的Logo、加载动画默认的logo
|
31
31
|
# Logo in the footer, default logo for loading animation
|
32
|
-
icon: /img/
|
32
|
+
icon: /img/pwa/favicon.ico
|
33
33
|
|
34
34
|
# 导航栏
|
35
35
|
# NavBar
|
@@ -38,7 +38,7 @@ nav:
|
|
38
38
|
# logo group
|
39
39
|
group:
|
40
40
|
# 项目: # 分类名称
|
41
|
-
# Solitude: https://github.com/valor-x/hexo-theme-solitude || /img/
|
41
|
+
# Solitude: https://github.com/valor-x/hexo-theme-solitude || /img/pwa/favicon.ico # 子菜单名称(submenu name): 链接地址(address) || 图标(icon)
|
42
42
|
|
43
43
|
# 中心菜单
|
44
44
|
# center menu
|
@@ -172,7 +172,7 @@ aside:
|
|
172
172
|
author:
|
173
173
|
# 头像
|
174
174
|
# Avatar
|
175
|
-
img: /img/
|
175
|
+
img: /img/avatar.png
|
176
176
|
# 表情图片链接
|
177
177
|
# Emoticon image link
|
178
178
|
# tip: 26x26 size
|
@@ -452,7 +452,7 @@ footer:
|
|
452
452
|
errorpage:
|
453
453
|
# 图片
|
454
454
|
# image
|
455
|
-
img:
|
455
|
+
img: /img/404.webp
|
456
456
|
# 文字
|
457
457
|
# text
|
458
458
|
text: =awa= 页面走丢了
|
@@ -523,7 +523,7 @@ moments:
|
|
523
523
|
# example: https://example.com/
|
524
524
|
api: # https://example.com/
|
525
525
|
# 加载失败显示图片 / Loading failed display image
|
526
|
-
error_img: /img/
|
526
|
+
error_img: /img/pwa/favicon_64.ico
|
527
527
|
# 排序规则:created:按创建时间排序 / updated:按更新时间排序
|
528
528
|
# Sort rule: created: Sort by creation time / updated: Sort by update time
|
529
529
|
sort_rule: created
|
@@ -779,11 +779,11 @@ pwa:
|
|
779
779
|
enable: false
|
780
780
|
manifest: /manifest.json # manifest.json 文件路径
|
781
781
|
theme_color: "#006a73" # 主题颜色
|
782
|
-
mask_icon: /img/
|
783
|
-
apple_touch_icon: /img/
|
784
|
-
bookmark_icon: /img/
|
785
|
-
favicon_32_32: /img/
|
786
|
-
favicon_16_16: /img/
|
782
|
+
mask_icon: /img/pwa/favicon.ico # 遮罩图标
|
783
|
+
apple_touch_icon: /img/pwa/favicon.ico # 苹果触摸图标
|
784
|
+
bookmark_icon: /img/pwa/favicon.ico # 书签图标
|
785
|
+
favicon_32_32: /img/pwa/favicon_32.ico # 32x32图标
|
786
|
+
favicon_16_16: /img/pwa/favicon_16.ico # 16x16图标
|
787
787
|
|
788
788
|
# 谷歌广告 (Google Adsense)
|
789
789
|
google_adsense:
|
package/languages/en.yml
CHANGED
@@ -26,10 +26,6 @@ lately:
|
|
26
26
|
ago: ' ago'
|
27
27
|
error: ' NaN'
|
28
28
|
|
29
|
-
chs:
|
30
|
-
chs_tw: Traditional Chinese
|
31
|
-
chs_cn: Simplified Chinese
|
32
|
-
|
33
29
|
page:
|
34
30
|
tag: Tags
|
35
31
|
category: Categories
|
@@ -74,11 +70,11 @@ award:
|
|
74
70
|
tipping: Tipping
|
75
71
|
title: List of appreciation
|
76
72
|
|
77
|
-
|
78
73
|
search:
|
79
74
|
empty: No results found
|
80
75
|
hit: Found ${query} results for you
|
81
76
|
placeholder: Enter keywords to quickly search
|
77
|
+
count: Total <b>${count}</b> results.
|
82
78
|
|
83
79
|
head:
|
84
80
|
noscript: Please enable JavaScript to view the site
|
package/languages/zh-CN.yml
CHANGED
@@ -27,10 +27,6 @@ lately:
|
|
27
27
|
ago: 前
|
28
28
|
error: NaN
|
29
29
|
|
30
|
-
chs:
|
31
|
-
chs_tw: 繁體中文
|
32
|
-
chs_cn: 简体中文
|
33
|
-
|
34
30
|
page:
|
35
31
|
tag: 标签
|
36
32
|
category: 分类
|
@@ -80,6 +76,7 @@ search:
|
|
80
76
|
empty: 找不到你查询的内容:${query}
|
81
77
|
hit: 找到 ${hits} 条结果,用时 ${time} 毫秒
|
82
78
|
placeholder: 输入关键词快速查找
|
79
|
+
count: 共 <b>${count}</b> 条结果。
|
83
80
|
|
84
81
|
head:
|
85
82
|
noscript: 开启JavaScript才能访问本站哦~
|
package/languages/zh-TW.yml
CHANGED
@@ -27,10 +27,6 @@ lately:
|
|
27
27
|
ago: 前
|
28
28
|
error: NaN
|
29
29
|
|
30
|
-
chs:
|
31
|
-
chs_tw: 繁體中文
|
32
|
-
chs_cn: 簡體中文
|
33
|
-
|
34
30
|
page:
|
35
31
|
tag: 標籤
|
36
32
|
category: 分類
|
@@ -80,6 +76,7 @@ search:
|
|
80
76
|
empty: 找不到你查詢的內容:${query}
|
81
77
|
hit: 找到 ${hits} 條結果,用時 ${time} 毫秒
|
82
78
|
placeholder: 輸入關鍵詞快速查找
|
79
|
+
count: 共 <b>${count}<b> 條結果。
|
83
80
|
|
84
81
|
head:
|
85
82
|
noscript: 開啟JavaScript才能訪問本站哦~
|
@@ -86,6 +86,45 @@
|
|
86
86
|
})
|
87
87
|
}
|
88
88
|
|
89
|
+
let lang = false
|
90
|
+
lang = {
|
91
|
+
theme: {
|
92
|
+
dark: _p('theme.dark'),
|
93
|
+
light: _p('theme.light'),
|
94
|
+
},
|
95
|
+
copy: {
|
96
|
+
success: _p('copy.success'),
|
97
|
+
error: _p('copy.error'),
|
98
|
+
},
|
99
|
+
backtop: _p('nav.backtop'),
|
100
|
+
lately: {
|
101
|
+
second: _p('lately.second'),
|
102
|
+
minute: _p('lately.minute'),
|
103
|
+
hour: _p('lately.hour'),
|
104
|
+
day: _p('lately.day'),
|
105
|
+
month: _p('lately.month'),
|
106
|
+
year: _p('lately.year'),
|
107
|
+
ago: _p('lately.ago'),
|
108
|
+
error: _p('lately.error'),
|
109
|
+
},
|
110
|
+
f12: _p('f12'),
|
111
|
+
}
|
112
|
+
|
113
|
+
if (theme.search.enable) {
|
114
|
+
lang.search = {
|
115
|
+
empty: _p('search.empty'),
|
116
|
+
hit: _p('search.hit'),
|
117
|
+
placeholder: _p('search.placeholder'),
|
118
|
+
count: _p('search.count')
|
119
|
+
}
|
120
|
+
}
|
121
|
+
|
122
|
+
if (theme.comment.enable && theme.comment.commentBarrage) {
|
123
|
+
lang.barrage = {
|
124
|
+
title: _p('commentBarrage.title'),
|
125
|
+
}
|
126
|
+
}
|
127
|
+
|
89
128
|
script.
|
90
129
|
const GLOBAL_CONFIG = {
|
91
130
|
root: '!{config.root}',
|
@@ -105,40 +144,7 @@ script.
|
|
105
144
|
syntax: '!{config.syntax_highlighter}'
|
106
145
|
},
|
107
146
|
randomlink: !{theme.footer.randomlink},
|
108
|
-
lang: {
|
109
|
-
theme: {
|
110
|
-
dark: '!{_p('theme.dark')}',
|
111
|
-
light: '!{_p('theme.light')}',
|
112
|
-
},
|
113
|
-
copy: {
|
114
|
-
success: '!{_p('copy.success')}',
|
115
|
-
error: '!{_p('copy.error')}',
|
116
|
-
},
|
117
|
-
backtop: '!{_p('nav.backtop')}',
|
118
|
-
lately: {
|
119
|
-
second: '!{_p('lately.second')}',
|
120
|
-
minute: '!{_p('lately.minute')}',
|
121
|
-
hour: '!{_p('lately.hour')}',
|
122
|
-
day: '!{_p('lately.day')}',
|
123
|
-
month: '!{_p('lately.month')}',
|
124
|
-
year: '!{_p('lately.year')}',
|
125
|
-
ago: '!{_p('lately.ago')}',
|
126
|
-
error: '!{_p('lately.error')}',
|
127
|
-
},
|
128
|
-
search: {
|
129
|
-
empty: '!{_p('search.empty')}',
|
130
|
-
hit: '!{_p('search.hit')}',
|
131
|
-
placeholder: '!{_p('search.placeholder')}',
|
132
|
-
},
|
133
|
-
chs: {
|
134
|
-
chs_to_cht: '!{_p('chs.chs_tw')}',
|
135
|
-
cht_to_chs: '!{_p('chs.chs_cn')}',
|
136
|
-
},
|
137
|
-
barrage: {
|
138
|
-
title: '!{_p('commentBarrage.title')}',
|
139
|
-
},
|
140
|
-
f12: '!{_p('f12')}',
|
141
|
-
},
|
147
|
+
lang: !{JSON.stringify(lang)},
|
142
148
|
aside: {
|
143
149
|
sayhello: {
|
144
150
|
morning: '!{theme.aside.card.sayhello.morning}',
|
@@ -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.3",
|
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;"
|
@@ -20,7 +20,7 @@ if theme.says.enable
|
|
20
20
|
if item.image
|
21
21
|
.bber-content-img
|
22
22
|
each img in item.image
|
23
|
-
img(src=img
|
23
|
+
img(src=img alt="image")
|
24
24
|
|
25
25
|
if item.aplayer
|
26
26
|
.bber-music
|
@@ -41,7 +41,7 @@ if theme.says.enable
|
|
41
41
|
i.solitude.st-calendar-todo-fill
|
42
42
|
time.datetime(datetime=moment(item.date).format())
|
43
43
|
if item.link
|
44
|
-
a.bber-content-link(href=url_for(item.link)
|
44
|
+
a.bber-content-link(href=url_for(item.link) target="_blank")
|
45
45
|
i.solitude.st-link-m-line
|
46
46
|
| 链接
|
47
47
|
if item.content
|
package/layout/post.pug
CHANGED
@@ -17,7 +17,8 @@ block content
|
|
17
17
|
span.tagsPageCount #{data.length}
|
18
18
|
if site.posts.length > 1
|
19
19
|
include includes/widgets/post/postNav
|
20
|
-
|
20
|
+
if theme.related_post.enable
|
21
|
+
!= related_posts(page, site.posts)
|
21
22
|
if page.comment
|
22
23
|
include includes/widgets/third-party/comments/comment
|
23
24
|
include includes/widgets/aside/aside
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "hexo-theme-solitude",
|
3
|
-
"version": "1.7.
|
4
|
-
"description": "A beautiful, powerful, and efficient Hexo theme developed by the
|
3
|
+
"version": "1.7.3",
|
4
|
+
"description": "A beautiful, powerful, and efficient Hexo theme developed by the efu.",
|
5
5
|
"main": "package.json",
|
6
6
|
"scripts": {
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1"
|
@@ -26,7 +26,7 @@
|
|
26
26
|
"url": "https://github.com/valor-x/hexo-theme-solitude/issues",
|
27
27
|
"email": "o@efu.me"
|
28
28
|
},
|
29
|
-
"homepage": "https://
|
29
|
+
"homepage": "https://efu.me/",
|
30
30
|
"author": "Hexo-Theme-Solitude<o@efu.me>",
|
31
31
|
"license": "MIT"
|
32
32
|
}
|
@@ -3,7 +3,7 @@ hexo.extend.filter.register('before_generate', () => {
|
|
3
3
|
site: {
|
4
4
|
name: {
|
5
5
|
class: 'text', custom: 'Solitude'
|
6
|
-
}, siteIcon: '/img/
|
6
|
+
}, siteIcon: '/img/pwa/favicon.ico', icon: 'icon'
|
7
7
|
}, nav: {
|
8
8
|
group: null, menu: null, right: {
|
9
9
|
random: false, console: false, custom: [],
|
package/scripts/event/welcome.js
CHANGED
@@ -1,14 +1,12 @@
|
|
1
1
|
hexo.on('ready', () => {
|
2
2
|
const {version} = require('../../package.json')
|
3
3
|
hexo.log.info(`
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
===================================================================
|
12
|
-
GitHub: https://github.com/valor-x/hexo-theme-solitude
|
4
|
+
╭─────────────────────────────────────────────────────────────────────────────────────────────╮
|
5
|
+
│ │
|
6
|
+
│ Theme: Solitude │
|
7
|
+
│ Version: v${version} │
|
8
|
+
│ Changelog: https://github.com/valor-x/hexo-theme-solitude/releases/tag/v${version} │
|
9
|
+
│ │
|
10
|
+
╰─────────────────────────────────────────────────────────────────────────────────────────────╯
|
13
11
|
`)
|
14
12
|
})
|
Binary file
|
Binary file
|
@@ -42,7 +42,7 @@ window.onload = () => {
|
|
42
42
|
searchClickFn();
|
43
43
|
|
44
44
|
function initLunr() {
|
45
|
-
fetch(
|
45
|
+
fetch(GLOBAL_CONFIG.localsearch.path)
|
46
46
|
.then(response => response.text())
|
47
47
|
.then(data => {
|
48
48
|
let parser = new DOMParser();
|
@@ -128,14 +128,13 @@ window.onload = () => {
|
|
128
128
|
const $link = document.createElement("a");
|
129
129
|
$link.className = "search-result-title";
|
130
130
|
$link.href = result.link;
|
131
|
-
|
132
|
-
$link.innerHTML = title;
|
131
|
+
$link.innerHTML = highlightSearchKeyword(result.title, query);
|
133
132
|
$result.appendChild($link);
|
134
133
|
$search_results.appendChild($result);
|
135
134
|
});
|
136
135
|
const count = document.createElement("span");
|
137
136
|
count.className = "search-result-count";
|
138
|
-
count.innerHTML =
|
137
|
+
count.innerHTML = GLOBAL_CONFIG.lang.search.count.replace(/\$\{count}/, results.length)
|
139
138
|
$tips.appendChild(count);
|
140
139
|
}
|
141
140
|
|