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.
Files changed (46) hide show
  1. package/.github/screenshot.webp +0 -0
  2. package/LICENSE +1 -1
  3. package/README.md +8 -6
  4. package/README_en-US.md +8 -6
  5. package/README_zh-Hant.md +7 -5
  6. package/_config.yml +10 -7
  7. package/languages/default.yml +1 -0
  8. package/languages/en.yml +1 -0
  9. package/languages/zh-CN.yml +1 -0
  10. package/languages/zh-TW.yml +1 -0
  11. package/layout/includes/body/gadsense.pug +2 -2
  12. package/layout/includes/inject/head.pug +1 -1
  13. package/layout/includes/widgets/aside/asideAdsense.pug +5 -0
  14. package/layout/includes/widgets/aside/asideCustom.pug +4 -3
  15. package/layout/includes/widgets/aside/asideSwitch.pug +2 -0
  16. package/layout/includes/widgets/home/categoryBar.pug +6 -2
  17. package/layout/includes/widgets/home/postList.pug +2 -2
  18. package/layout/includes/widgets/page/about/award.pug +2 -1
  19. package/layout/post.pug +5 -0
  20. package/package.json +3 -3
  21. package/scripts/event/merge_config.js +355 -321
  22. package/scripts/tags/button.js +1 -1
  23. package/scripts/tags/link.js +6 -5
  24. package/source/css/_comments/comment.styl +3 -0
  25. package/source/css/_comments/twikoo.styl +16 -37
  26. package/source/css/_comments/valine.styl +3 -0
  27. package/source/css/_global/index.styl +13 -6
  28. package/source/css/_layout/aside.styl +8 -1
  29. package/source/css/_layout/other.styl +0 -3
  30. package/source/css/_mode/index.styl +2 -0
  31. package/source/css/_page/_about/reward.styl +2 -6
  32. package/source/css/_page/_home/category-bar.styl +26 -21
  33. package/source/css/_page/_home/home-top.styl +3 -0
  34. package/source/css/_post/ads.styl +4 -0
  35. package/source/css/_post/index.styl +4 -1
  36. package/source/css/_post/tools.styl +11 -0
  37. package/source/img/error_load.webp +0 -0
  38. package/source/img/loading.gif +0 -0
  39. package/source/js/main.js +6 -4
  40. package/.github/screenshot.png +0 -0
  41. package/README_fr.md +0 -90
  42. package/README_ja.md +0 -88
  43. package/source/img/error_load.png +0 -0
  44. package/source/img/pwa/favicon_128.ico +0 -0
  45. package/source/img/pwa/favicon_256.ico +0 -0
  46. package/source/img/pwa/favicon_512.ico +0 -0
Binary file
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 Efu
3
+ Copyright (c) 2024 EverFu
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- 简体中文丨[繁体中文](README_zh-Hant.md)丨[English](README_en-US.md)丨[Français](README_fr.md)丨[日本語](README_ja.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
  [![gitee](https://img.shields.io/badge/Gitee-red?logo=gitee)](https://gitee.com/nsjjd_w/hexo-theme-solitude)
39
39
  [![gitlab](https://img.shields.io/badge/GitLab-blue?logo=gitlab)](https://gitlab.com/efu/hexo-theme-solitude)
40
40
 
41
- [预览](https://www.efu.me/) 丨 [文档](https://docs.efu.me/)
41
+ [文档 & 预览](https://solitude.js.org/)
42
42
 
43
43
  </div>
44
44
 
45
- ![Screenshot](.github/screenshot.png)
45
+ ![Screenshot](.github/screenshot.webp)
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://docs.efu.me/) 获取更多信息。
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 &copy; 2023-至今 [Efu](https://github.com/efuo)
90
+ [MIT](./LICENSE) License &copy; 2023-至今 [EverFu](https://github.com/efuo)
package/README_en-US.md CHANGED
@@ -1,4 +1,4 @@
1
- [简体中文](README.md)丨[繁体中文](README_zh-Hant.md)丨English丨[Français](README_fr.md)丨[日本語](README_ja.md)
1
+ [简体中文](README.md)丨[繁体中文](README_zh-Hant.md)丨English
2
2
 
3
3
  <div align="center">
4
4
 
@@ -38,11 +38,11 @@
38
38
  [![gitee](https://img.shields.io/badge/Gitee-red?logo=gitee)](https://gitee.com/nsjjd_w/hexo-theme-solitude)
39
39
  [![gitlab](https://img.shields.io/badge/GitLab-blue?logo=gitlab)](https://gitlab.com/efu/hexo-theme-solitude)
40
40
 
41
- [Preview](https://efu.me/) 丨 [Documentation](https://docs.efu.me/)
41
+ [Documentation & Preview](https://solitude.js.org/)
42
42
 
43
43
  </div>
44
44
 
45
- ![Screenshot](.github/screenshot.png)
45
+ ![Screenshot](.github/screenshot.webp)
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://docs.efu.me/) for more information.
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 &copy; 2023-PRESENT [Efu](https://github.com/efuo)
90
+ [MIT](./LICENSE) License &copy; 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)丨[Français](README_fr.md)丨[日本語](README_ja.md)
1
+ [简体中文](README.md)丨繁体中文丨[English](README_en-US.md)
2
2
 
3
3
  <div align="center">
4
4
 
@@ -38,11 +38,11 @@
38
38
  [![gitee](https://img.shields.io/badge/Gitee-red?logo=gitee)](https://gitee.com/nsjjd_w/hexo-theme-solitude)
39
39
  [![gitlab](https://img.shields.io/badge/GitLab-blue?logo=gitlab)](https://gitlab.com/efu/hexo-theme-solitude)
40
40
 
41
- [預覽](https://efu.me/) 丨 [文档](https://docs.efu.me/)
41
+ [文档 & 預覽](https://solitude.js.org/)
42
42
 
43
43
  </div>
44
44
 
45
- ![Screenshot](.github/screenshot.png)
45
+ ![Screenshot](.github/screenshot.webp)
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://docs.efu.me) 獲取更多資訊。
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://docs.efu.me/
6
+ # 配置指南: https://solitude.js.org/
7
7
  # 你可以从指南中获得更详细的说明
8
8
  #
9
- # Guide: https://docs.efu.me/
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://docs.efu.me/
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.png
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://docs.efu.me/configuration/extra#数学公式
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: http://docs.efu.me/comments/comment
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://docs.efu.me/configuration/extra#pwa
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
@@ -39,6 +39,7 @@ home:
39
39
  new: New
40
40
  read: Unread
41
41
  recommendmore: More
42
+ archives: All articles
42
43
 
43
44
  post:
44
45
  reprint: Reprint
package/languages/en.yml CHANGED
@@ -39,6 +39,7 @@ home:
39
39
  new: New
40
40
  read: Unread
41
41
  recommendmore: More
42
+ archives: All articles
42
43
 
43
44
  post:
44
45
  reprint: Reprint
@@ -49,6 +49,7 @@ home:
49
49
  read: 未读
50
50
  recommend: 荐
51
51
  recommendmore: 更多推荐
52
+ archives: 全部文章
52
53
 
53
54
  post:
54
55
  reprint: 转载或翻译
@@ -49,6 +49,7 @@ home:
49
49
  read: 未讀
50
50
  recommend: 荐
51
51
  recommendmore: 更多推薦
52
+ archives: 全部文章
52
53
 
53
54
  post:
54
55
  reprint: 轉載或翻譯
@@ -1,5 +1,5 @@
1
- if (theme.google_adsense && theme.google_adsense.enable)
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.0",
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
- .item-headline
3
- i(class=custom.icon)
4
- span=custom.title
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
@@ -7,6 +7,8 @@ case item
7
7
  include ./asideNewestPost.pug
8
8
  when 'allInfo'
9
9
  include ./asideAllInfo.pug
10
+ when 'ads'
11
+ include ./asideAdsense.pug
10
12
  default
11
13
  - const custom = site.data?.aside?.find((i) => i.name === item)
12
14
  if custom
@@ -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
- if site.categories.find({parent: {$exists: false}}).data.length > 10
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 (theme.google_adsense && theme.google_adsense.enable && theme.google_adsense.auto_ads === false)
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
- img.post-qr-code-img(alt=reward.name, src=reward.qcode, style="border-color:" + reward.color)
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.0",
4
- "description": "A beautiful, powerful, and efficient Hexo theme developed by the efu.",
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
- "Efu",
14
+ "EverFu",
15
15
  "hexo-theme-solitude"
16
16
  ],
17
17
  "repository": {