hexo-theme-solitude 1.10.0 → 1.10.2
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/.github/screenshot.webp +0 -0
- package/LICENSE +1 -1
- package/README.md +8 -6
- package/README_en-US.md +8 -6
- package/README_zh-Hant.md +7 -5
- package/_config.yml +10 -7
- package/languages/default.yml +1 -0
- package/languages/en.yml +1 -0
- package/languages/zh-CN.yml +1 -0
- package/languages/zh-TW.yml +1 -0
- package/layout/includes/body/gadsense.pug +2 -2
- package/layout/includes/inject/head.pug +1 -1
- package/layout/includes/widgets/aside/asideAdsense.pug +5 -0
- package/layout/includes/widgets/aside/asideCustom.pug +4 -3
- package/layout/includes/widgets/aside/asideSwitch.pug +2 -0
- package/layout/includes/widgets/home/categoryBar.pug +6 -2
- package/layout/includes/widgets/home/postList.pug +2 -2
- package/layout/includes/widgets/page/about/award.pug +2 -1
- package/layout/post.pug +5 -0
- package/package.json +3 -3
- package/scripts/event/merge_config.js +355 -321
- package/scripts/tags/button.js +1 -1
- package/scripts/tags/link.js +6 -5
- package/source/css/_comments/comment.styl +3 -0
- package/source/css/_comments/twikoo.styl +16 -37
- package/source/css/_comments/valine.styl +3 -0
- package/source/css/_global/index.styl +13 -6
- package/source/css/_layout/aside.styl +8 -1
- package/source/css/_layout/other.styl +0 -3
- package/source/css/_mode/index.styl +2 -0
- package/source/css/_page/_about/reward.styl +2 -6
- package/source/css/_page/_home/category-bar.styl +26 -21
- package/source/css/_page/_home/home-top.styl +3 -0
- package/source/css/_post/ads.styl +4 -0
- package/source/css/_post/index.styl +4 -1
- package/source/css/_post/tools.styl +11 -0
- package/source/img/error_load.webp +0 -0
- package/source/img/loading.gif +0 -0
- package/source/js/main.js +6 -4
- package/.github/screenshot.png +0 -0
- package/README_fr.md +0 -90
- package/README_ja.md +0 -88
- package/source/img/error_load.png +0 -0
- package/source/img/pwa/favicon_128.ico +0 -0
- package/source/img/pwa/favicon_256.ico +0 -0
- package/source/img/pwa/favicon_512.ico +0 -0
Binary file
|
package/LICENSE
CHANGED
package/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
简体中文丨[繁体中文](README_zh-Hant.md)丨[English](README_en-US.md)
|
1
|
+
简体中文丨[繁体中文](README_zh-Hant.md)丨[English](README_en-US.md)
|
2
2
|
|
3
3
|
<div align="center">
|
4
4
|
|
@@ -38,11 +38,11 @@
|
|
38
38
|
[](https://gitee.com/nsjjd_w/hexo-theme-solitude)
|
39
39
|
[](https://gitlab.com/efu/hexo-theme-solitude)
|
40
40
|
|
41
|
-
[预览](https://
|
41
|
+
[文档 & 预览](https://solitude.js.org/)
|
42
42
|
|
43
43
|
</div>
|
44
44
|
|
45
|
-

|
46
46
|
|
47
47
|
## 特性
|
48
48
|
|
@@ -51,7 +51,7 @@
|
|
51
51
|
- 昼夜切换(ColorMode)
|
52
52
|
- 灯箱(medium-zoom、fancybox)
|
53
53
|
- 数学公式(Latex)
|
54
|
-
-
|
54
|
+
- 特色页面:即刻短文、我的装备、在线工具、音乐馆、友链鱼塘、相册页、豆瓣页、弹幕留言页
|
55
55
|
- 文章功能:AI 摘要、代码高亮
|
56
56
|
|
57
57
|
## Todo
|
@@ -59,6 +59,8 @@
|
|
59
59
|
- [x] Artalk 评论
|
60
60
|
- [x] 双评论
|
61
61
|
- [x] 相册
|
62
|
+
- [x] 弹幕留言页
|
63
|
+
- [ ] 首页顶部新样式
|
62
64
|
|
63
65
|
> 如有問題請提 [issue](https://github.com/valor-x/hexo-theme-solitude/issues)
|
64
66
|
|
@@ -73,7 +75,7 @@
|
|
73
75
|
theme: solitude
|
74
76
|
```
|
75
77
|
|
76
|
-
前往 [文档](https://
|
78
|
+
前往 [文档](https://solitude.js.org/) 获取更多信息。
|
77
79
|
|
78
80
|
## 赞助者
|
79
81
|
|
@@ -85,4 +87,4 @@
|
|
85
87
|
|
86
88
|
## 版权
|
87
89
|
|
88
|
-
[MIT](./LICENSE) License © 2023-至今 [
|
90
|
+
[MIT](./LICENSE) License © 2023-至今 [EverFu](https://github.com/efuo)
|
package/README_en-US.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[简体中文](README.md)丨[繁体中文](README_zh-Hant.md)丨English
|
1
|
+
[简体中文](README.md)丨[繁体中文](README_zh-Hant.md)丨English
|
2
2
|
|
3
3
|
<div align="center">
|
4
4
|
|
@@ -38,11 +38,11 @@
|
|
38
38
|
[](https://gitee.com/nsjjd_w/hexo-theme-solitude)
|
39
39
|
[](https://gitlab.com/efu/hexo-theme-solitude)
|
40
40
|
|
41
|
-
[Preview](https://
|
41
|
+
[Documentation & Preview](https://solitude.js.org/)
|
42
42
|
|
43
43
|
</div>
|
44
44
|
|
45
|
-

|
46
46
|
|
47
47
|
## Features
|
48
48
|
|
@@ -51,7 +51,7 @@
|
|
51
51
|
- ColorMode
|
52
52
|
- Lightbox(medium-zoom、fancybox)
|
53
53
|
- Mathematical formulas(Latex)
|
54
|
-
- Featured pages: Instant Short Article, My Equipment, Online Tools, Music Gallery, Friend Chain Fish Pond, Photo Album Page, Douban Page
|
54
|
+
- Featured pages: Instant Short Article, My Equipment, Online Tools, Music Gallery, Friend Chain Fish Pond, Photo Album Page, Douban Page, Barrage message page
|
55
55
|
- Article features: AI summary, code highlighting
|
56
56
|
|
57
57
|
## Todo
|
@@ -59,6 +59,8 @@
|
|
59
59
|
- [x] Artalk
|
60
60
|
- [x] Use double comment
|
61
61
|
- [x] Album
|
62
|
+
- [x] Barrage message page
|
63
|
+
- [ ] New style at the top of the home page
|
62
64
|
|
63
65
|
> If you have any questions, please issue an [issue](https://github.com/valor-x/hexo-theme-solitude/issues)
|
64
66
|
|
@@ -73,7 +75,7 @@
|
|
73
75
|
theme: solitude
|
74
76
|
```
|
75
77
|
|
76
|
-
Check out the [Documentation](https://
|
78
|
+
Check out the [Documentation](https://solitude.js.org/) for more information.
|
77
79
|
|
78
80
|
## Sponsors
|
79
81
|
|
@@ -85,4 +87,4 @@ Check out the [Documentation](https://docs.efu.me/) for more information.
|
|
85
87
|
|
86
88
|
## License
|
87
89
|
|
88
|
-
[MIT](./LICENSE) License © 2023-PRESENT [
|
90
|
+
[MIT](./LICENSE) License © 2023-PRESENT [EverFu](https://github.com/efuo)
|
package/README_zh-Hant.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[简体中文](README.md)丨繁体中文丨[English](README_en-US.md)
|
1
|
+
[简体中文](README.md)丨繁体中文丨[English](README_en-US.md)
|
2
2
|
|
3
3
|
<div align="center">
|
4
4
|
|
@@ -38,11 +38,11 @@
|
|
38
38
|
[](https://gitee.com/nsjjd_w/hexo-theme-solitude)
|
39
39
|
[](https://gitlab.com/efu/hexo-theme-solitude)
|
40
40
|
|
41
|
-
[預覽](https://
|
41
|
+
[文档 & 預覽](https://solitude.js.org/)
|
42
42
|
|
43
43
|
</div>
|
44
44
|
|
45
|
-

|
46
46
|
|
47
47
|
## 特性
|
48
48
|
|
@@ -51,7 +51,7 @@
|
|
51
51
|
- 晝夜切換(ColorMode)
|
52
52
|
- 燈箱(medium-zoom、fancybox)
|
53
53
|
- 數學公式(Latex)
|
54
|
-
-
|
54
|
+
- 特色頁面:即刻短文、我的裝備、在線工具、音樂館、友鏈魚塘、相冊頁、豆瓣頁、留言彈幕頁
|
55
55
|
- 文章功能:AI 摘要、代碼高亮
|
56
56
|
|
57
57
|
## Todo
|
@@ -59,6 +59,8 @@
|
|
59
59
|
- [x] Artalk 評論
|
60
60
|
- [x] 雙評論
|
61
61
|
- [x] 相冊
|
62
|
+
- [x] 留言彈幕頁
|
63
|
+
- [ ] 首頁頂部新樣式
|
62
64
|
|
63
65
|
## 應用
|
64
66
|
|
@@ -71,7 +73,7 @@
|
|
71
73
|
theme: solitude
|
72
74
|
```
|
73
75
|
|
74
|
-
前往 [文檔](https://
|
76
|
+
前往 [文檔](https://solitude.js.org/) 獲取更多資訊。
|
75
77
|
|
76
78
|
## 贊助者
|
77
79
|
|
package/_config.yml
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
# Author: Valor Team
|
4
4
|
# Github: https://github.com/valor-x/hexo-theme-solitude
|
5
5
|
#
|
6
|
-
# 配置指南: https://
|
6
|
+
# 配置指南: https://solitude.js.org/
|
7
7
|
# 你可以从指南中获得更详细的说明
|
8
8
|
#
|
9
|
-
# Guide: https://
|
9
|
+
# Guide: https://solitude.js.org/
|
10
10
|
# You can get more detailed help from the guide
|
11
11
|
#
|
12
12
|
# 赞助:https://afdian.net/a/efu0u0
|
@@ -130,7 +130,7 @@ hometop:
|
|
130
130
|
title: Solitude 主题文档
|
131
131
|
# 点击跳转链接
|
132
132
|
# Click the jump link
|
133
|
-
url: https://
|
133
|
+
url: https://solitude.js.org/
|
134
134
|
# 显示背景图片
|
135
135
|
# Display background image
|
136
136
|
img: /img/default.png
|
@@ -604,7 +604,7 @@ lazyload:
|
|
604
604
|
placeholder: /img/loading.gif
|
605
605
|
# 加载失败显示图片
|
606
606
|
# Loading failed display image
|
607
|
-
errorimg: /img/error_load.
|
607
|
+
errorimg: /img/error_load.webp
|
608
608
|
|
609
609
|
# 加载动画
|
610
610
|
# loading animation
|
@@ -733,7 +733,7 @@ post_ai:
|
|
733
733
|
|
734
734
|
# latex 公式支持
|
735
735
|
# latex formula support
|
736
|
-
# docs: https://
|
736
|
+
# docs: https://solitude.js.org/configuration/extra#数学公式
|
737
737
|
katex:
|
738
738
|
enable: false
|
739
739
|
per_page: false # 是否在每页都加载 / Whether to load on each page
|
@@ -741,7 +741,7 @@ katex:
|
|
741
741
|
|
742
742
|
# 评论
|
743
743
|
# comment
|
744
|
-
# getting start:
|
744
|
+
# getting start: https://solitude.js.org/comments/comment
|
745
745
|
comment:
|
746
746
|
use: # waline, twikoo, valine, artalk
|
747
747
|
commentBarrage: false # 热评开关 / Hot comment switch
|
@@ -827,7 +827,7 @@ extends:
|
|
827
827
|
|
828
828
|
# PWA
|
829
829
|
# https://developer.mozilla.org/zh-CN/docs/Web/Progressive_web_apps
|
830
|
-
# docs: https://
|
830
|
+
# docs: https://solitude.js.org/configuration/extra#pwa
|
831
831
|
pwa:
|
832
832
|
enable: false
|
833
833
|
manifest: /manifest.json # manifest.json 文件路径
|
@@ -843,6 +843,9 @@ google_adsense:
|
|
843
843
|
enable: false
|
844
844
|
auto_ads: false # 自动广告关闭后则为手动广告 / After auto ads are turned off, it is manual ads
|
845
845
|
enable_page_level_ads: true # 页面级广告 / Page-level ads
|
846
|
+
aside_card: true # 侧边栏卡片广告 / Sidebar card ads(开启后自行到需要添加的页面使用:ads)
|
847
|
+
post_card: true # 文章卡片广告 / Post card ads(首页文章列表)
|
848
|
+
post_content: true # 文章内容广告 / Post content ads(文章内容底部广告)
|
846
849
|
js: https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js # 谷歌广告js / Google Adsense js
|
847
850
|
# client id
|
848
851
|
# 无论是否开启自动广告,都需要填写 client id
|
package/languages/default.yml
CHANGED
package/languages/en.yml
CHANGED
package/languages/zh-CN.yml
CHANGED
package/languages/zh-TW.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
if
|
2
|
-
script(async src=theme.google_adsense.js)
|
1
|
+
if theme.google_adsense && theme.google_adsense.enable
|
2
|
+
script(async src=theme.google_adsense.js onerror="document.querySelectorAll('.google-ads-warp').forEach(i => i.style.display='none')")
|
3
3
|
|
4
4
|
if theme.google_adsense.auto_ads
|
5
5
|
script.
|
@@ -27,7 +27,7 @@ include ../head/pwa.pug
|
|
27
27
|
|
28
28
|
script.
|
29
29
|
console.log(
|
30
|
-
"%c Program: Hexo %c Theme: Solitude %c Version: v1.10.
|
30
|
+
"%c Program: Hexo %c Theme: Solitude %c Version: v1.10.2",
|
31
31
|
"border-radius:5px 0 0 5px;padding: 5px 10px;color:white;background:#ff3842;",
|
32
32
|
"padding: 5px 10px;color:white;background:#3e9f50;",
|
33
33
|
"padding: 5px 10px;color:white;background:#0084ff;border-radius:0 5px 5px 0",
|
@@ -0,0 +1,5 @@
|
|
1
|
+
if theme.google_adsense.enable
|
2
|
+
.card-widget.card-adsense
|
3
|
+
ins.adsbygoogle(style="display:block; text-align:center; min-height:120px; min-width: 100%", data-ad-layout="in-article", data-ad-format="fluid", hide-unfilled="true", data-ad-client=theme.google_adsense.client, data-ad-slot=theme.google_adsense.slot)
|
4
|
+
script.
|
5
|
+
(adsbygoogle = window.adsbygoogle || []).push({});
|
@@ -1,6 +1,7 @@
|
|
1
1
|
.card-widget(class=custom.class, id=custom.id)
|
2
|
-
.
|
3
|
-
|
4
|
-
|
2
|
+
if !custom.no_head
|
3
|
+
.item-headline
|
4
|
+
i(class=custom.icon)
|
5
|
+
span=custom.title
|
5
6
|
div(class=custom.content_class ||'item-content', id=custom.content_id, style=custom.content_css)
|
6
7
|
!= custom.content_html
|
@@ -1,11 +1,15 @@
|
|
1
|
-
.category-bar-items#category-bar-items
|
1
|
+
.category-bar-items#category-bar-items(class=is_home() ? 'home' : '')
|
2
2
|
.category-bar-item(class=is_home() ? 'select' : '', id="category-bar-home")
|
3
3
|
a(href=url_for('/'))= __('home.home')
|
4
|
+
.category-bar-item
|
5
|
+
a(href=url_for('/archives/'))= __('home.archives')
|
4
6
|
each item in site.categories.find({ parent: { $exists: false } }).data
|
5
7
|
.category-bar-item(class=select ? (select === item.name ? 'select' : '') : '', id=item.name)
|
6
8
|
a(href=url_for(item.path))= item.name
|
7
9
|
div.category-bar-right
|
8
|
-
|
10
|
+
- let categories = site.categories.find({parent: {$exists: false}})
|
11
|
+
- let wordcount = categories.map(category => category.name).join('').length
|
12
|
+
if wordcount > 40 || categories.data.length > 10
|
9
13
|
.category-bar-next#category-bar-next(onclick="sco.scrollCategoryBarToRight()")
|
10
14
|
i.solitude.st-show-right-line
|
11
15
|
a.category-bar-more(href=url_for('/categories/'))= __('more')
|
@@ -72,9 +72,9 @@ div.recent-post-item(onclick="pjax.loadUrl('" + url_for(post.path) + "')")
|
|
72
72
|
+cover()
|
73
73
|
|
74
74
|
|
75
|
-
if
|
75
|
+
if theme.google_adsense && theme.google_adsense.enable && theme.google_adsense.auto_ads === false && theme.google_adsense.post_card
|
76
76
|
if (index + 1) % 3 === 0
|
77
77
|
div.recent-post-item.google-ads-warp
|
78
|
-
ins.adsbygoogle(style="display:block; text-align:center;", data-ad-layout="in-article", data-ad-format="fluid", data-ad-client=theme.google_adsense.client, data-ad-slot=theme.google_adsense.slot)
|
78
|
+
ins.adsbygoogle(style="display:block; text-align:center; min-width: 100%; height:220px", data-ad-layout="in-article", data-ad-format="fluid", hide-unfilled="true", data-ad-client=theme.google_adsense.client, data-ad-slot=theme.google_adsense.slot)
|
79
79
|
script.
|
80
80
|
(adsbygoogle = window.adsbygoogle || []).push({});
|
@@ -32,7 +32,8 @@ if site.data.about.rewardList
|
|
32
32
|
- var rewards = theme.post.award.list
|
33
33
|
each reward in rewards
|
34
34
|
li.reward-item
|
35
|
-
|
35
|
+
a(href=url_for(reward.url))
|
36
|
+
img.post-qr-code-img(alt=reward.name, src=reward.qcode, style="border-color:" + reward.color)
|
36
37
|
.post-qr-code-desc= reward.name
|
37
38
|
.reward-list-tips
|
38
39
|
p= award.tips.replace('{sum}', sum.toFixed(2))
|
package/layout/post.pug
CHANGED
@@ -37,6 +37,11 @@ block content
|
|
37
37
|
a.social-share-ico.icon-facebook(href=`https://www.facebook.com/sharer/sharer.php?u=${encodedPath}` title="Facebook")
|
38
38
|
when 'twitter'
|
39
39
|
a.social-share-ico.icon-twitter(href=`https://twitter.com/intent/tweet?url=${encodedPath}&text=${encodedTitle}` title="Twitter")
|
40
|
+
if theme.google_adsense.enable && theme.google_adsense.post_content
|
41
|
+
div.google-ads-warp
|
42
|
+
ins.adsbygoogle(style="display:block; text-align:center; height:284px", data-ad-layout="in-article", data-ad-format="fluid", hide-unfilled="true", data-ad-client=theme.google_adsense.client, data-ad-slot=theme.google_adsense.slot)
|
43
|
+
script.
|
44
|
+
(adsbygoogle = window.adsbygoogle || []).push({});
|
40
45
|
if site.posts.length > 1
|
41
46
|
include includes/widgets/post/postNav
|
42
47
|
if theme.related_post.enable
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "hexo-theme-solitude",
|
3
|
-
"version": "1.10.
|
4
|
-
"description": "A beautiful, powerful, and efficient Hexo theme developed by
|
3
|
+
"version": "1.10.2",
|
4
|
+
"description": "A beautiful, powerful, and efficient Hexo theme developed by EverFu.",
|
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
|
+
"EverFu",
|
15
15
|
"hexo-theme-solitude"
|
16
16
|
],
|
17
17
|
"repository": {
|