hexo-theme-solitude 1.9.3 → 1.10.1

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/README.md +7 -5
  3. package/README_en-US.md +7 -5
  4. package/README_zh-Hant.md +7 -5
  5. package/_config.yml +18 -7
  6. package/languages/default.yml +1 -0
  7. package/languages/en.yml +1 -0
  8. package/languages/zh-CN.yml +1 -0
  9. package/languages/zh-TW.yml +1 -0
  10. package/layout/includes/body/gadsense.pug +2 -2
  11. package/layout/includes/footer.pug +12 -11
  12. package/layout/includes/inject/head.pug +2 -2
  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/post.pug +5 -0
  19. package/package.json +1 -1
  20. package/scripts/event/merge_config.js +355 -321
  21. package/source/css/_comments/comment.styl +2 -0
  22. package/source/css/_comments/twikoo.styl +16 -37
  23. package/source/css/_global/index.styl +13 -6
  24. package/source/css/_layout/aside.styl +8 -1
  25. package/source/css/_layout/footer.styl +27 -28
  26. package/source/css/_layout/other.styl +0 -3
  27. package/source/css/_mode/index.styl +2 -0
  28. package/source/css/_page/_about/reward.styl +1 -6
  29. package/source/css/_page/_home/category-bar.styl +28 -8
  30. package/source/css/_page/_home/home-top.styl +3 -0
  31. package/source/css/_page/music.styl +54 -71
  32. package/source/css/_post/ads.styl +4 -0
  33. package/source/css/_post/index.styl +4 -1
  34. package/source/css/_post/tools.styl +3 -0
  35. package/source/css/_tags/mermaid.styl +4 -1
  36. package/source/img/error_load.webp +0 -0
  37. package/source/img/loading.gif +0 -0
  38. package/source/js/main.js +1 -1
  39. package/source/js/music.js +1 -0
  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/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://www.efu.me/) 丨 [文档](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
 
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
+ [Preview](https://efu.me/) 丨 [Documentation](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
 
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://efu.me/) 丨 [文档](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
@@ -383,6 +383,14 @@ post:
383
383
  mode: local # local:本地取色 / api:img2color取色 : local: local color / api: img2color color
384
384
  api: https://api.qjqq.cn/api/Imgcolor?img= # api地址 / api address
385
385
  time: 43200000 # api取色间隔(毫秒),默认为12小时 / api color interval (milliseconds), default is 12 hours
386
+ # footer
387
+ footer:
388
+ enable: true
389
+ desc: 来自 Efu 的文章 # 介绍文字
390
+ button: # 跳转按钮
391
+ enable: true
392
+ name: 了解更多
393
+ url: /about/
386
394
 
387
395
  # -------------------------
388
396
  # 自定义主题
@@ -596,7 +604,7 @@ lazyload:
596
604
  placeholder: /img/loading.gif
597
605
  # 加载失败显示图片
598
606
  # Loading failed display image
599
- errorimg: /img/error_load.png
607
+ errorimg: /img/error_load.webp
600
608
 
601
609
  # 加载动画
602
610
  # loading animation
@@ -725,7 +733,7 @@ post_ai:
725
733
 
726
734
  # latex 公式支持
727
735
  # latex formula support
728
- # docs: https://docs.efu.me/configuration/extra#数学公式
736
+ # docs: https://solitude.js.org/configuration/extra#数学公式
729
737
  katex:
730
738
  enable: false
731
739
  per_page: false # 是否在每页都加载 / Whether to load on each page
@@ -733,7 +741,7 @@ katex:
733
741
 
734
742
  # 评论
735
743
  # comment
736
- # getting start: http://docs.efu.me/comments/comment
744
+ # getting start: https://solitude.js.org/comments/comment
737
745
  comment:
738
746
  use: # waline, twikoo, valine, artalk
739
747
  commentBarrage: false # 热评开关 / Hot comment switch
@@ -819,7 +827,7 @@ extends:
819
827
 
820
828
  # PWA
821
829
  # https://developer.mozilla.org/zh-CN/docs/Web/Progressive_web_apps
822
- # docs: https://docs.efu.me/configuration/extra#pwa
830
+ # docs: https://solitude.js.org/configuration/extra#pwa
823
831
  pwa:
824
832
  enable: false
825
833
  manifest: /manifest.json # manifest.json 文件路径
@@ -835,6 +843,9 @@ google_adsense:
835
843
  enable: false
836
844
  auto_ads: false # 自动广告关闭后则为手动广告 / After auto ads are turned off, it is manual ads
837
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(文章内容底部广告)
838
849
  js: https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js # 谷歌广告js / Google Adsense js
839
850
  # client id
840
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.
@@ -1,13 +1,15 @@
1
- div#st-footer-bar
2
- div.footer-logo
3
- if theme.site.name.class === 'i_class'
4
- i.solitude(class=theme.site.name.custom)
5
- else if theme.site.name.class === 'img'
6
- img.solitude.nolazyload(src=url_for(theme.site.name.custom))
7
- else if theme.site.name.class === 'text'
8
- span= theme.site.name.custom
9
- div.footer-bar-description= __('footer.description').replace(/\$\{title}/, config.title + " - " + config.subtitle)
10
- a.footer-bar-link(href=url_for('/'))= __('footer.learnmore')
1
+ if theme.post.footer.enable && is_post()
2
+ div#st-footer-bar
3
+ div.footer-logo
4
+ if theme.site.name.class === 'i_class'
5
+ i.solitude(class=theme.site.name.custom)
6
+ else if theme.site.name.class === 'img'
7
+ img.solitude.nolazyload(src=url_for(theme.site.name.custom))
8
+ else if theme.site.name.class === 'text'
9
+ span= theme.site.name.custom
10
+ div.footer-bar-description=theme.post.footer.desc
11
+ if theme.post.footer.button.enable
12
+ a.footer-bar-link(href=url_for(theme.post.footer.button.url))= theme.post.footer.button.name
11
13
  div#footer_deal
12
14
  - var leftInfo = theme.footer && theme.footer.information && theme.footer.information.left || {}
13
15
  - var rightInfo = theme.footer && theme.footer.information && theme.footer.information.right || {}
@@ -52,7 +54,6 @@ div#footer-bar
52
54
  div.copyright © #{moment(theme.aside.siteinfo.runtime).year()} - #{new Date().getFullYear()} By&nbsp;
53
55
  a.footer-bar-link(href=url_for("/"))= config.author
54
56
  div.footer-bar-right
55
- a.footer-bar-link(href="https://github.com/valor-x/hexo-theme-solitude" title=__('footer.theme'))= __('footer.theme')
56
57
  each item in theme.footer.links
57
58
  a.footer-bar-link(href=url_for(item.url), alt=item.name)!= item.name
58
59
  a.footer-bar-link.cc(href=url_for(theme.footer.license), aria-label = 'copyright')
@@ -27,10 +27,10 @@ include ../head/pwa.pug
27
27
 
28
28
  script.
29
29
  console.log(
30
- "%c Program: Hexo %c Theme: Solitude %c Version: v1.9.3",
30
+ "%c Program: Hexo %c Theme: Solitude %c Version: v1.10.1",
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
- "padding: 5px 10px;color:white;background:#0084ff;",
33
+ "padding: 5px 10px;color:white;background:#0084ff;border-radius:0 5px 5px 0",
34
34
  )
35
35
 
36
36
  if theme.extends.head
@@ -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({});
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,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-solitude",
3
- "version": "1.9.3",
3
+ "version": "1.10.1",
4
4
  "description": "A beautiful, powerful, and efficient Hexo theme developed by the efu.",
5
5
  "main": "package.json",
6
6
  "scripts": {