hexo-theme-solitude 3.0.15 → 3.0.17
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 +10 -12
- package/README_en-US.md +10 -12
- package/README_zh-Hant.md +10 -12
- package/languages/en.yml +0 -0
- package/languages/zh-CN.yml +0 -0
- package/languages/zh-TW.yml +0 -0
- package/layout/includes/footer.pug +1 -1
- package/layout/includes/page/brevity.pug +4 -1
- package/layout/includes/widgets/post/postInfo.pug +1 -2
- package/layout/includes/widgets/sidebar/waline.pug +3 -3
- package/layout/includes/widgets/third-party/hot/index.pug +3 -1
- package/layout/includes/widgets/third-party/hot/waline.pug +47 -0
- package/package.json +6 -6
- package/plugins.yml +3 -3
- package/source/css/_global/index.styl +0 -8
- package/source/css/_layout/article-container.styl +5 -0
- package/source/css/_layout/console.styl +7 -2
- package/source/css/_page/category.styl +2 -1
- package/source/css/_page/other.styl +11 -0
- package/source/css/_page/recentcomment.styl +0 -1
- package/source/css/_page/tag.styl +6 -11
- package/source/css/_post/meta.styl +12 -10
- package/source/js/main.js +1 -6
package/README.md
CHANGED
@@ -6,21 +6,19 @@
|
|
6
6
|
|
7
7
|
一款优雅的 Hexo 主题,支持懒加载、PWA、Latex 以及多种评论系统。
|
8
8
|
|
9
|
-
主题设计由 [@张洪Heo](https://github.com/zhheo) 全权授权
|
9
|
+
主题设计由 [@张洪 Heo](https://github.com/zhheo) 全权授权
|
10
10
|
|
11
11
|

|
12
12
|

|
13
13
|
[](https://github.com/everfu/hexo-theme-solitude/stargazers)
|
14
|
-
[](https://www.npmjs.com/package/hexo-theme-solitude)
|
14
|
+
[](https://www.npmjs.com/package/hexo-theme-solitude)
|
16
15
|
|
17
16
|

|
18
17
|

|
19
18
|

|
20
19
|
|
21
20
|

|
22
|
-

|
21
|
+

|
24
22
|

|
25
23
|
|
26
24
|
</div>
|
@@ -41,17 +39,17 @@
|
|
41
39
|
|
42
40
|
1. 使用 NPM 包进行安装
|
43
41
|
|
44
|
-
|
45
|
-
|
46
|
-
|
42
|
+
```bash
|
43
|
+
npm i hexo-theme-solitude
|
44
|
+
```
|
47
45
|
|
48
46
|
2. 应用主题
|
49
47
|
|
50
|
-
|
51
|
-
|
52
|
-
|
48
|
+
```yaml
|
49
|
+
theme: solitude
|
50
|
+
```
|
53
51
|
|
54
|
-
前往 [文档](https://solitude.js.org/
|
52
|
+
前往 [文档](https://solitude.js.org/) 获取更多信息。
|
55
53
|
|
56
54
|
## 社区
|
57
55
|
|
package/README_en-US.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
English丨[简体中文](README.md)丨[繁体中文](README_zh-Hant.md)
|
1
|
+
English 丨[简体中文](README.md)丨[繁体中文](README_zh-Hant.md)
|
2
2
|
|
3
3
|
<div align="center">
|
4
4
|
|
@@ -11,16 +11,14 @@ Theme design fully authorized by [@Zhang Hong Heo](https://github.com/zhheo)
|
|
11
11
|

|
12
12
|

|
13
13
|
[](https://github.com/everfu/hexo-theme-solitude/stargazers)
|
14
|
-
[](https://www.npmjs.com/package/hexo-theme-solitude)
|
14
|
+
[](https://www.npmjs.com/package/hexo-theme-solitude)
|
16
15
|
|
17
16
|

|
18
17
|

|
19
18
|

|
20
19
|
|
21
20
|

|
22
|
-

|
21
|
+

|
24
22
|

|
25
23
|
|
26
24
|
</div>
|
@@ -41,17 +39,17 @@ Theme design fully authorized by [@Zhang Hong Heo](https://github.com/zhheo)
|
|
41
39
|
|
42
40
|
1. Install using the NPM package
|
43
41
|
|
44
|
-
|
45
|
-
|
46
|
-
|
42
|
+
```bash
|
43
|
+
npm i hexo-theme-solitude
|
44
|
+
```
|
47
45
|
|
48
46
|
2. Apply the theme
|
49
47
|
|
50
|
-
|
51
|
-
|
52
|
-
|
48
|
+
```yaml
|
49
|
+
theme: solitude
|
50
|
+
```
|
53
51
|
|
54
|
-
Visit [Documentation](https://solitude.js.org/
|
52
|
+
Visit [Documentation](https://solitude.js.org/) for more information.
|
55
53
|
|
56
54
|
## Community
|
57
55
|
|
package/README_zh-Hant.md
CHANGED
@@ -6,21 +6,19 @@
|
|
6
6
|
|
7
7
|
一款優雅的 Hexo 主題,支持懶加載、PWA、Latex 以及多種評論系統。
|
8
8
|
|
9
|
-
主題設計由 [@張洪Heo](https://github.com/zhheo) 全權授權
|
9
|
+
主題設計由 [@張洪 Heo](https://github.com/zhheo) 全權授權
|
10
10
|
|
11
11
|

|
12
12
|

|
13
13
|
[](https://github.com/everfu/hexo-theme-solitude/stargazers)
|
14
|
-
[](https://www.npmjs.com/package/hexo-theme-solitude)
|
14
|
+
[](https://www.npmjs.com/package/hexo-theme-solitude)
|
16
15
|
|
17
16
|

|
18
17
|

|
19
18
|

|
20
19
|
|
21
20
|

|
22
|
-

|
21
|
+

|
24
22
|

|
25
23
|
|
26
24
|
</div>
|
@@ -41,17 +39,17 @@
|
|
41
39
|
|
42
40
|
1. 使用 NPM 包進行安裝
|
43
41
|
|
44
|
-
|
45
|
-
|
46
|
-
|
42
|
+
```bash
|
43
|
+
npm i hexo-theme-solitude
|
44
|
+
```
|
47
45
|
|
48
46
|
2. 應用主題
|
49
47
|
|
50
|
-
|
51
|
-
|
52
|
-
|
48
|
+
```yaml
|
49
|
+
theme: solitude
|
50
|
+
```
|
53
51
|
|
54
|
-
前往 [文檔](https://solitude.js.org/
|
52
|
+
前往 [文檔](https://solitude.js.org/) 獲取更多信息。
|
55
53
|
|
56
54
|
## 社區
|
57
55
|
|
package/languages/en.yml
CHANGED
File without changes
|
package/languages/zh-CN.yml
CHANGED
File without changes
|
package/languages/zh-TW.yml
CHANGED
File without changes
|
@@ -66,7 +66,7 @@ div#footer-bar
|
|
66
66
|
a.footer-bar-link(href=url_for(item.url), title=item.name)
|
67
67
|
if item.icon
|
68
68
|
img.beian-icon(src=url_for(item.icon), alt=item.name)
|
69
|
-
|
69
|
+
span.beian-name= item.name
|
70
70
|
a.footer-bar-link(href=_p('hexo'))
|
71
71
|
= _p('framework_by') + 'Hexo'
|
72
72
|
a.footer-bar-link(href=_p('repo'))
|
@@ -20,7 +20,10 @@ if theme.brevity.enable
|
|
20
20
|
if item.image
|
21
21
|
.bber-content-img
|
22
22
|
each img in item.image
|
23
|
-
img
|
23
|
+
if typeof img === 'string'
|
24
|
+
img(src=img, alt=item.content || "图片暂无描述")
|
25
|
+
else
|
26
|
+
img(src=img.url, alt=(img.alt || item.content || "图片暂无描述"))
|
24
27
|
|
25
28
|
if item.aplayer
|
26
29
|
.bber-music
|
@@ -3,8 +3,8 @@
|
|
3
3
|
|
4
4
|
script(pjax).
|
5
5
|
(async () => {
|
6
|
-
await fetch('!{theme.waline.envId}/api/comment?type=
|
6
|
+
await fetch('!{theme.waline.envId}/api/comment?type=count', {method: 'GET'}).then(async res => res.json())
|
7
7
|
.then(async data => {
|
8
|
-
document.querySelector('#waline_allcount').innerHTML = data.
|
8
|
+
document.querySelector('#waline_allcount').innerHTML = data.data
|
9
9
|
})
|
10
|
-
})()
|
10
|
+
})()
|
@@ -0,0 +1,47 @@
|
|
1
|
+
script.
|
2
|
+
function updatePostsBasedOnComments() {
|
3
|
+
const location = window.location.origin;
|
4
|
+
const posts = Array.from(document.querySelectorAll('.recent-post-item[onclick] .post_cover a'))
|
5
|
+
.map(item => item.href.replace(location, ''));
|
6
|
+
const fetchCommentsCount = () => {
|
7
|
+
const requests = posts.map(url => {
|
8
|
+
return fetch(`#{theme.waline.envId}/api/comment?type=count&url=${encodeURIComponent(url)}`)
|
9
|
+
.then(response => response.json())
|
10
|
+
.then(data => ({
|
11
|
+
url: url,
|
12
|
+
count: data.errno === 0 ? data.data[0] : 0
|
13
|
+
}));
|
14
|
+
});
|
15
|
+
Promise.all(requests)
|
16
|
+
.then(handleCommentsResponse)
|
17
|
+
.catch(error => console.error("Error fetching comments:", error));
|
18
|
+
};
|
19
|
+
const handleCommentsResponse = (response) => {
|
20
|
+
response.forEach(({ url, count }) => {
|
21
|
+
if (count > #{count}) {
|
22
|
+
const postElement = document.querySelector(`.recent-post-item[onclick*="${url}"]`);
|
23
|
+
if (postElement) updatePostElement(postElement);
|
24
|
+
}
|
25
|
+
});
|
26
|
+
};
|
27
|
+
const updatePostElement = (postElement) => {
|
28
|
+
const infoTopTips = postElement.querySelector(".recent-post-info-top-tips");
|
29
|
+
const originalSpan = infoTopTips?.querySelector(".original");
|
30
|
+
const existingHotTip = infoTopTips?.querySelector(".hot-tip");
|
31
|
+
if (!existingHotTip && originalSpan) {
|
32
|
+
const hotTip = createHotTipElement();
|
33
|
+
infoTopTips.insertBefore(hotTip, originalSpan);
|
34
|
+
}
|
35
|
+
};
|
36
|
+
const createHotTipElement = () => {
|
37
|
+
const hotTip = document.createElement("span");
|
38
|
+
hotTip.classList.add("hot-tip");
|
39
|
+
const icon = document.createElement("i");
|
40
|
+
icon.classList.add("solitude", "fas", "fa-fire-flame-curved");
|
41
|
+
hotTip.appendChild(icon);
|
42
|
+
const commentCount = document.createTextNode("#{_p('hot-tip')}");
|
43
|
+
hotTip.appendChild(commentCount);
|
44
|
+
return hotTip;
|
45
|
+
};
|
46
|
+
fetchCommentsCount();
|
47
|
+
}
|
package/package.json
CHANGED
@@ -1,11 +1,8 @@
|
|
1
1
|
{
|
2
2
|
"name": "hexo-theme-solitude",
|
3
|
-
"version": "3.0.
|
3
|
+
"version": "3.0.17",
|
4
4
|
"description": "A beautiful, powerful, and efficient Hexo theme developed by everfu.",
|
5
5
|
"main": "package.json",
|
6
|
-
"scripts": {
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
8
|
-
},
|
9
6
|
"keywords": [
|
10
7
|
"hexo",
|
11
8
|
"theme",
|
@@ -29,5 +26,8 @@
|
|
29
26
|
},
|
30
27
|
"homepage": "https://solitude.js.org",
|
31
28
|
"author": "Hexo-Theme-Solitude<o@efu.me>",
|
32
|
-
"license": "Apache-2.0"
|
33
|
-
|
29
|
+
"license": "Apache-2.0",
|
30
|
+
"scripts": {
|
31
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
32
|
+
}
|
33
|
+
}
|
package/plugins.yml
CHANGED
@@ -50,12 +50,12 @@ katex:
|
|
50
50
|
name: katex
|
51
51
|
file: dist/katex.min.css
|
52
52
|
other_name: KaTeX
|
53
|
-
version: 0.16.
|
53
|
+
version: 0.16.9
|
54
54
|
katex_copytex:
|
55
55
|
name: katex
|
56
56
|
file: dist/contrib/copy-tex.min.js
|
57
57
|
other_name: KaTeX
|
58
|
-
version: 0.16.
|
58
|
+
version: 0.16.9
|
59
59
|
lazyload:
|
60
60
|
name: vanilla-lazyload
|
61
61
|
file: dist/lazyload.iife.min.js
|
@@ -121,7 +121,7 @@ mermaid_js:
|
|
121
121
|
chart_js:
|
122
122
|
name: chart.js
|
123
123
|
file: dist/chart.umd.js
|
124
|
-
version: 4.4.
|
124
|
+
version: 4.4.1
|
125
125
|
other_name: Chart.js
|
126
126
|
typeit_js:
|
127
127
|
name: typeit
|
@@ -380,7 +380,6 @@ i.solitude
|
|
380
380
|
&#content-inner
|
381
381
|
max-width 1400px
|
382
382
|
flex-grow 1
|
383
|
-
padding-top .5rem
|
384
383
|
|
385
384
|
&.hide-aside
|
386
385
|
> div:first-child
|
@@ -396,19 +395,12 @@ i.solitude
|
|
396
395
|
width 100%
|
397
396
|
|
398
397
|
> #post, #category, #tag, #archive
|
399
|
-
box-shadow var(--efu-shadow-border)
|
400
|
-
padding 1rem 2rem
|
401
|
-
border-radius 12px
|
402
|
-
border var(--style-border)
|
403
398
|
align-self flex-start
|
404
399
|
animation slide-in .6s .1s backwards
|
405
400
|
position relative
|
406
401
|
if hexo-config('aside.position') == 0
|
407
402
|
order 2
|
408
403
|
|
409
|
-
+minWidth768()
|
410
|
-
background var(--efu-card-bg)
|
411
|
-
|
412
404
|
+maxWidth768()
|
413
405
|
box-shadow none
|
414
406
|
border none
|
@@ -42,7 +42,7 @@
|
|
42
42
|
display none
|
43
43
|
|
44
44
|
+maxHeight800()
|
45
|
-
|
45
|
+
padding-top 30px
|
46
46
|
|
47
47
|
|
48
48
|
&.show
|
@@ -84,6 +84,8 @@
|
|
84
84
|
|
85
85
|
.console-card.tags
|
86
86
|
height calc(100% - 172px)
|
87
|
+
+maxHeight800()
|
88
|
+
height 100%
|
87
89
|
|
88
90
|
.console-mask
|
89
91
|
background var(--efu-maskbgdeep)
|
@@ -227,11 +229,11 @@
|
|
227
229
|
line-height 1
|
228
230
|
transform rotate(-30deg)
|
229
231
|
transition .6s
|
232
|
+
border-radius 32px
|
230
233
|
|
231
234
|
i:hover
|
232
235
|
color var(--efu-hovertext)
|
233
236
|
background var(--efu-main-op)
|
234
|
-
border-radius 32px
|
235
237
|
|
236
238
|
.console-card.history
|
237
239
|
margin-top 8px
|
@@ -242,6 +244,9 @@
|
|
242
244
|
overflow hidden
|
243
245
|
border-radius 0
|
244
246
|
|
247
|
+
+maxHeight800()
|
248
|
+
display none
|
249
|
+
|
245
250
|
.item-headline
|
246
251
|
display none
|
247
252
|
|
@@ -173,6 +173,17 @@ div#banners
|
|
173
173
|
margin-top 0
|
174
174
|
margin-bottom: 12px
|
175
175
|
|
176
|
+
&::before
|
177
|
+
content ''
|
178
|
+
position absolute
|
179
|
+
width 100%
|
180
|
+
height 100%
|
181
|
+
background var(--efu-black)
|
182
|
+
opacity .3
|
183
|
+
z-index 1
|
184
|
+
top 0
|
185
|
+
left 0
|
186
|
+
|
176
187
|
.author-content-item
|
177
188
|
flex 4
|
178
189
|
border-radius 12px
|
@@ -1,8 +1,4 @@
|
|
1
1
|
#tag
|
2
|
-
+minWidth1300()
|
3
|
-
padding: 4rem 2rem 1rem 2rem!important
|
4
|
-
overflow hidden
|
5
|
-
|
6
2
|
+maxWidth768()
|
7
3
|
padding 0 1rem
|
8
4
|
|
@@ -10,19 +6,18 @@
|
|
10
6
|
display flex
|
11
7
|
flex-direction row
|
12
8
|
flex-wrap wrap
|
13
|
-
margin 0
|
14
|
-
margin-bottom 0.5rem
|
15
|
-
position absolute
|
16
|
-
z-index 2
|
17
9
|
width 100%
|
18
|
-
|
10
|
+
position absolute
|
11
|
+
z-index 1
|
19
12
|
left 0
|
20
13
|
top 0
|
21
|
-
max-height
|
22
|
-
overflow hidden
|
14
|
+
max-height 44px
|
15
|
+
overflow: hidden
|
23
16
|
background var(--efu-card-bg)
|
24
17
|
backdrop-filter saturate(180%) blur(20px)
|
25
18
|
transition .1s ease-out
|
19
|
+
border-radius 12px
|
20
|
+
border var(--style-border-always)
|
26
21
|
|
27
22
|
&:hover
|
28
23
|
max-height 1000px
|
@@ -34,6 +34,17 @@
|
|
34
34
|
|
35
35
|
+maxWidth768()
|
36
36
|
height 15rem
|
37
|
+
&::after
|
38
|
+
position absolute
|
39
|
+
content ''
|
40
|
+
width 100%
|
41
|
+
height 32px
|
42
|
+
background var(--efu-background)
|
43
|
+
bottom 0
|
44
|
+
border-radius 16px 16px 0 0
|
45
|
+
|
46
|
+
+maxWidth768()
|
47
|
+
display none
|
37
48
|
|
38
49
|
.post-bg
|
39
50
|
#post-cover
|
@@ -342,13 +353,4 @@
|
|
342
353
|
background var(--efu-hovertext)
|
343
354
|
border-radius 12px 12px 0 0
|
344
355
|
+minWidth768()
|
345
|
-
min-height 250px
|
346
|
-
|
347
|
-
#post-info-bottom
|
348
|
-
display flex
|
349
|
-
position absolute
|
350
|
-
width 100%
|
351
|
-
bottom 0
|
352
|
-
border-radius 1rem 1rem 0 0
|
353
|
-
padding .5rem 0
|
354
|
-
background var(--efu-background)
|
356
|
+
min-height 250px
|
package/source/js/main.js
CHANGED
@@ -903,12 +903,7 @@ window.refreshFn = () => {
|
|
903
903
|
const { is_home, is_page, page, is_post, ai_text } = PAGE_CONFIG;
|
904
904
|
const { runtime, lazyload, lightbox, randomlink, covercolor, lure, expire } =
|
905
905
|
GLOBAL_CONFIG;
|
906
|
-
const timeSelector =
|
907
|
-
(is_home || is_page
|
908
|
-
? ".post-meta-date time"
|
909
|
-
: is_post
|
910
|
-
? ".post-meta-date time"
|
911
|
-
: ".datetime") + ", .webinfo-item time";
|
906
|
+
const timeSelector = ".datetime, .webinfo-item time, .post-meta-date time";
|
912
907
|
document.body.setAttribute("data-type", page);
|
913
908
|
sco.changeTimeFormat(document.querySelectorAll(timeSelector));
|
914
909
|
runtime && sco.addRuntime();
|