hexo-theme-solitude 1.2.6 → 1.3.0

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 (261) hide show
  1. package/CONTRIBUTING.md +41 -0
  2. package/README.md +8 -8
  3. package/README_EN.md +6 -6
  4. package/_config.yml +495 -297
  5. package/languages/en-US.yml +105 -8
  6. package/languages/zh-CN.yml +98 -1
  7. package/layout/archive.pug +3 -3
  8. package/layout/category.pug +4 -5
  9. package/layout/includes/console.pug +15 -16
  10. package/layout/includes/footer.pug +26 -28
  11. package/layout/includes/head/config.pug +27 -8
  12. package/layout/includes/head/fest.pug +22 -0
  13. package/layout/includes/head/opengraph.pug +11 -0
  14. package/layout/includes/head.pug +1 -3
  15. package/layout/includes/header.pug +1 -1
  16. package/layout/includes/inject/body.pug +33 -13
  17. package/layout/includes/inject/head.pug +30 -20
  18. package/layout/includes/layout.pug +11 -8
  19. package/layout/includes/loading.pug +1 -64
  20. package/layout/includes/mixins/articleSort.pug +4 -4
  21. package/layout/includes/mixins/pagination.pug +1 -1
  22. package/layout/includes/nav.pug +10 -10
  23. package/layout/includes/page/about.pug +1 -0
  24. package/layout/includes/page/categories.pug +3 -3
  25. package/layout/includes/page/default.pug +1 -1
  26. package/layout/includes/page/echarts.pug +3 -3
  27. package/layout/includes/page/equipment.pug +0 -1
  28. package/layout/includes/page/links.pug +5 -26
  29. package/layout/includes/page/moments.pug +0 -1
  30. package/layout/includes/page/music.pug +19 -0
  31. package/layout/includes/page/not_configured.pug +18 -0
  32. package/layout/includes/page/rss.pug +20 -22
  33. package/layout/includes/page/says.pug +1 -2
  34. package/layout/includes/page/tags.pug +3 -3
  35. package/layout/includes/page/tlink.pug +0 -1
  36. package/layout/includes/sidebar.pug +7 -7
  37. package/layout/includes/widgets/aside/aside.pug +13 -1
  38. package/layout/includes/widgets/aside/asideArchive.pug +5 -3
  39. package/layout/includes/widgets/aside/asideCustom.pug +6 -0
  40. package/layout/includes/widgets/aside/asideHistory.pug +3 -3
  41. package/layout/includes/widgets/aside/asideInfoCard.pug +4 -6
  42. package/layout/includes/widgets/aside/asideNewestPost.pug +1 -1
  43. package/layout/includes/widgets/aside/asideSwitch.pug +0 -11
  44. package/layout/includes/widgets/aside/asideTag.pug +2 -2
  45. package/layout/includes/widgets/aside/asideToc.pug +1 -1
  46. package/layout/includes/widgets/aside/asideWebInfo.pug +6 -6
  47. package/layout/includes/widgets/aside/asideWelcome.pug +1 -1
  48. package/layout/includes/widgets/home/banner.pug +2 -2
  49. package/layout/includes/widgets/home/bbTimeList.pug +3 -3
  50. package/layout/includes/widgets/home/categoryBar.pug +3 -3
  51. package/layout/includes/widgets/home/categoryGroup.pug +2 -2
  52. package/layout/includes/widgets/home/hometop.pug +7 -7
  53. package/layout/includes/widgets/home/postList.pug +12 -8
  54. package/layout/includes/widgets/home/topGroup.pug +17 -13
  55. package/layout/includes/widgets/nav/left.pug +6 -6
  56. package/layout/includes/widgets/nav/menu.pug +4 -4
  57. package/layout/includes/widgets/nav/right.pug +14 -14
  58. package/layout/includes/widgets/page/about/authorinfo.pug +1 -1
  59. package/layout/includes/widgets/page/about/award.pug +11 -9
  60. package/layout/includes/widgets/page/about/contentinfo.pug +7 -7
  61. package/layout/includes/widgets/page/about/hobbies.pug +1 -1
  62. package/layout/includes/widgets/page/about/motto.pug +2 -2
  63. package/layout/includes/widgets/page/about/other.pug +10 -9
  64. package/layout/includes/widgets/page/about/personalities.pug +2 -2
  65. package/layout/includes/widgets/page/about/skillsinfo.pug +10 -12
  66. package/layout/includes/widgets/page/about/tenyear.pug +48 -0
  67. package/layout/includes/widgets/page/banner.pug +2 -2
  68. package/layout/includes/widgets/page/links/banner.pug +12 -14
  69. package/layout/includes/widgets/page/links/linksItem.pug +0 -1
  70. package/layout/includes/widgets/page/moments/angle.pug +7 -12
  71. package/layout/includes/widgets/page/moments/index.pug +7 -2
  72. package/layout/includes/widgets/post/award.pug +12 -8
  73. package/layout/includes/widgets/post/copyright.pug +16 -14
  74. package/layout/includes/widgets/post/postMeta.pug +36 -25
  75. package/layout/includes/widgets/post/postNav.pug +15 -15
  76. package/layout/includes/widgets/randomlink.pug +10 -5
  77. package/layout/includes/widgets/rightside/index.pug +9 -8
  78. package/layout/includes/widgets/third-party/ai/index.pug +12 -0
  79. package/layout/includes/widgets/third-party/comments/comment.pug +6 -1
  80. package/layout/includes/widgets/third-party/comments/twikoo.pug +5 -4
  81. package/layout/includes/widgets/third-party/comments/waline.pug +4 -5
  82. package/layout/includes/widgets/third-party/music.pug +1 -1
  83. package/layout/includes/widgets/third-party/pjax.pug +6 -1
  84. package/layout/includes/widgets/third-party/search/algolia-search.pug +4 -3
  85. package/layout/includes/widgets/third-party/search/index.pug +2 -2
  86. package/layout/includes/widgets/third-party/search/local-search.pug +3 -3
  87. package/layout/index.pug +5 -6
  88. package/layout/page.pug +34 -29
  89. package/layout/post.pug +3 -23
  90. package/layout/tag.pug +3 -3
  91. package/package.json +2 -2
  92. package/scripts/filter/checkThemeConfig.js +0 -5
  93. package/scripts/helper/cdn.js +12 -0
  94. package/scripts/helper/page.js +13 -0
  95. package/scripts/helper/related_post.js +0 -1
  96. package/scripts/tags/button.js +21 -0
  97. package/scripts/tags/card.js +9 -0
  98. package/scripts/tags/checkbox.js +51 -0
  99. package/scripts/tags/fold.js +0 -5
  100. package/scripts/tags/image.js +75 -0
  101. package/scripts/tags/inline-image.js +12 -0
  102. package/scripts/tags/label.js +10 -0
  103. package/scripts/tags/link.js +2 -0
  104. package/scripts/tags/media.js +29 -0
  105. package/scripts/tags/span.js +17 -0
  106. package/scripts/tags/timeline.js +2 -15
  107. package/scripts/tags/u.js +7 -0
  108. package/source/css/_global/animation.css +57 -0
  109. package/source/css/_global/index.styl +5 -20
  110. package/source/css/_global/var.styl +16 -1
  111. package/source/css/_layout/{base.styl → basic.styl} +24 -116
  112. package/source/css/_layout/header.styl +203 -615
  113. package/source/css/_layout/index.styl +29 -271
  114. package/source/css/_mode/index.styl +87 -94
  115. package/source/css/_page/_home/category-bar.styl +74 -0
  116. package/source/css/_page/_home/home-top.styl +541 -0
  117. package/source/css/_page/_home/index.styl +15 -0
  118. package/source/css/_page/_home/pagination.styl +176 -0
  119. package/source/css/_page/_home/recent-post.styl +204 -0
  120. package/source/css/_page/about/index.styl +1 -0
  121. package/source/css/_page/about/tenyear.styl +56 -0
  122. package/source/css/_page/about.styl +555 -626
  123. package/source/css/_page/category.styl +95 -119
  124. package/source/css/_page/douban.styl +126 -0
  125. package/source/css/_page/equipment.styl +100 -99
  126. package/source/css/_page/error.styl +130 -146
  127. package/source/css/_page/home.styl +41 -50
  128. package/source/css/_page/index.styl +42 -10
  129. package/source/css/_page/links.styl +305 -0
  130. package/source/css/_page/moment.styl +51 -51
  131. package/source/css/_page/music.styl +506 -0
  132. package/source/css/_page/rss.styl +62 -67
  133. package/source/css/_page/says.styl +375 -344
  134. package/source/css/_page/tag.styl +15 -13
  135. package/source/css/_widgets/{aside → _aside}/flip.styl +7 -5
  136. package/source/css/_widgets/{aside → _aside}/history.styl +9 -2
  137. package/source/css/_widgets/_aside/index.styl +96 -0
  138. package/source/css/_widgets/{aside → _aside}/info.styl +86 -89
  139. package/source/css/_widgets/{aside → _aside}/newPost.styl +7 -1
  140. package/source/css/_widgets/{aside → _aside}/toc.styl +28 -5
  141. package/source/css/_widgets/{comment → _comment}/index.styl +4 -12
  142. package/source/css/_widgets/{comment → _comment}/twikoo.styl +5 -2
  143. package/source/css/_widgets/{comment → _comment}/waline.styl +21 -5
  144. package/source/css/{_extra → _widgets/_extra}/console.styl +33 -10
  145. package/source/css/_widgets/_extra/fullpage.styl +46 -0
  146. package/source/css/_widgets/_extra/music.styl +218 -0
  147. package/source/css/_widgets/_extra/pace.styl +39 -0
  148. package/source/css/_widgets/_extra/rightmenu.styl +78 -0
  149. package/source/css/_widgets/_mixins/article-sort.styl +93 -0
  150. package/source/css/_widgets/_mixins/footer.styl +273 -0
  151. package/source/css/_widgets/_mixins/other.styl +34 -0
  152. package/source/css/_widgets/_mixins/sidebar.styl +230 -0
  153. package/source/css/_widgets/_post/_highlight/diff.styl +75 -0
  154. package/source/css/_widgets/_post/_highlight/index.styl +144 -0
  155. package/source/css/_widgets/_post/_highlight/theme/default.styl +12 -0
  156. package/source/css/_widgets/_post/_highlight/theme/mac.styl +25 -0
  157. package/source/css/_widgets/_post/_highlight/theme.styl +68 -0
  158. package/source/css/_widgets/_post/commentBarrage.styl +144 -0
  159. package/source/css/_widgets/_post/content.styl +152 -0
  160. package/source/css/_widgets/_post/copyright.styl +98 -0
  161. package/source/css/_widgets/_post/index.styl +20 -0
  162. package/source/css/_widgets/_post/meta.styl +420 -0
  163. package/source/css/_widgets/_post/pagination.styl +177 -0
  164. package/source/css/_widgets/_post/postAI.styl +131 -0
  165. package/source/css/{_post → _widgets/_post}/relatedPost.styl +4 -1
  166. package/source/css/_widgets/_post/tools.styl +249 -0
  167. package/source/css/{_search → _widgets/_search}/algolia-search.styl +4 -0
  168. package/source/css/{_search → _widgets/_search}/local-search.styl +15 -5
  169. package/source/css/_widgets/_tags/button.styl +60 -0
  170. package/source/css/_widgets/_tags/bvideo.styl +8 -0
  171. package/source/css/_widgets/_tags/card.styl +52 -0
  172. package/source/css/_widgets/_tags/checkbox.styl +85 -0
  173. package/source/css/_widgets/_tags/fold.styl +79 -0
  174. package/source/css/_widgets/_tags/image.styl +10 -0
  175. package/source/css/_widgets/_tags/index.styl +61 -0
  176. package/source/css/_widgets/_tags/inline-image.styl +6 -0
  177. package/source/css/_widgets/_tags/label.styl +3 -0
  178. package/source/css/_widgets/_tags/link.styl +80 -0
  179. package/source/css/_widgets/_tags/note.styl +101 -0
  180. package/source/css/_widgets/_tags/span.styl +61 -0
  181. package/source/css/_widgets/_tags/tabs.styl +105 -0
  182. package/source/css/_widgets/_tags/timeline.styl +80 -0
  183. package/source/css/_widgets/index.styl +50 -1
  184. package/source/css/index.styl +0 -25
  185. package/source/js/{commentBarrage.js → extend/comment/twikoo/commentBarrage.js} +0 -4
  186. package/source/js/extend/comment/{twikoo.js → twikoo/twikoo.js} +12 -40
  187. package/source/js/extend/comment/waline/commentBarrage.js +155 -0
  188. package/source/js/extend/comment/{waline.js → waline/waline.js} +10 -11
  189. package/source/js/extend/search/algolia-search.js +1 -5
  190. package/source/js/extend/search/local-search.js +33 -13
  191. package/source/js/main.js +144 -163
  192. package/source/js/music.js +129 -0
  193. package/source/js/utils.js +4 -7
  194. package/source/lib/cover-color.min.js +7 -0
  195. package/source/lib/rightside.min.js +1 -0
  196. package/source/lib/sco-ai.min.js +8 -0
  197. package/source/lib/snackbar.min.css +1 -1
  198. package/source/lib/txmap.min.js +1 -0
  199. package/source/lib/view-image.min.js +1 -1
  200. package/layout/includes/widgets/aside/asidePower.pug +0 -19
  201. package/layout/includes/widgets/home/rencentPost.pug +0 -26
  202. package/source/css/_extra/rightmenu.styl +0 -83
  203. package/source/css/_layout/articleSort.styl +0 -199
  204. package/source/css/_layout/footer.styl +0 -359
  205. package/source/css/_layout/sidebar.styl +0 -226
  206. package/source/css/_page/homeTop.styl +0 -1035
  207. package/source/css/_page/link.styl +0 -433
  208. package/source/css/_post/commentBarrage.styl +0 -149
  209. package/source/css/_post/externalTags.styl +0 -694
  210. package/source/css/_post/highlight.styl +0 -96
  211. package/source/css/_post/index.styl +0 -935
  212. package/source/css/_post/pagination.styl +0 -467
  213. package/source/css/_post/postContent.styl +0 -957
  214. package/source/css/_post/reward.styl +0 -217
  215. package/source/css/_widgets/aside/index.styl +0 -156
  216. package/source/css/_widgets/aside/power.styl +0 -90
  217. package/source/img/logo-horizontal_version.png +0 -0
  218. package/source/img/pwa/16.png +0 -0
  219. package/source/img/pwa/180.png +0 -0
  220. package/source/img/pwa/192.png +0 -0
  221. package/source/img/pwa/32.png +0 -0
  222. package/source/img/pwa/512.png +0 -0
  223. package/source/img/pwa/logo.png +0 -0
  224. package/source/img/pwa/siteicon/splash-1125x2436.png +0 -0
  225. package/source/img/pwa/siteicon/splash-1136x640.png +0 -0
  226. package/source/img/pwa/siteicon/splash-1170x2532.png +0 -0
  227. package/source/img/pwa/siteicon/splash-1179x2556.png +0 -0
  228. package/source/img/pwa/siteicon/splash-1242x2208.png +0 -0
  229. package/source/img/pwa/siteicon/splash-1242x2688.png +0 -0
  230. package/source/img/pwa/siteicon/splash-1248x2778.png +0 -0
  231. package/source/img/pwa/siteicon/splash-1290x2796.png +0 -0
  232. package/source/img/pwa/siteicon/splash-1334x750.png +0 -0
  233. package/source/img/pwa/siteicon/splash-1536x2048.png +0 -0
  234. package/source/img/pwa/siteicon/splash-1620x2160.png +0 -0
  235. package/source/img/pwa/siteicon/splash-1668x2224.png +0 -0
  236. package/source/img/pwa/siteicon/splash-1668x2388.png +0 -0
  237. package/source/img/pwa/siteicon/splash-1792x828.png +0 -0
  238. package/source/img/pwa/siteicon/splash-2048x1536.png +0 -0
  239. package/source/img/pwa/siteicon/splash-2048x2732.png +0 -0
  240. package/source/img/pwa/siteicon/splash-2160x1620.png +0 -0
  241. package/source/img/pwa/siteicon/splash-2208x1242.png +0 -0
  242. package/source/img/pwa/siteicon/splash-2224x1668.png +0 -0
  243. package/source/img/pwa/siteicon/splash-2388x1668.png +0 -0
  244. package/source/img/pwa/siteicon/splash-2436x1125.png +0 -0
  245. package/source/img/pwa/siteicon/splash-2532x1170.png +0 -0
  246. package/source/img/pwa/siteicon/splash-2556x1179.png +0 -0
  247. package/source/img/pwa/siteicon/splash-2688x1242.png +0 -0
  248. package/source/img/pwa/siteicon/splash-2732x2048.png +0 -0
  249. package/source/img/pwa/siteicon/splash-2778x1248.png +0 -0
  250. package/source/img/pwa/siteicon/splash-2796x1290.png +0 -0
  251. package/source/img/pwa/siteicon/splash-640x1136.png +0 -0
  252. package/source/img/pwa/siteicon/splash-750x1334.png +0 -0
  253. package/source/img/pwa/siteicon/splash-828x1792.png +0 -0
  254. package/source/img/solitude-show.jpg +0 -0
  255. package/source/js/extend/covercolor/local.js +0 -160
  256. package/source/js/rightside.js +0 -402
  257. package/source/js/txmap.js +0 -236
  258. package/source/lib/chuckle-post-ai.js +0 -1
  259. /package/source/css/_widgets/{aside → _aside}/allinfo.styl +0 -0
  260. /package/source/css/_widgets/{aside → _aside}/welcome.styl +0 -0
  261. /package/source/img/{theme/avatar.png → avatar.png} +0 -0
@@ -1,3 +1,8 @@
1
+ .title-h2-a
2
+ .title-h2-a-left
3
+ h2 🐟 鱼塘
4
+ .title-h2-a-right
5
+ span 以下内容自动生成,未经过审核
1
6
  div#hexo-circle-of-friends-root
2
7
  script.
3
8
  let UserConfig = {
@@ -14,5 +19,5 @@ script.
14
19
  // 本地文章缓存数据过期时间(天)
15
20
  expire_days: !{theme.thirdparty.circle.expire_days},
16
21
  }
17
- script(src=url_for(theme.thirdparty.circle.appjs))
18
- script(src=url_for(theme.thirdparty.circle.bundlejs))
22
+ script(src=cdn_url_for("/lib/circle.min.js"))
23
+ script(src=cdn_url_for("/lib/bundle.min.js"))
@@ -1,30 +1,32 @@
1
- div.post-reward
2
- div.reward-button.button--animated(onclick="AddRewardMask()" title="赞赏作者")
1
+ .post-reward(onclick="AddRewardMask()")
2
+ .reward-button(title="赞赏作者")
3
3
  i.scoicon.sco-hand-heart-fill
4
4
  | 打赏作者
5
- div.reward-main
5
+ .reward-main
6
6
  ul.reward-all
7
7
  span.reward-title 感谢你赐予我前进的力量
8
8
  ul.reward-group
9
9
  if theme.post.award.wechat
10
10
  li.reward-item
11
- a(href=theme.post.award.wechat target="_blank")
11
+ a(href=theme.post.award.wechat)
12
12
  img.post-qr-code-img(src=theme.post.award.wechat alt="微信")
13
- div.post-qr-code-desc 微信
13
+ .post-qr-code-desc 微信
14
14
  if theme.post.award.alipay
15
15
  li.reward-item
16
16
  a(href=theme.post.award.alipay target="_blank")
17
17
  img.post-qr-code-img(src=theme.post.award.alipay alt="支付宝")
18
- div.post-qr-code-desc 支付宝
18
+ .post-qr-code-desc 支付宝
19
19
  a.reward-main-btn(href=url_for(theme.post.award.url))
20
- div.reward-text 赞赏者名单
21
- div.reward-dec 因为你们的支持让我意识到写文章的价值🙏
20
+ .reward-text 赞赏者名单
21
+ .reward-dec 因为你们的支持让我意识到写文章的价值🙏
22
22
 
23
23
  script.
24
24
  function RemoveRewardMask() {
25
25
  let rewardMainElements = document.querySelectorAll(".reward-main");
26
26
  let quitBoxElement = document.querySelector("#quit-box");
27
27
 
28
+ console.log("RemoveRewardMask")
29
+
28
30
  rewardMainElements.forEach(element => {
29
31
  element.style.display = "none";
30
32
  });
@@ -38,6 +40,8 @@ script.
38
40
  let rewardMainElements = document.querySelectorAll(".reward-main");
39
41
  let quitBoxElement = document.querySelector("#quit-box");
40
42
 
43
+ console.log("AddRewardMask")
44
+
41
45
  rewardMainElements.forEach(element => {
42
46
  element.style.display = "flex";
43
47
  });
@@ -1,27 +1,29 @@
1
- div.post-copyright
2
- div.post-copyright__author_group
3
- a.post-copyright__author_img(href="/about/", data-pjax-state="")
4
- img.post-copyright__author_img_back(src=theme.post.author_back)
1
+ .post-copyright
2
+ .post-copyright__author_group
3
+ a.post-copyright__author_img(href="/about/")
4
+ if theme.post.default.copyright.author.enable
5
+ img.post-copyright__author_img_back(src=theme.post.default.copyright.author.author_back)
5
6
  img.post-copyright__author_img_front(src=theme.site.icon)
6
- div.post-copyright__author_name= config.title
7
- div.post-copyright__author_desc= config.subtitle
8
- div.post-tools#post-tools
9
- div.post-tools-left
7
+ .post-copyright__author_name= config.title
8
+ .post-copyright__author_desc= config.subtitle
9
+ .post-tools#post-tools
10
+ .post-tools-left
11
+ #quit-box(onclick="RemoveRewardMask()")
10
12
  if theme.post.award.enable
11
13
  include ./award
12
- if theme.footer.rss.enable
13
- div.reward-link.mode
14
- a.reward-link-button(href=theme.footer.rss.url)
14
+ if theme.post.rss.enable
15
+ .reward-link.mode
16
+ a.reward-link-button(href=url_for(theme.post.rss.url), title="订阅")
15
17
  i.scoicon.sco-plant-fill
16
18
  | 订阅
17
19
  if theme.post.default.copyright.enable || page.copyright
18
- div.post-copyright__notice
20
+ .post-copyright__notice
19
21
  span.post-copyright-info
20
22
  if page.reprint
21
23
  | 本文是转载或翻译文章,版权归原作者所有。转载本文请联系原作者。
22
24
  else
23
25
  | 本文是原创文章,采用
24
- a(href=url_for(theme.post.default.copyright.licenurl), target="_blank")
26
+ a(href=url_for(theme.post.default.copyright.licenurl))
25
27
  | #{theme.post.default.copyright.license}
26
28
  | 协议,完整转载请注明来自
27
- a(href="/", target="_blank") #{config.title}
29
+ a(href="/") #{config.title}
@@ -1,55 +1,66 @@
1
- div.coverdiv#coverdiv
1
+ .coverdiv#coverdiv
2
2
  img#post-cover.nolazyload(src=url_for(page.cover), alt=page.title)
3
- div#post-info
4
- div#post-firstinfo
5
- div.meta-firstline
6
- - var cc = reprint ? '转载或翻译' : '原创'
7
- a.post-meta-original(title="该文章为" + cc + "文章,注意版权协议")= cc
3
+ #post-info
4
+ #post-firstinfo
5
+ .meta-firstline
6
+ - var cc = page.reprint ? _p('post.meta_reprint') : _p('post.meta_original')
7
+ a.post-meta-original(title=_p('post.meta_cc').replace(/\$\{cc}/, cc))= cc
8
8
  if page.categories.data.length > 0
9
9
  span.post-meta-categories
10
- a.post-meta-categories(href=page.categories.data[0].path)= page.categories.data[0].name
11
- div.tag_share
12
- div.post-meta__tag-list
10
+ a.post-meta-categories(href='/' + page.categories.data[0].path)= page.categories.data[0].name
11
+ .tag_share
12
+ .post-meta__tag-list
13
13
  each tag in page.tags.data
14
14
  a.post-meta__tags(href=url_for(tag.path))
15
15
  span.tags-name.tags-punctuation= tag.name
16
16
  h1.post-title= page.title
17
- div#post-meta
18
- div.meta-secondline
17
+ #post-meta
18
+ .meta-secondline
19
19
  if theme.post.meta.date
20
- span.post-meta-date(title="发布于")
20
+ span.post-meta-date(title=_p('meta_posted') + ' ' + full_date(page.date))
21
21
  i.post-meta-icon.scoicon.sco-calendar-todo-fill
22
22
  time(datetime=date_xml(page.date))= date_xml(page.date)
23
23
  if theme.post.meta.updated
24
- span.post-meta-date(title="最后更新于")
24
+ span.post-meta-date(title=_p('meta_updated') + ' ' + full_date(page.updated))
25
25
  i.post-meta-icon.scoicon.sco-refresh-line
26
26
  time(datetime=date_xml(page.updated))= date_xml(page.updated)
27
27
  if theme.thirdparty.wordcount
28
28
  span.post-meta-wordcount
29
29
  if theme.post.meta.wordcount
30
- i.post-meta-icon.scoicon.sco-word-fill(title="文章字数")
30
+ i.post-meta-icon.scoicon.sco-word-fill(title=_p('post.meta_wordcount'))
31
31
  span.word-count= wordcount(page.content)
32
32
  span.post-meta-separator
33
33
  if theme.post.meta.readtime
34
- i.post-meta-icon.scoicon.sco-clock-fill(title="阅读耗时")
34
+ i.post-meta-icon.scoicon.sco-clock-fill(title=_p('post.meta_minread'))
35
35
  span= min2read(page.content) + " min"
36
36
  if theme.post.meta.locate
37
- span.post-meta-position(title="作者IP归属地为" + page.locate)
37
+ span.post-meta-position(title=_p('post.meta_ip') + page.locate)
38
38
  i.post-meta-icon.scoicon.sco-map-pin-fill
39
39
  span= page.locate
40
- if theme.thirdparty.busuanzi.enable && theme.post.meta.pv
41
- a.post-meta-pv(href=url_for(page.path), title="文章热度")
40
+ if theme.post.meta.pv
41
+ a.post-meta-pv(href=url_for(page.path), title=_p('post.meta_pv'))
42
42
  i.post-meta-icon.scoicon.sco-fire-fill
43
- if theme.thirdparty.busuanzi.usecomment
44
- span#twikoo_visitors
45
- i.scoicon.sco-loading-line
46
- else
43
+ if theme.comment.enable
44
+ case theme.comment.type
45
+ when "twikoo"
46
+ span#twikoo_visitors
47
+ i.scoicon.sco-loading-line
48
+ when "waline"
49
+ span.waline-pageview-count
50
+ i.scoicon.sco-loading-line
51
+ else if theme.thirdparty.busuanzi
47
52
  span#busuanzi_value_page_pv
48
53
  i.scoicon.sco-loading-line
49
54
  if theme.post.meta.comment && page.comment
50
- span.post-meta-commentcount(title="评论数", onclick="sco.scrollTo('post-comment')")
55
+ span.post-meta-commentcount(title=_p('post.meta_comment'), onclick="sco.scrollTo('post-comment')")
51
56
  i.scoicon.sco-chat-fill
52
57
  a(href=url_for(page.path) + "#post-comment")
53
- span#twikoo-count
54
- i.scoicon.sco-loading-line
58
+ case theme.comment.type
59
+ when "twikoo"
60
+ span#twikoo-count
61
+ i.scoicon.sco-loading-line
62
+ when "waline"
63
+ span.waline-comment-count
64
+ i.scoicon.sco-loading-line
65
+
55
66
  include ./wave
@@ -1,25 +1,25 @@
1
1
  nav.needEndHide.pagination-post#pagination
2
2
  if page.prev && page.next
3
- div.prev-post.pull-left
3
+ .prev-post.pull-left
4
4
  a(href=url_for(page.prev.path))
5
- div.pagination-info
6
- div.label 上一篇
7
- div.prev_info= page.prev.title
8
- div.next-post.pull-right
5
+ .pagination-info
6
+ .label 上一篇
7
+ .prev_info= page.prev.title
8
+ .next-post.pull-right
9
9
  a(href=url_for(page.next.path))
10
- div.pagination-info
11
- div.label 下一篇
12
- div.next_info= page.next.title
10
+ .pagination-info
11
+ .label 下一篇
12
+ .next_info= page.next.title
13
13
  else
14
14
  if !page.prev && page.next
15
- div.next-post.pull-full
15
+ .next-post.pull-full
16
16
  a(href=url_for(page.next.path))
17
17
  div.pagination-info
18
- div.label 下一篇
19
- div.next_info= page.next.title
18
+ .label 下一篇
19
+ .next_info= page.next.title
20
20
  if !page.next && page.prev
21
- div.prev-post.pull-full
21
+ .prev-post.pull-full
22
22
  a(href=url_for(page.prev.path))
23
- div.pagination-info
24
- div.label 上一篇
25
- div.prev_info= page.prev.title
23
+ .pagination-info
24
+ .label 上一篇
25
+ .prev_info= page.prev.title
@@ -18,15 +18,20 @@ script.
18
18
 
19
19
  if theme.footer.randomlink
20
20
  script.
21
- function randomLinksList(){
22
- let data='';
21
+ function randomLinksList() {
22
+ const linkcard = document.getElementById('friend-links-in-footer');
23
+ if (linkcard == null) return;
24
+
25
+ let data = '';
23
26
  let linksCopy = [...links];
24
27
  let count = Math.min(3, linksCopy.length);
28
+
25
29
  for (let i = 0; i < count; i++) {
26
30
  let index = utils.randomNum(linksCopy.length);
27
- const link = linksCopy[index];
28
- data += '<a class="footer-item" href="' + link.link + '" target="_blank" rel="noopener nofollow">' + link.name + '</a>';
31
+ const {link, name} = linksCopy[index];
32
+ data += `<a class="footer-item" href="${link}">${name}</a>`;
29
33
  linksCopy.splice(index, 1);
30
34
  }
31
- document.getElementById('friend-links-in-footer').innerHTML = data + '<a class="footer-item" href="/links/">更多</a>';
35
+
36
+ linkcard.innerHTML = data + '<a class="footer-item" href="/links/">更多</a>';
32
37
  }
@@ -5,7 +5,7 @@ div#rightMenu
5
5
  div.rightMenu-item#menu-forward
6
6
  i.scoicon.sco-arrow-right-line
7
7
  div.rightMenu-item#menu-refresh
8
- i.scoicon.sco-restart-line(style="font-size: 19px;")
8
+ i.scoicon.sco-restart-line
9
9
  div.rightMenu-item#menu-top
10
10
  i.scoicon.sco-arrow-up-line
11
11
  div.rightMenu-group.rightMenu-line.rightMenuPlugin
@@ -15,7 +15,7 @@ div#rightMenu
15
15
  div.rightMenu-item#menu-pastetext
16
16
  i.scoicon.sco-clipboard-fill
17
17
  span 粘贴文本
18
- a.rightMenu-item#menu-commenttext(data-pjax-state="")
18
+ a.rightMenu-item#menu-commenttext
19
19
  i.scoicon.sco-chat-new-fill
20
20
  span 引用到评论
21
21
  div.rightMenu-item#menu-newwindow
@@ -52,22 +52,23 @@ div#rightMenu
52
52
  i.scoicon.sco-copy-fill
53
53
  span 复制歌名
54
54
  div.rightMenu-group.rightMenu-line.rightMenuOther
55
- a.rightMenu-item.menu-Link#menu-randomPost(data-pjax-state="")
55
+ a.rightMenu-item.menu-Link#menu-randomPost
56
56
  i.scoicon.sco-signal-tower-fill
57
57
  span 随便逛逛
58
- a.rightMenu-item.menu-link(href="/categories/", data-pjax-state="")
58
+ a.rightMenu-item.menu-link(href="/categories/")
59
59
  i.scoicon.sco-checkbox-multiple-blank-fill
60
60
  span 博客分类
61
- a.rightMenu-item.menu-link(href="/tags/", data-pjax-state="")
61
+ a.rightMenu-item.menu-link(href="/tags/")
62
62
  i.scoicon.sco-price-tag-fill
63
63
  span 文章标签
64
64
  div.rightMenu-group.rightMenu-line.rightMenuOther
65
65
  div.rightMenu-item#menu-copy
66
66
  i.scoicon.sco-external-link-fill
67
67
  span 复制地址
68
- div.rightMenu-item#menu-commentBarrage
69
- i.scoicon.sco-chat-fill
70
- span.menu-commentBarrage-text 关闭热评
68
+ if theme.comment.enable && theme.comment.commentBarrage
69
+ div.rightMenu-item#menu-commentBarrage
70
+ i.scoicon.sco-chat-fill
71
+ span.menu-commentBarrage-text 关闭热评
71
72
  div.rightMenu-item#menu-darkmode
72
73
  i.scoicon.sco-moon-clear-fill
73
74
  span.menu-darkmode-text 浅色模式
@@ -0,0 +1,12 @@
1
+ .post-ai
2
+ .ai-title
3
+ .ai-title-left
4
+ i.ai-title-icon.scoicon.sco-robot-fill
5
+ .ai-title-text 文章摘要
6
+ .ai-tag#ai-tag= theme.thirdparty.ai.modelName
7
+ .ai-explanation(style="display: block;")
8
+ .ai-suggestions
9
+ .ai-bottom
10
+ .ai-tips= theme.thirdparty.ai.tips
11
+ if theme.thirdparty.ai.report
12
+ a.ai-report(title="投诉", href=url_for(theme.thirdparty.ai.report)) 投诉
@@ -1,8 +1,13 @@
1
- div#post-comment(view-image)
1
+ #post-comment(view-image)
2
2
  .comment-head
3
3
  .comment-headline
4
4
  i.scoicon.sco-chat-fill
5
5
  span 评论
6
+ span
7
+ .comment-randomInfo
8
+ a(onclick="sco.addRandomCommentInfo()", href="javascript:void(0)") 匿名评论
9
+ .comment-tips#comment-tips
10
+ span ✅ 你无需删除空行,直接评论以获取最佳展示效果
6
11
  .comment-wrap
7
12
  #comment
8
13
  case theme.comment.type
@@ -1,10 +1,10 @@
1
1
  script.
2
- async function initComment(){
2
+ async function initComment() {
3
3
  var initOptions = Object.assign(
4
4
  !{JSON.stringify(theme.comment.twikoo || {})},
5
5
  {
6
6
  el: '#comment',
7
- onCommentLoaded: function() {
7
+ onCommentLoaded: function () {
8
8
  GLOBAL_CONFIG.lightbox && sco.lightbox('#article-container img, #twikoo .tk-content img:not(.tk-owo-emotion)')
9
9
  },
10
10
  lang: '#{theme.comment.twikoo.lang}',
@@ -20,9 +20,10 @@ script.
20
20
  }
21
21
  )
22
22
  const res = await twikoo.getCommentsCount(countOptions)
23
- try{
23
+ try {
24
24
  document.getElementById('twikoo-count').innerText = res[0].count
25
- }catch (e) {
25
+ document.querySelector('.comment-headline span:last-child').innerText = ` (${res[0].count})`
26
+ } catch (e) {
26
27
  document.getElementById('twikoo-count').innerText = '加载错误'
27
28
  }
28
29
  }
@@ -1,17 +1,16 @@
1
- - const { envId, option, pageview } = theme.comment.waline
2
- - const { lazyload, count, type } = theme.comment
1
+ - const { envId, option } = theme.comment.waline
3
2
 
4
3
  script.
5
4
  async function initComment() {
6
5
  (() => {
7
- const waline = Waline.init(Object.assign({
6
+ Waline.init(Object.assign({
8
7
  el: '#comment',
9
8
  serverURL: '!{envId}',
10
- pageview: !{lazyload ? false : pageview},
9
+ pageview: !{theme.post.meta.pv},
11
10
  dark: 'html[data-theme="dark"]',
12
11
  path: window.location.pathname,
13
12
  search: false,
14
- comment: !{lazyload ? false : count},
13
+ comment: #{theme.post.meta.comment && is_post()},
15
14
  }, !{JSON.stringify(option)}))
16
15
  })()
17
16
  }
@@ -1,3 +1,3 @@
1
1
  div.needEndHide#nav-music(onclick="sco.musicToggle()")
2
- div#nav-music-hoverTips= "音乐已暂停"
2
+ div#nav-music-hoverTips=__('music.hit')
3
3
  meting-js(id=theme.thirdparty.aplayer.id, server=theme.thirdparty.aplayer.server, type="playlist", mutex="true", preload="none", data-lrctype="0", order="random", theme="var(--sco-main)")
@@ -4,7 +4,8 @@ script.
4
4
  '#body-wrap',
5
5
  '#site-config',
6
6
  'meta[name="description"]',
7
- '#js-pjax'
7
+ '#js-pjax',
8
+ 'meta[property^="og:"]',
8
9
  ]
9
10
 
10
11
  const pjax = new Pjax({
@@ -23,6 +24,10 @@ script.
23
24
  item.parentNode.replaceChild(newScript, item)
24
25
  })
25
26
 
27
+ document.addEventListener('pjax:complete', () => {
28
+ window.refreshFn()
29
+ })
30
+
26
31
  document.addEventListener('pjax:error', (e) => {
27
32
  if (e.request.status === 404) {
28
33
  pjax.loadUrl('/404.html')
@@ -1,6 +1,6 @@
1
1
  div#algolia-search
2
2
  div.search-dialog
3
- div.search-dialog__title#algolia-search-title= "搜索"
3
+ div.search-dialog__title#algolia-search-title=__('nav.search')
4
4
  div#algolia-input-panel
5
5
  div#algolia-search-input
6
6
  div#search-results
@@ -8,7 +8,8 @@ div#algolia-search
8
8
  div#algolia-tips
9
9
  div#algolia-pagination
10
10
  div#algolia-stats
11
- #algolia-poweredBy
11
+ i.scoicon.sco-algolia-fill
12
+ span.algolia-tips-text='Algolia 提供搜索服务'
12
13
  span.search-close-button
13
14
  i.scoicon.sco-close-fill
14
- div#search-mask
15
+ div#search-mask
@@ -1,7 +1,7 @@
1
1
  if theme.thirdparty.search.enable
2
2
  if theme.thirdparty.search.type==="algolia"
3
3
  include ./algolia-search.pug
4
- script(src="/js/extend/search/algolia-search.js")
4
+ script(src=cdn_url_for("/js/extend/search/algolia-search.js"))
5
5
  else if theme.thirdparty.search.type === "local"
6
6
  include ./local-search.pug
7
- script(src="/js/extend/search/local-search.js")
7
+ script(src=cdn_url_for("/js/extend/search/local-search.js"))
@@ -1,12 +1,12 @@
1
- div#local-search
1
+ #local-search
2
2
  div.search-dialog
3
3
  nav.search-nav
4
- span.search-dialog-title 搜索
4
+ span.search-dialog-title=__('nav.search')
5
5
  button.search-close-button
6
6
  i.scoicon.sco-close-fill
7
7
  div.search-wrap
8
8
  div.search-box
9
- input.search-box-input(type="text", id="search-input", autocomplete="off", spellcheck="false", autocorrect="off", autocapitalize="off", placeholder=__('search.placeholder'))
9
+ input.search-box-input#search-input(type="text", autocomplete="off", spellcheck="false", autocorrect="off", autocapitalize="off", placeholder=__('search.placeholder'))
10
10
  div#search-results
11
11
  div#search-pagination
12
12
  div#search-tips
package/layout/index.pug CHANGED
@@ -1,17 +1,16 @@
1
1
  extends includes/layout.pug
2
2
 
3
3
  block content
4
- div#home_top
4
+ #home_top
5
5
  if(theme.says.home_mini)
6
6
  include ./includes/widgets/home/bbTimeList.pug
7
7
  if(theme.hometop.banner.enable)
8
8
  include ./includes/widgets/home/hometop.pug
9
- main(class="layout", id="content-inner")
10
- div(class="recent-posts", id="recent-posts")
11
- div#category-bar
9
+ main.layout#content-inner
10
+ .recent-posts#recent-posts
11
+ #category-bar
12
12
  include ./includes/widgets/home/categoryBar.pug
13
-
14
- for post in page.posts.sort('-date').data
13
+ for post in page.posts.sort("-sticky" || "-date").data
15
14
  include ./includes/widgets/home/postList.pug
16
15
 
17
16
  // pageination
package/layout/page.pug CHANGED
@@ -1,32 +1,37 @@
1
1
  extends includes/layout.pug
2
2
 
3
3
  block content
4
- main.layout(class=page.aside ? '' : 'hide-aside', id='content-inner')
5
- div#page
6
- case page.type
7
- when 'categories'
8
- include includes/page/categories
9
- when 'tags'
10
- include includes/page/tags
11
- when 'links'
12
- include includes/page/links
13
- when 'tlink'
14
- include includes/page/tlink
15
- when 'about'
16
- include includes/page/about
17
- when 'says'
18
- include includes/page/says
19
- when 'equipment'
20
- include includes/page/equipment
21
- when 'moments'
22
- include includes/page/moments
23
- when 'echarts'
24
- include includes/page/echarts
25
- when 'rss'
26
- include includes/page/rss
27
- default
28
- include includes/page/default
29
- if page.comment
30
- include includes/widgets/third-party/comments/comment
31
- if page.aside
32
- include includes/widgets/aside/aside
4
+ main.layout#content-inner(class=page.aside ? '' : 'hide-aside')
5
+ #page
6
+ case page.type
7
+ when 'categories'
8
+ include includes/page/categories
9
+ when 'tags'
10
+ include includes/page/tags
11
+ when 'links'
12
+ include includes/page/links
13
+ when 'tlink'
14
+ include includes/page/tlink
15
+ when 'about'
16
+ include includes/page/about
17
+ when 'says'
18
+ include includes/page/says
19
+ when 'equipment'
20
+ include includes/page/equipment
21
+ when 'moments'
22
+ include includes/page/moments
23
+ when 'echarts'
24
+ include includes/page/echarts
25
+ when 'rss'
26
+ include includes/page/rss
27
+ when 'douban'
28
+ include includes/widgets/page/banner
29
+ include includes/page/default
30
+ when 'music'
31
+ include includes/page/music
32
+ default
33
+ include includes/page/default
34
+ if page.comment
35
+ include includes/widgets/third-party/comments/comment
36
+ if page.aside
37
+ include includes/widgets/aside/aside
package/layout/post.pug CHANGED
@@ -3,6 +3,8 @@ extends includes/layout.pug
3
3
  block content
4
4
  main.layout#content-inner
5
5
  #post
6
+ if theme.thirdparty.ai.enable
7
+ include includes/widgets/third-party/ai/index
6
8
  article.post-content#article-container!= page.content
7
9
  include includes/widgets/post/copyright
8
10
  .post-tools-right
@@ -18,26 +20,4 @@ block content
18
20
  != related_posts(page, site.posts)
19
21
  if page.comment
20
22
  include includes/widgets/third-party/comments/comment
21
- include includes/widgets/aside/aside
22
- if theme.thirdparty.ai.enable
23
- - let ai_black_list = theme.thirdparty.ai.BlackWhite_List.mode === 'black' ? theme.thirdparty.ai.BlackWhite_List.List.map(item => `'${item}'`).join(', ') : '';
24
- - let ai_white_list = theme.thirdparty.ai.BlackWhite_List.mode === 'white' ? theme.thirdparty.ai.BlackWhite_List.List.map(item => `'${item}'`).join(', ') : '';
25
- script(data-pjax, defer).
26
- new ChucklePostAI({
27
- el: '#post #article-container',
28
- key: '#{theme.thirdparty.ai.key}',
29
- title_el: '.post-title',
30
- rec_method: '#{theme.thirdparty.ai.rec_method || 'web'}',
31
- interface: {
32
- name: "#{theme.thirdparty.ai.ai_name || 'Solitude AI'}",
33
- introduce: "#{theme.thirdparty.ai.ai_introduce || '我是文章辅助AI生成工具: Solitude AI。你可以点击下方的按钮,让我生成本文简介、推荐相关文章等。'}",
34
- version: "#{theme.thirdparty.ai.ai_tips || 'GPT 4'}",
35
- },
36
- hide_shuttle: !{!!theme.thirdparty.ai.hide_shuttle},
37
- typewriter: !{!!theme.thirdparty.ai.typewriter},
38
- speed: !{!!theme.thirdparty.ai.speed},
39
- eliminate: [!{ai_black_list}],
40
- whitelist: [!{ai_white_list}],
41
- total_length: !{page.ai_total_length ? page.ai_total_length : 0},
42
- ratio_string: !{page.ai_ratio_string ? page.ai_ratio_string : 0},
43
- })
23
+ include includes/widgets/aside/aside
package/layout/tag.pug CHANGED
@@ -2,14 +2,14 @@ extends includes/layout.pug
2
2
 
3
3
  block content
4
4
  main.layout#content-inner
5
- div#tag
6
- div#tag-page-tags
5
+ #tag
6
+ #tag-page-tags
7
7
  each tag in site.tags.find({ parent: { $exists: false } }).data
8
8
  a(id=tag.name class=(tag.name === page.tag ? 'select' : '') href=url_for(tag.path))
9
9
  span.tags-punctuation
10
10
  | #{tag.name}
11
11
  span.tagsPageCount #{tag.length}
12
- div.recent-posts#recent-posts
12
+ .recent-posts#recent-posts
13
13
  each post in page.posts.find({ parent: { $exists: false } }).data
14
14
  include includes/widgets/home/postList
15
15
  include includes/mixins/pagination
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-solitude",
3
- "version": "1.2.6",
3
+ "version": "1.3.0",
4
4
  "description": "A beautiful, powerful, and efficient Hexo theme developed by the DuoSco team",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -20,4 +20,4 @@
20
20
  "url": "https://github.com/DuoSco/Hexo-theme-solitude/issues"
21
21
  },
22
22
  "homepage": "https://github.com/DuoSco/hexo-theme-solitude#readme"
23
- }
23
+ }