hexo-theme-solitude 1.3.0 → 1.4.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 (260) hide show
  1. package/.github/FUNDING.yml +13 -0
  2. package/.github/ISSUE_TEMPLATE/bug_report.yml +107 -0
  3. package/.github/ISSUE_TEMPLATE/config.yml +13 -0
  4. package/.github/ISSUE_TEMPLATE/feature_request.yml +14 -0
  5. package/.github/workflows/npm-publish.yml +21 -0
  6. package/CONTRIBUTING.md +0 -0
  7. package/LICENSE +0 -0
  8. package/README.md +60 -43
  9. package/README_EN.md +60 -42
  10. package/_config.yml +606 -444
  11. package/languages/en-US.yml +3 -23
  12. package/languages/zh-CN.yml +3 -23
  13. package/layout/404.pug +0 -0
  14. package/layout/archive.pug +2 -3
  15. package/layout/category.pug +0 -0
  16. package/layout/includes/body/mode.pug +35 -0
  17. package/layout/includes/console.pug +3 -3
  18. package/layout/includes/footer.pug +16 -15
  19. package/layout/includes/head/config.pug +38 -30
  20. package/layout/includes/head/opengraph.pug +0 -0
  21. package/layout/includes/head/pwa.pug +5 -44
  22. package/layout/includes/head.pug +3 -1
  23. package/layout/includes/header.pug +0 -0
  24. package/layout/includes/inject/body.pug +115 -63
  25. package/layout/includes/inject/head.pug +11 -46
  26. package/layout/includes/layout.pug +1 -1
  27. package/layout/includes/loading.pug +0 -0
  28. package/layout/includes/mixins/articleSort.pug +0 -0
  29. package/layout/includes/mixins/pagination.pug +0 -0
  30. package/layout/includes/nav.pug +1 -1
  31. package/layout/includes/page/about.pug +1 -1
  32. package/layout/includes/page/categories.pug +0 -0
  33. package/layout/includes/page/default.pug +0 -0
  34. package/layout/includes/page/equipment.pug +0 -0
  35. package/layout/includes/page/links.pug +2 -2
  36. package/layout/includes/page/music.pug +0 -0
  37. package/layout/includes/page/not_configured.pug +0 -0
  38. package/layout/includes/page/rss.pug +3 -3
  39. package/layout/includes/page/says.pug +15 -15
  40. package/layout/includes/page/tags.pug +0 -0
  41. package/layout/includes/page/tlink.pug +1 -0
  42. package/layout/includes/recent-posts.pug +0 -0
  43. package/layout/includes/sidebar.pug +0 -0
  44. package/layout/includes/widgets/aside/aside.pug +6 -6
  45. package/layout/includes/widgets/aside/asideAllInfo.pug +0 -0
  46. package/layout/includes/widgets/aside/asideArchive.pug +0 -0
  47. package/layout/includes/widgets/aside/asideCustom.pug +1 -1
  48. package/layout/includes/widgets/aside/asideFlipCard.pug +0 -0
  49. package/layout/includes/widgets/aside/asideInfoCard.pug +3 -3
  50. package/layout/includes/widgets/aside/asideNewestPost.pug +0 -0
  51. package/layout/includes/widgets/aside/asideSwitch.pug +0 -4
  52. package/layout/includes/widgets/aside/asideTag.pug +1 -1
  53. package/layout/includes/widgets/aside/asideToc.pug +0 -0
  54. package/layout/includes/widgets/aside/asideWebInfo.pug +2 -2
  55. package/layout/includes/widgets/home/banner.pug +0 -0
  56. package/layout/includes/widgets/home/bb/json.pug +22 -0
  57. package/layout/includes/widgets/home/bb/local.pug +17 -0
  58. package/layout/includes/widgets/home/bb/memos.pug +25 -0
  59. package/layout/includes/widgets/home/bbTimeList.pug +11 -7
  60. package/layout/includes/widgets/home/categoryBar.pug +0 -0
  61. package/layout/includes/widgets/home/categoryGroup.pug +1 -1
  62. package/layout/includes/widgets/home/hometop.pug +0 -0
  63. package/layout/includes/widgets/home/postList.pug +0 -0
  64. package/layout/includes/widgets/home/topGroup.pug +0 -0
  65. package/layout/includes/widgets/nav/left.pug +0 -0
  66. package/layout/includes/widgets/nav/menu.pug +1 -1
  67. package/layout/includes/widgets/nav/right.pug +6 -5
  68. package/layout/includes/widgets/page/about/authorinfo.pug +10 -9
  69. package/layout/includes/widgets/page/about/award.pug +0 -0
  70. package/layout/includes/widgets/page/about/contentinfo.pug +35 -34
  71. package/layout/includes/widgets/page/about/hobbies.pug +21 -17
  72. package/layout/includes/widgets/page/about/motto.pug +17 -16
  73. package/layout/includes/widgets/page/about/other.pug +16 -16
  74. package/layout/includes/widgets/page/about/personalities.pug +15 -14
  75. package/layout/includes/widgets/page/about/skillsinfo.pug +37 -36
  76. package/layout/includes/widgets/page/about/tenyear.pug +0 -0
  77. package/layout/includes/widgets/page/banner.pug +9 -3
  78. package/layout/includes/widgets/page/equipment/content.pug +0 -0
  79. package/layout/includes/widgets/page/links/banner.pug +14 -12
  80. package/layout/includes/widgets/page/links/linksCard.pug +4 -6
  81. package/layout/includes/widgets/page/links/linksDiscn.pug +8 -0
  82. package/layout/includes/widgets/page/links/linksItem.pug +4 -6
  83. package/layout/includes/widgets/page/says/json.pug +80 -0
  84. package/layout/includes/widgets/page/says/local.pug +48 -0
  85. package/layout/includes/widgets/page/says/memos.pug +109 -0
  86. package/layout/includes/widgets/post/award.pug +0 -0
  87. package/layout/includes/widgets/post/copyright.pug +2 -2
  88. package/layout/includes/widgets/post/post-ai.pug +12 -0
  89. package/layout/includes/widgets/post/postMeta.pug +2 -2
  90. package/layout/includes/widgets/post/postNav.pug +0 -0
  91. package/layout/includes/widgets/post/wave.pug +0 -0
  92. package/layout/includes/widgets/randomlink.pug +1 -1
  93. package/layout/includes/widgets/rightside/index.pug +6 -5
  94. package/layout/includes/widgets/third-party/comments/comment.pug +1 -5
  95. package/layout/includes/widgets/third-party/comments/twikoo.pug +1 -1
  96. package/layout/includes/widgets/third-party/comments/waline.pug +9 -11
  97. package/layout/includes/widgets/third-party/music.pug +1 -1
  98. package/layout/includes/widgets/third-party/news-comment/newest-comment.pug +6 -0
  99. package/layout/includes/widgets/third-party/news-comment/twikoo.pug +70 -0
  100. package/layout/includes/widgets/third-party/news-comment/waline.pug +64 -0
  101. package/layout/includes/widgets/third-party/pjax.pug +0 -0
  102. package/layout/includes/widgets/third-party/search/algolia-search.pug +0 -0
  103. package/layout/includes/widgets/third-party/search/index.pug +8 -7
  104. package/layout/includes/widgets/third-party/search/local-search.pug +0 -0
  105. package/layout/index.pug +3 -3
  106. package/layout/page.pug +0 -4
  107. package/layout/post.pug +2 -2
  108. package/layout/tag.pug +0 -0
  109. package/package.json +18 -9
  110. package/plugins.yml +109 -0
  111. package/scripts/event/cdn.js +129 -0
  112. package/scripts/event/init.js +0 -0
  113. package/scripts/event/page.js +1 -21
  114. package/scripts/event/welcome.js +1 -1
  115. package/scripts/filter/checkThemeConfig.js +0 -0
  116. package/scripts/filter/default.js +0 -0
  117. package/scripts/filter/lazyload.js +1 -1
  118. package/scripts/filter/randomPosts.js +0 -0
  119. package/scripts/helper/cdn.js +0 -0
  120. package/scripts/helper/getArchiveLength.js +0 -0
  121. package/scripts/helper/page.js +0 -0
  122. package/scripts/helper/related_post.js +0 -0
  123. package/scripts/helper/stylus.js +0 -0
  124. package/scripts/tags/button.js +0 -0
  125. package/scripts/tags/bvideo.js +0 -0
  126. package/scripts/tags/card.js +0 -0
  127. package/scripts/tags/checkbox.js +0 -0
  128. package/scripts/tags/fold.js +0 -0
  129. package/scripts/tags/image.js +0 -0
  130. package/scripts/tags/inline-image.js +0 -0
  131. package/scripts/tags/label.js +0 -0
  132. package/scripts/tags/link.js +0 -0
  133. package/scripts/tags/media.js +0 -0
  134. package/scripts/tags/note.js +0 -0
  135. package/scripts/tags/span.js +0 -0
  136. package/scripts/tags/tabs.js +0 -0
  137. package/scripts/tags/timeline.js +0 -0
  138. package/scripts/tags/u.js +0 -0
  139. package/source/css/_global/animation.css +0 -0
  140. package/source/css/_global/function.styl +42 -42
  141. package/source/css/_global/index.styl +1 -1
  142. package/source/css/_global/var.styl +0 -0
  143. package/source/css/_layout/basic.styl +10 -12
  144. package/source/css/_layout/header.styl +8 -3
  145. package/source/css/_layout/index.styl +59 -5
  146. package/source/css/_mode/index.styl +0 -0
  147. package/source/css/_page/_home/category-bar.styl +0 -0
  148. package/source/css/_page/_home/home-top.styl +10 -31
  149. package/source/css/_page/_home/index.styl +0 -0
  150. package/source/css/_page/_home/pagination.styl +3 -0
  151. package/source/css/_page/_home/recent-post.styl +10 -3
  152. package/source/css/_page/about/index.styl +0 -0
  153. package/source/css/_page/about/tenyear.styl +0 -0
  154. package/source/css/_page/about.styl +9 -0
  155. package/source/css/_page/category.styl +0 -0
  156. package/source/css/_page/douban.styl +0 -1
  157. package/source/css/_page/equipment.styl +0 -0
  158. package/source/css/_page/error.styl +0 -0
  159. package/source/css/_page/home.styl +0 -0
  160. package/source/css/_page/index.styl +2 -3
  161. package/source/css/_page/links.styl +85 -49
  162. package/source/css/_page/moment.styl +0 -0
  163. package/source/css/_page/music.styl +1 -1
  164. package/source/css/_page/rss.styl +0 -0
  165. package/source/css/_page/says.styl +10 -0
  166. package/source/css/_page/tag.styl +0 -0
  167. package/source/css/_widgets/_aside/allinfo.styl +34 -0
  168. package/source/css/_widgets/_aside/flip.styl +0 -0
  169. package/source/css/_widgets/_aside/index.styl +1 -7
  170. package/source/css/_widgets/_aside/info.styl +0 -0
  171. package/source/css/_widgets/_aside/newPost.styl +0 -0
  172. package/source/css/_widgets/_aside/toc.styl +0 -0
  173. package/source/css/_widgets/_aside/welcome.styl +0 -0
  174. package/source/css/_widgets/_comment/index.styl +0 -0
  175. package/source/css/_widgets/_comment/twikoo.styl +0 -2
  176. package/source/css/_widgets/_comment/waline.styl +0 -0
  177. package/source/css/_widgets/_extra/console.styl +0 -0
  178. package/source/css/_widgets/_extra/fullpage.styl +0 -0
  179. package/source/css/_widgets/_extra/music.styl +1 -1
  180. package/source/css/_widgets/_extra/pace.styl +0 -0
  181. package/source/css/_widgets/_extra/rightmenu.styl +0 -0
  182. package/source/css/_widgets/_mixins/article-sort.styl +0 -0
  183. package/source/css/_widgets/_mixins/footer.styl +1 -2
  184. package/source/css/_widgets/_mixins/other.styl +0 -4
  185. package/source/css/_widgets/_mixins/sidebar.styl +0 -0
  186. package/source/css/_widgets/_post/_highlight/diff.styl +0 -0
  187. package/source/css/_widgets/_post/_highlight/index.styl +0 -1
  188. package/source/css/_widgets/_post/_highlight/theme/default.styl +0 -0
  189. package/source/css/_widgets/_post/_highlight/theme/mac.styl +0 -0
  190. package/source/css/_widgets/_post/_highlight/theme.styl +0 -0
  191. package/source/css/_widgets/_post/commentBarrage.styl +0 -0
  192. package/source/css/_widgets/_post/content.styl +42 -11
  193. package/source/css/_widgets/_post/copyright.styl +0 -0
  194. package/source/css/_widgets/_post/index.styl +1 -1
  195. package/source/css/_widgets/_post/meta.styl +0 -3
  196. package/source/css/_widgets/_post/pagination.styl +1 -1
  197. package/source/css/_widgets/_post/postAI.styl +0 -0
  198. package/source/css/_widgets/_post/relatedPost.styl +0 -0
  199. package/source/css/_widgets/_post/tools.styl +0 -0
  200. package/source/css/_widgets/_search/algolia-search.styl +0 -0
  201. package/source/css/_widgets/_search/local-search.styl +0 -0
  202. package/source/css/_widgets/_tags/button.styl +0 -0
  203. package/source/css/_widgets/_tags/bvideo.styl +0 -0
  204. package/source/css/_widgets/_tags/card.styl +0 -0
  205. package/source/css/_widgets/_tags/checkbox.styl +0 -0
  206. package/source/css/_widgets/_tags/fold.styl +0 -0
  207. package/source/css/_widgets/_tags/image.styl +0 -0
  208. package/source/css/_widgets/_tags/index.styl +0 -0
  209. package/source/css/_widgets/_tags/inline-image.styl +0 -0
  210. package/source/css/_widgets/_tags/label.styl +0 -0
  211. package/source/css/_widgets/_tags/link.styl +4 -2
  212. package/source/css/_widgets/_tags/note.styl +0 -0
  213. package/source/css/_widgets/_tags/span.styl +0 -0
  214. package/source/css/_widgets/_tags/tabs.styl +0 -0
  215. package/source/css/_widgets/_tags/timeline.styl +0 -1
  216. package/source/css/_widgets/index.styl +4 -4
  217. package/source/css/index.styl +0 -0
  218. package/source/img/avatar.png +0 -0
  219. package/source/img/default.png +0 -0
  220. package/source/img/error_load.png +0 -0
  221. package/source/js/{extend/comment/twikoo/commentBarrage.js → comment/twikoo_commentBarrage.js} +0 -0
  222. package/source/js/{extend/comment/waline/commentBarrage.js → comment/waline_commentBarrage.js} +0 -0
  223. package/source/js/covercolor/api.js +95 -0
  224. package/source/js/covercolor/local.js +154 -0
  225. package/source/js/main.js +28 -252
  226. package/source/js/music.js +0 -0
  227. package/source/js/rightside.js +404 -0
  228. package/source/js/{extend/search/algolia-search.js → search/algolia.js} +10 -0
  229. package/source/js/{extend/search/local-search.js → search/local.js} +24 -2
  230. package/source/js/utils.js +75 -1
  231. package/layout/includes/head/fest.pug +0 -22
  232. package/layout/includes/page/echarts.pug +0 -7
  233. package/layout/includes/page/moments.pug +0 -4
  234. package/layout/includes/widgets/aside/asideHistory.pug +0 -8
  235. package/layout/includes/widgets/aside/asideWelcome.pug +0 -12
  236. package/layout/includes/widgets/page/moments/angle.pug +0 -19
  237. package/layout/includes/widgets/page/moments/index.pug +0 -23
  238. package/layout/includes/widgets/page/says/saysBottom.pug +0 -11
  239. package/layout/includes/widgets/page/says/saysContent.pug +0 -6
  240. package/layout/includes/widgets/page/says/saysFunction.pug +0 -10
  241. package/layout/includes/widgets/page/says/saysMeta.pug +0 -7
  242. package/layout/includes/widgets/third-party/ai/index.pug +0 -12
  243. package/layout/includes/widgets/third-party/comments/gitalk.pug +0 -0
  244. package/layout/includes/widgets/third-party/comments/valine.pug +0 -0
  245. package/scripts/helper/echarts.js +0 -407
  246. package/source/css/_widgets/_aside/history.styl +0 -42
  247. package/source/js/extend/comment/twikoo/twikoo.js +0 -67
  248. package/source/js/extend/comment/waline/waline.js +0 -60
  249. package/source/lib/bundle.min.js +0 -27
  250. package/source/lib/circle.min.js +0 -1
  251. package/source/lib/cover-color.min.js +0 -7
  252. package/source/lib/friends_post.js +0 -4
  253. package/source/lib/lazyload.min.js +0 -1
  254. package/source/lib/rightside.min.js +0 -1
  255. package/source/lib/snackbar.min.css +0 -1
  256. package/source/lib/snackbar.min.js +0 -9
  257. package/source/lib/txmap.min.js +0 -1
  258. package/source/lib/view-image.min.js +0 -6
  259. package/source/lib/waterfall.min.js +0 -1
  260. /package/source/{lib → js}/sco-ai.min.js +0 -0
@@ -1,29 +1,124 @@
1
- - cdn = theme.cdn.body
2
1
  - page.type = is_post() ? 'post' : page.type
3
2
 
4
- script(src=url_for(cdn.pjaxjs))
5
- if theme.lazyload.enable
6
- script(src=cdn_url_for("/lib/lazyload.min.js"))
7
- script(src=cdn_url_for("/lib/snackbar.min.js"))
8
- if theme.lightbox
9
- script(src=cdn_url_for("/lib/view-image.min.js"))
10
- if theme.says.home_mini || theme.aside.history.enable
11
- script(src=url_for(cdn.swiperjs))
12
-
13
- if theme.rightside.enable
14
- include ../widgets/rightside/index.pug
15
- script(src=cdn_url_for("/lib/rightside.min.js"))
3
+ div
4
+ script(src=url_for(theme.cdn.main))
5
+
6
+ mixin katex
7
+ link(rel="stylesheet", href=url_for(theme.cdn.katex))
8
+ if theme.katex.copytex
9
+ script(src=url_for(theme.cdn.katex_copytex))
10
+ script.
11
+ (() => {
12
+ document.querySelectorAll('#article-container span.katex-display').forEach(item => {
13
+ utils.wrap(item, 'div', {class: 'katex-wrap'})
14
+ })
15
+ })()
16
+
17
+ if theme.katex && theme.katex.enable
18
+ if theme.katex.per_page
19
+ if is_post() || is_page()
20
+ +katex
21
+ else
22
+ if page.katex
23
+ +katex
24
+
25
+ script(src=url_for(theme.cdn.pjax))
26
+ if theme.lazyload.enable
27
+ script(src=url_for(theme.cdn.lazyload))
28
+ script(src=url_for(theme.cdn.snackbar))
29
+ if theme.lightbox
30
+ if theme.mediumZoom
31
+ script(src=url_for(theme.cdn.medium_zoom))
32
+ if theme.fancybox
33
+ script(src=url_for(theme.cdn.fancyapps_ui))
34
+ if theme.says.home_mini
35
+ script(src=url_for(theme.cdn.swiper_js))
36
+
37
+ if theme.rightside.enable
38
+ include ../widgets/rightside/index
39
+ script(src=url_for(theme.cdn.rightside_js))
40
+
41
+ // post-ai)
42
+ if theme.post_ai.enable
43
+ script(src=url_for(theme.cdn.sco_ai_js))
44
+
45
+ if theme.capsule.enable || theme.music.enable
46
+ script(src=url_for(theme.cdn.aplayer_js))
47
+ script(src=url_for(theme.cdn.meting_js))
48
+ script.
49
+ const meting_api = '!{theme.meting_api}';
50
+
51
+ if theme.post.covercolor.enable
52
+ case theme.post.covercolor.mode
53
+ when 'local'
54
+ script(src=url_for(theme.cdn.cover_local))
55
+ when 'api'
56
+ script.
57
+ const coverColorConfig = {
58
+ api: '!{theme.post.covercolor.api}',
59
+ time: !{theme.post.covercolor.time},
60
+ }
61
+ script(src=url_for(theme.cdn.cover_api))
62
+
63
+ // waterfall
64
+ if theme.says.enable
65
+ script(src=url_for(theme.cdn.waterfall))
66
+
67
+ // comment
68
+ if theme.comment.enable
69
+ case theme.comment.type
70
+ when 'twikoo'
71
+ script(src=url_for(theme.cdn.twikoo))
72
+ when 'waline'
73
+ script(src=url_for(theme.cdn.waline_js))
74
+ link(rel="stylesheet", href=url_for(theme.cdn.waline_css))
75
+
76
+ if theme.comment.commentBarrage
77
+ case theme.comment.type
78
+ when 'twikoo'
79
+ script(src=url_for(theme.cdn.twikoo_commentBarrage))
80
+ when 'waline'
81
+ script(src=url_for(theme.cdn.waline_commentBarrage))
82
+
83
+ // music
84
+ if theme.music.enable
85
+ script(src=url_for(theme.cdn.music_js))
86
+
87
+ // gallery
88
+ if theme.gallery
89
+ script(src=url_for(theme.cdn.fj_gallery))
90
+ link(rel="stylesheet", href=url_for(theme.cdn.fj_gallery_css))
91
+
92
+ // pace 胶囊加载条(Capsule loading bar)
93
+ if theme.loading.pace
94
+ script(src=url_for(theme.cdn.pace_js))
95
+
96
+ // search
97
+ if theme.search.enable
98
+ case theme.search.type
99
+ when 'algolia'
100
+ script(src=url_for(theme.cdn.instantsearch))
101
+ script(src=url_for(theme.cdn.algolia_search))
102
+ when 'local'
103
+ script(src=url_for(theme.cdn.lunr_js))
104
+
105
+ // inject custom body
106
+ if theme.extends.body
107
+ each item in theme.extends.body
108
+ != item
16
109
 
17
110
  div#js-pjax
18
- if page.type === 'says'
111
+ if page.type === 'says' && theme.says.enable
19
112
  script.
20
113
  window.addEventListener('resize', utils.throttle(function () {
21
114
  if (document.getElementById('waterfall')) {
22
115
  sco.reflashEssayWaterFall();
23
116
  }
24
117
  }), 500);
25
- if theme.thirdparty.busuanzi && (theme.aside.siteinfo.uv || theme.aside.siteinfo.pv || theme.thirdparty.busuanzi.usecomment === false)
26
- script(async src=url_for(cdn.busuanzijs))
118
+ sco.reflashEssayWaterFall();
119
+ GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".bber-content-img img"));
120
+ if theme.busuanzi && (theme.aside.siteinfo.uv || theme.aside.siteinfo.pv)
121
+ script(async src=url_for(theme.cdn.busuanzi_js))
27
122
 
28
123
  script#config-diff.
29
124
  var PAGE_CONFIG = {
@@ -35,57 +130,14 @@ div#js-pjax
35
130
  comment: !{!!page.comment},
36
131
  }
37
132
 
38
- // post-ai)
39
- if theme.thirdparty.ai.enable
40
- script(src=cdn_url_for("/lib/sco-ai.min.js"))
41
-
42
- if theme.thirdparty.aplayer.enable || theme.music.enable
43
- script(src=url_for(cdn.aplayerjs))
44
- script(src=url_for(cdn.metingjs))
45
- script.
46
- const meting_api = '!{theme.thirdparty.aplayer.api}';
47
-
48
- if theme.post.covercolor.enable
49
- script.
50
- const coverColorConfig = {
51
- mode: '!{theme.post.covercolor.mode}',
52
- api: '!{theme.post.covercolor.api}',
53
- time: !{theme.post.covercolor.time},
54
- }
55
- script(src=cdn_url_for("/lib/cover-color.min.js"))
56
-
57
133
  if theme.footer.randomlink
58
134
  include ../widgets/randomlink.pug
59
135
 
60
- if page.katex
61
- link(rel="stylesheet", href=url_for(cdn.katexcss))
62
- script(src=url_for(cdn.katexjs))
63
-
64
- if theme.aside.welcome.enable
65
- script(src=cdn_url_for("/lib/txmap.min.js"))
66
-
67
- // waterfall
68
- if theme.says.enable
69
- script(src=cdn_url_for("/lib/waterfall.min.js"))
70
-
71
- if theme.comment.enable
72
- case theme.comment.type
73
- when 'twikoo'
74
- script(src=cdn_url_for("/js/extend/comment/twikoo/twikoo.js"))
75
- script(src=cdn_url_for("/js/extend/comment/twikoo/commentBarrage.js"))
76
- when 'waline'
77
- script(src=cdn_url_for("/js/extend/comment/waline/waline.js"))
78
- script(src=cdn_url_for("/js/extend/comment/waline/commentBarrage.js"))
79
-
136
+ // newest comment
137
+ include ../widgets/third-party/news-comment/newest-comment.pug
80
138
 
81
139
  // pjax
82
140
  include ../widgets/third-party/pjax.pug
83
141
 
84
- // music
85
- if theme.music.enable
86
- script(src=cdn_url_for("/js/music.js"))
87
-
88
- // inject custom body
89
- if theme.extends.body
90
- each item in theme.extends.body
91
- != item
142
+ // theme
143
+ include ../body/mode
@@ -1,53 +1,19 @@
1
- - var cdn = theme.cdn.head
1
+ each item in theme.verify_site || []
2
+ meta(name=item.name, content=item.content)
2
3
 
3
- if theme.verify.baidu
4
- meta(name="baidu-site-verification", content=theme.verify.baidu)
5
-
6
- if theme.verify.google
7
- meta(name="google-site-verification", content=theme.verify.google)
8
-
9
- if theme.verify.sougou
10
- meta(name="sogou_site_verification", content=theme.verify.sougou)
11
-
12
- link(rel="stylesheet", href=cdn.scoicon)
13
- link(rel="stylesheet", href=cdn_url_for("/lib/snackbar.min.css"))
14
-
15
- // comment
16
- if theme.comment.enable
17
- case theme.comment.type
18
- when 'twikoo'
19
- script(src=cdn.twikoojs)
20
- when 'waline'
21
- script(src=cdn.walinejs)
22
- link(rel="stylesheet", href=cdn.walinecss)
23
-
24
- // pace 胶囊加载条(Capsule loading bar)
25
- if theme.loading.pace
26
- script(src=cdn.pacejs)
27
-
28
- // search
29
- if theme.thirdparty.search.enable
30
- if theme.thirdparty.search.type === 'algolia'
31
- script(src=url_for(cdn.instantsearch))
32
- script(src=url_for(cdn.algoliajs))
33
- else if theme.thirdparty.search.type === 'local'
34
- script(src=url_for(cdn.lunrjs))
4
+ link(rel="stylesheet", href=url_for(theme.cdn.scoicon_css))
5
+ link(rel="stylesheet", href=url_for(theme.cdn.snackbar_css))
35
6
 
36
7
  // aplayer
37
- if theme.thirdparty.aplayer.enable || theme.music.enable
38
- link(rel="stylesheet", href=cdn.aplayercss)
8
+ if theme.capsule.enable || theme.music.enable
9
+ link(rel="stylesheet", href=url_for(theme.cdn.aplayer_css))
39
10
 
40
11
  // swiper
41
- if theme.says.home_mini || theme.aside.history.enable
42
- link(rel="stylesheet", href=cdn.swipercss)
43
-
44
- // echarts
45
- if theme.about.echarts.enable && theme.about.enable
46
- script(src=url_for(cdn.echartsjs))
12
+ if theme.says.home_mini
13
+ link(rel="stylesheet", href=url_for(theme.cdn.swiper_css))
47
14
 
48
- // 灰色纪念日(Gray Anniversary)
49
- if theme.fest.enable
50
- include ../head/fest.pug
15
+ if theme.fancybox
16
+ link(rel="stylesheet", href=url_for(theme.cdn.fancyapps_css))
51
17
 
52
18
  // Open Graph
53
19
  include ../head/opengraph.pug
@@ -114,8 +80,7 @@ script.
114
80
  );
115
81
 
116
82
  div
117
- script(src=cdn_url_for("/js/utils.js"))
118
- script(src=cdn_url_for("/js/main.js"))
83
+ script(src=url_for(theme.cdn.utils))
119
84
 
120
85
  // custom inject
121
86
  if theme.extends.head
@@ -34,5 +34,5 @@ html(lang=config.language, data-theme="light")
34
34
  include ./widgets/third-party/search/index.pug
35
35
 
36
36
  // music
37
- if theme.thirdparty.aplayer.enable
37
+ if theme.capsule.enable
38
38
  include ./widgets/third-party/music.pug
File without changes
File without changes
File without changes
@@ -11,7 +11,7 @@ nav#nav.show
11
11
  else if theme.site.name.class === 'img'
12
12
  img(src=theme.site.name.custom, alt=config.title)
13
13
  else if theme.site.name.class === 'text'
14
- span.scoicon= theme.site.name.custom
14
+ span.title= theme.site.name.custom
15
15
  #page-name-mask
16
16
  #page-name
17
17
  a#page-name-text(onclick="sco.toTop()")= title || config.title
@@ -1,4 +1,4 @@
1
- if theme.about.enable && site.data.about
1
+ if theme.about && site.data.about
2
2
  #about-page
3
3
  include ../widgets/page/about/authorinfo
4
4
  include ../widgets/page/about/contentinfo
File without changes
File without changes
File without changes
@@ -1,7 +1,5 @@
1
1
  .flink#banners
2
2
  include ../widgets/page/links/banner
3
- if theme.thirdparty.circle.angle.enable
4
- include ../widgets/page/moments/angle
5
3
  .flink#article-container
6
4
  each data in site.data.links.links
7
5
  h2= data.class_name + " (" + data.link_list.length + ")"
@@ -11,4 +9,6 @@ if theme.thirdparty.circle.angle.enable
11
9
  include ../widgets/page/links/linksCard
12
10
  when 'item'
13
11
  include ../widgets/page/links/linksItem
12
+ when 'discn'
13
+ include ../widgets/page/links/linksDiscn
14
14
  != page.content
File without changes
File without changes
@@ -1,17 +1,17 @@
1
1
  .rss-plan-list
2
- a.rss-plan-item.rss-plan-wechat(href=theme.footer.rss.wechatOA, title="公众号")
2
+ a.rss-plan-item.rss-plan-wechat(href=page.wechatOA, title="公众号")
3
3
  .rss-plan-description 推送精选文章<br>推送全文
4
4
  .rss-plan-info-group
5
5
  .rss-plan-title 公众号订阅
6
6
  .rss-plan-info 推荐的订阅方式
7
7
  img.rss-plan-icon(src="https://bu.dusays.com/2023/11/01/6541d14a4de78.png", alt="wechat")
8
- a.rss-plan-item.rss-plan-mail(href=theme.footer.rss.emailOA, title="email")
8
+ a.rss-plan-item.rss-plan-mail(href=page.emailOA, title="email")
9
9
  .rss-plan-description 推送全部文章<br>推送封面与简介
10
10
  .rss-plan-info-group
11
11
  .rss-plan-title 邮件订阅
12
12
  .rss-plan-info 推荐的订阅方式
13
13
  img.rss-plan-icon(src="https://bu.dusays.com/2023/11/01/6541d16c3ea22.png", alt="email")
14
- a.rss-plan-item.rss-plan-rss(href=theme.footer.rss.rssOA, title="rss")
14
+ a.rss-plan-item.rss-plan-rss(href=page.rssOA, title="rss")
15
15
  .rss-plan-description 推送全部文章<br>推送简介
16
16
  .rss-plan-info-group
17
17
  .rss-plan-title RSS
@@ -1,19 +1,19 @@
1
+ include ../widgets/page/banner
1
2
  if theme.says.enable
2
- include ../widgets/page/banner
3
3
  #bber
4
4
  section.timeline.page-1
5
5
  ul.list#waterfall
6
- - var limitedList = site.data.essay.essay_list.slice(0, 30)
7
- each item in limitedList
8
- li.item
9
- if theme.says.style === 2
10
- include ../widgets/page/says/saysMeta
11
- include ../widgets/page/says/saysContent
12
- include ../widgets/page/says/saysFunction
13
- if theme.says.style === 1
14
- hr
15
- include ../widgets/page/says/saysBottom
16
- #bber-tips - 只展示最近30条短文 -
17
-
18
- script.
19
- sco.reflashEssayWaterFall()
6
+ case theme.says.mode
7
+ when 'local'
8
+ include ../widgets/page/says/local
9
+ when 'json'
10
+ include ../widgets/page/says/json
11
+ when 'memos'
12
+ include ../widgets/page/says/memos
13
+ #bber-tips
14
+ if theme.says.strip === -1
15
+ | - 已展开所有短文 -
16
+ else
17
+ | - 只展示最近 #{theme.says.strip} 条短文 -
18
+ else
19
+ include ./not_configured.pug
File without changes
@@ -1,3 +1,4 @@
1
+ - var item_suffix = ''
1
2
  include ../widgets/page/banner
2
3
  .flink#article-container
3
4
  each data in site.data.tlink.links
File without changes
File without changes
@@ -2,19 +2,19 @@
2
2
  - var noSticky, Sticky, customNoSticky, customSticky;
3
3
  if(is_home())
4
4
  - noSticky = theme.aside.home.noSticky.split(',')
5
- - Sticky = theme.aside.home.Sticky.split(',')
6
5
  - customNoSticky = site.data.aside?.home?.noSticky
7
6
  - customSticky = site.data.aside?.home?.Sticky
7
+ - Sticky = theme.aside.home.Sticky.split(',')
8
8
  else if(is_post())
9
9
  - noSticky = theme.aside.post.noSticky.split(',')
10
- - Sticky = theme.aside.post.Sticky.split(',')
11
10
  - customNoSticky = site.data.aside?.post?.noSticky
12
11
  - customSticky = site.data.aside?.post?.Sticky
12
+ - Sticky = theme.aside.post.Sticky.split(',')
13
13
  else if(is_page() || is_archive() || is_tag() || is_category())
14
14
  - noSticky = theme.aside.page.noSticky.split(',')
15
- - Sticky = theme.aside.page.Sticky.split(',')
16
15
  - customNoSticky = site.data.aside?.page?.noSticky
17
16
  - customSticky = site.data.aside?.page?.Sticky
17
+ - Sticky = theme.aside.page.Sticky.split(',')
18
18
  each item in noSticky
19
19
  include ./asideSwitch.pug
20
20
  if customNoSticky
@@ -23,8 +23,8 @@
23
23
  .sticky_layout
24
24
  if page.toc
25
25
  include ./asideToc.pug
26
- each item in Sticky
27
- include ./asideSwitch.pug
28
26
  if customSticky
29
27
  each item in customSticky
30
- include ./asideCustom.pug
28
+ include ./asideCustom.pug
29
+ each item in Sticky
30
+ include ./asideSwitch.pug
File without changes
File without changes
@@ -2,5 +2,5 @@
2
2
  .item-headline
3
3
  i(class=item.icon)
4
4
  span=item.name
5
- .item-content
5
+ div(class=item.class_content ||'item-content', id=item.id_content, style=item.style_content)
6
6
  != item.html
File without changes
@@ -11,10 +11,10 @@
11
11
  .author-info__description!= theme.aside.card.content
12
12
  .author-info__description2!= theme.aside.card.content2
13
13
  .author-info__bottom-group
14
- a.author-info__bottom-group-left(href=theme.about ? "/about" : "/")
14
+ a.author-info__bottom-group-left(href=theme.about ? "/about/" : "/")
15
15
  .author-info__name= config.author
16
16
  .author-info__desc!= config.subtitle
17
17
  .card-info-social-icons.is-center
18
- each value, key in theme.aside.card.information
18
+ each value, key in theme.aside.card.information || []
19
19
  a.social-icon(href=url_for(value.url), title=key)
20
- i(class=value.icon)
20
+ i.scoicon(class=value.icon)
File without changes
@@ -3,10 +3,6 @@ case item
3
3
  include ./asideInfoCard.pug
4
4
  when 'flip'
5
5
  include ./asideFlipCard.pug
6
- when 'welcome'
7
- include ./asideWelcome.pug
8
- when 'history'
9
- include ./asideHistory.pug
10
6
  when 'newestPost'
11
7
  include ./asideNewestPost.pug
12
8
  when 'allInfo'
@@ -2,7 +2,7 @@
2
2
  each tag in site.tags.find({ parent: { $exists: false } }).data
3
3
  a(href=url_for(tag.path))= tag.name
4
4
  sup= tag.length
5
- if site.tags.length > 50
5
+ if site.tags.length > theme.aside.tags.limit
6
6
  a#more-tags-btn(href="javascript:void(0);", onclick="sco.openAllTags();")= __('aside.tagmore')
7
7
  else
8
8
  style.
File without changes
@@ -5,7 +5,7 @@
5
5
  i.item-icon.scoicon.sco-folder-fill
6
6
  .item-name= __('aside.postcount')
7
7
  .item-count= site.posts.length
8
- if theme.thirdparty.busuanzi
8
+ if theme.busuanzi
9
9
  if theme.aside.siteinfo.pv
10
10
  .webinfo-item
11
11
  .webinfo-item-title
@@ -32,7 +32,7 @@
32
32
  i.item-icon.scoicon.sco-loop-left-fill
33
33
  .item-name= __('aside.updatetime')
34
34
  time.item-count(datetime=new Date())
35
- if theme.thirdparty.wordcount && theme.aside.siteinfo.wordcount
35
+ if theme.wordcount && theme.aside.siteinfo.wordcount
36
36
  .webinfo-item
37
37
  .webinfo-item-title
38
38
  i.item-icon.scoicon.sco-word-fill
File without changes
@@ -0,0 +1,22 @@
1
+ script.
2
+ !async function () {
3
+ const htmlTagRegex = /<[^>]+>/g;
4
+
5
+ await fetch('!{theme.says.mode_link}')
6
+ .then(res => res.json())
7
+ .then(res => {
8
+ let list = res.filter(item => item.content).slice(0, 10);
9
+
10
+ document.querySelector('#bber-talk').innerHTML = list.map(item => {
11
+ let content = item.content ? item.content.replace(htmlTagRegex, '') : '';
12
+ content += item.image ? '<i class="scoicon scp-image-fill"></i>' : '';
13
+ content += item.aplayer ? '<i class="scoicon sco-disc-fill"></i>' : '';
14
+ content += item.video ? '<i class="scoicon sco-video-fill"></i>' : '';
15
+ content += item.bilibili ? '<i class="scoicon sco-bilibili-line"></i>' : '';
16
+ content += item.link ? `<i class="scoicon sco-link"></i>` : '';
17
+ return `<div class="li-style swiper-slide">${content}</div>`;
18
+ }).join('');
19
+
20
+ sco.initbbtalk();
21
+ }).catch(err => console.log('bbtime |', err));
22
+ }();
@@ -0,0 +1,17 @@
1
+ each item, i in site.data.essay.essay_list.slice(0, 10)
2
+ .li-style.swiper-slide
3
+ | #{item.content}
4
+ if item.image
5
+ i.scoicon.sco-image-fill
6
+ if item.aplayer
7
+ i.scoicon.sco-disc-fill
8
+ if item.video
9
+ i.scoicon.sco-video-fill
10
+ if item.bilibili
11
+ i.scoicon.sco-bilibili-line
12
+ if item.link
13
+ i.scoicon.sco-links
14
+ script.
15
+ document.addEventListener('DOMContentLoaded', function () {
16
+ sco.initbbtalk()
17
+ })
@@ -0,0 +1,25 @@
1
+ script.
2
+ !async function () {
3
+ await fetch('!{theme.says.mode_link}')
4
+ .then(response => response.json())
5
+ .then(data => {
6
+ let aplayerRegex = /{aplayer,(.*?),(.*?)}/g;
7
+ let bilibiliRegex = /{bilibili,(.*?)}/g;
8
+ let playerRegex = /{player,(.*?)}/g;
9
+ let linkRegex = /(?<!\!)\[([^\]]*)\]\(([^\)]*)\)/g;
10
+ let imageRegex = /!\[\]\((.*?)\)/g;
11
+ let contentRegex = /#.*?\s([^{\n]*)/g
12
+ const list = data.slice(0, 10)
13
+ document.querySelector('#bber-talk').innerHTML = list.map(item => {
14
+ let content = item.content.match(contentRegex, '$1').map(item => item.replace(contentRegex, '$1'));
15
+ let imageBox = item.content.match(imageRegex) ? '<i class="scoicon sco-image-fill"></i>' : '';
16
+ let aplayer = item.content.match(aplayerRegex) ? '<i class="scoicon sco-disc-fill"></i>' : '';
17
+ let video = item.content.match(playerRegex) ? '<i class="scoicon sco-video-fill"></i>' : item.content.match(bilibiliRegex) ? '<i class="scoicon sco-bilibili-line"></i>' : '';
18
+ let link = item.content.match(linkRegex) ? `<i class="scoicon sco-link"></i>` : '';
19
+
20
+ return `<div class="li-style swiper-slide">${content+aplayer+video+imageBox+link}</div>`
21
+ }).join(' ')
22
+ sco.initbbtalk()
23
+ })
24
+ .catch(error => console.error('bbtime | ', error));
25
+ }()
@@ -1,8 +1,12 @@
1
- .bbTimeList.container#bbTimeList
2
- i.bber-logo.scoicon.sco-bblogo(onclick="pjax.loadUrl('/essay/')")
3
- .swiper-container.swiper-no-swiping.swiper-container-initialized.swiper-container-vertical.swiper-container-pointer-events#bbtalk(tabindex="-1", onclick="pjax.loadUrl('/essay/')")
1
+ .bbTimeList.container#bbTimeList(class=is_home_first_page() ? '' : 'more-page')
2
+ i.bber-logo.scoicon.sco-bblogo(onclick=`pjax.loadUrl('/essay/')`)
3
+ .swiper-container.swiper-no-swiping.swiper-container-initialized.swiper-container-vertical.swiper-container-pointer-events#bbtalk(tabindex="-1" onclick=`pjax.loadUrl('/essay/')`)
4
4
  .swiper-wrapper#bber-talk
5
- each item, i in site.data.essay.essay_list
6
- if i < 10
7
- .li-style.swiper-slide= item.image ? item.content + _p('home.bbtime.image') : item.content
8
- i.bber-gotobb.scoicon.sco-right-btn-fill(title=_p('home.bbtime.text'), onclick="pjax.loadUrl('/essay/')")
5
+ case theme.says.mode
6
+ when 'local'
7
+ include bb/local
8
+ when 'json'
9
+ include bb/json
10
+ when 'memos'
11
+ include bb/memos
12
+ i.bber-gotobb.scoicon.sco-right-btn-fill(title=_p('home.bbtime.text') onclick=`pjax.loadUrl('/essay/')`)
File without changes
@@ -6,4 +6,4 @@ each groupName, index in groupNames
6
6
  .categoryItem(style=`box-shadow: var(${styles[index]});`)
7
7
  a.categoryButton(class=classes[index], href=url_for(theme.hometop.categoryGroup[groupName].url))
8
8
  span.categoryButtonText= theme.hometop.categoryGroup[groupName].name
9
- i(class=theme.hometop.categoryGroup[groupName].icon)
9
+ i.scoicon(class=theme.hometop.categoryGroup[groupName].icon)
File without changes
File without changes
File without changes
File without changes
@@ -9,7 +9,7 @@
9
9
  each childValue, y in value.child
10
10
  li
11
11
  a.site-page.child(href=url_for(childValue.url))
12
- i(class=childValue.icon)
12
+ i.scoicon(class=childValue.icon)
13
13
  span= y
14
14
  else
15
15
  a.site-page.not-child(href=url_for(value.url))