hexo-theme-solitude 1.2.6 → 1.3.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 (263) 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 +502 -297
  5. package/languages/en-US.yml +105 -8
  6. package/languages/zh-CN.yml +98 -1
  7. package/layout/archive.pug +4 -5
  8. package/layout/category.pug +4 -5
  9. package/layout/includes/body/mode.pug +40 -0
  10. package/layout/includes/console.pug +15 -16
  11. package/layout/includes/footer.pug +26 -28
  12. package/layout/includes/head/config.pug +27 -8
  13. package/layout/includes/head/fest.pug +22 -0
  14. package/layout/includes/head/opengraph.pug +11 -0
  15. package/layout/includes/head.pug +1 -3
  16. package/layout/includes/header.pug +1 -1
  17. package/layout/includes/inject/body.pug +36 -13
  18. package/layout/includes/inject/head.pug +30 -20
  19. package/layout/includes/layout.pug +12 -8
  20. package/layout/includes/loading.pug +1 -64
  21. package/layout/includes/mixins/articleSort.pug +4 -4
  22. package/layout/includes/mixins/pagination.pug +1 -1
  23. package/layout/includes/nav.pug +10 -10
  24. package/layout/includes/page/about.pug +1 -0
  25. package/layout/includes/page/categories.pug +3 -3
  26. package/layout/includes/page/default.pug +1 -1
  27. package/layout/includes/page/echarts.pug +3 -3
  28. package/layout/includes/page/equipment.pug +0 -1
  29. package/layout/includes/page/links.pug +5 -26
  30. package/layout/includes/page/moments.pug +0 -1
  31. package/layout/includes/page/music.pug +19 -0
  32. package/layout/includes/page/not_configured.pug +18 -0
  33. package/layout/includes/page/rss.pug +20 -22
  34. package/layout/includes/page/says.pug +1 -2
  35. package/layout/includes/page/tags.pug +3 -3
  36. package/layout/includes/page/tlink.pug +0 -1
  37. package/layout/includes/sidebar.pug +7 -7
  38. package/layout/includes/widgets/aside/aside.pug +13 -1
  39. package/layout/includes/widgets/aside/asideArchive.pug +5 -3
  40. package/layout/includes/widgets/aside/asideCustom.pug +6 -0
  41. package/layout/includes/widgets/aside/asideHistory.pug +3 -3
  42. package/layout/includes/widgets/aside/asideInfoCard.pug +4 -6
  43. package/layout/includes/widgets/aside/asideNewestPost.pug +1 -1
  44. package/layout/includes/widgets/aside/asideSwitch.pug +0 -11
  45. package/layout/includes/widgets/aside/asideTag.pug +2 -2
  46. package/layout/includes/widgets/aside/asideToc.pug +1 -1
  47. package/layout/includes/widgets/aside/asideWebInfo.pug +6 -6
  48. package/layout/includes/widgets/aside/asideWelcome.pug +1 -1
  49. package/layout/includes/widgets/home/banner.pug +2 -2
  50. package/layout/includes/widgets/home/bbTimeList.pug +3 -3
  51. package/layout/includes/widgets/home/categoryBar.pug +3 -3
  52. package/layout/includes/widgets/home/categoryGroup.pug +2 -2
  53. package/layout/includes/widgets/home/hometop.pug +7 -7
  54. package/layout/includes/widgets/home/postList.pug +12 -8
  55. package/layout/includes/widgets/home/topGroup.pug +17 -13
  56. package/layout/includes/widgets/nav/left.pug +6 -6
  57. package/layout/includes/widgets/nav/menu.pug +4 -4
  58. package/layout/includes/widgets/nav/right.pug +14 -14
  59. package/layout/includes/widgets/page/about/authorinfo.pug +1 -1
  60. package/layout/includes/widgets/page/about/award.pug +11 -9
  61. package/layout/includes/widgets/page/about/contentinfo.pug +7 -7
  62. package/layout/includes/widgets/page/about/hobbies.pug +1 -1
  63. package/layout/includes/widgets/page/about/motto.pug +2 -2
  64. package/layout/includes/widgets/page/about/other.pug +10 -9
  65. package/layout/includes/widgets/page/about/personalities.pug +2 -2
  66. package/layout/includes/widgets/page/about/skillsinfo.pug +10 -12
  67. package/layout/includes/widgets/page/about/tenyear.pug +48 -0
  68. package/layout/includes/widgets/page/banner.pug +2 -2
  69. package/layout/includes/widgets/page/links/banner.pug +12 -14
  70. package/layout/includes/widgets/page/links/linksItem.pug +0 -1
  71. package/layout/includes/widgets/page/moments/angle.pug +7 -12
  72. package/layout/includes/widgets/page/moments/index.pug +7 -2
  73. package/layout/includes/widgets/post/award.pug +12 -8
  74. package/layout/includes/widgets/post/copyright.pug +16 -14
  75. package/layout/includes/widgets/post/postMeta.pug +36 -25
  76. package/layout/includes/widgets/post/postNav.pug +15 -15
  77. package/layout/includes/widgets/randomlink.pug +10 -5
  78. package/layout/includes/widgets/rightside/index.pug +9 -8
  79. package/layout/includes/widgets/third-party/ai/index.pug +12 -0
  80. package/layout/includes/widgets/third-party/comments/comment.pug +6 -1
  81. package/layout/includes/widgets/third-party/comments/twikoo.pug +5 -4
  82. package/layout/includes/widgets/third-party/comments/waline.pug +4 -5
  83. package/layout/includes/widgets/third-party/music.pug +1 -1
  84. package/layout/includes/widgets/third-party/pjax.pug +6 -1
  85. package/layout/includes/widgets/third-party/search/algolia-search.pug +4 -3
  86. package/layout/includes/widgets/third-party/search/index.pug +2 -2
  87. package/layout/includes/widgets/third-party/search/local-search.pug +3 -3
  88. package/layout/index.pug +5 -6
  89. package/layout/page.pug +34 -29
  90. package/layout/post.pug +3 -23
  91. package/layout/tag.pug +3 -3
  92. package/package.json +2 -2
  93. package/scripts/filter/checkThemeConfig.js +0 -5
  94. package/scripts/helper/cdn.js +12 -0
  95. package/scripts/helper/page.js +13 -0
  96. package/scripts/helper/related_post.js +0 -1
  97. package/scripts/tags/button.js +21 -0
  98. package/scripts/tags/card.js +9 -0
  99. package/scripts/tags/checkbox.js +51 -0
  100. package/scripts/tags/fold.js +0 -5
  101. package/scripts/tags/image.js +75 -0
  102. package/scripts/tags/inline-image.js +12 -0
  103. package/scripts/tags/label.js +10 -0
  104. package/scripts/tags/link.js +2 -0
  105. package/scripts/tags/media.js +29 -0
  106. package/scripts/tags/span.js +17 -0
  107. package/scripts/tags/timeline.js +2 -15
  108. package/scripts/tags/u.js +7 -0
  109. package/source/css/_global/animation.css +57 -0
  110. package/source/css/_global/index.styl +5 -20
  111. package/source/css/_global/var.styl +16 -1
  112. package/source/css/_layout/{base.styl → basic.styl} +24 -116
  113. package/source/css/_layout/header.styl +204 -616
  114. package/source/css/_layout/index.styl +29 -271
  115. package/source/css/_mode/index.styl +102 -93
  116. package/source/css/_page/_home/category-bar.styl +74 -0
  117. package/source/css/_page/_home/home-top.styl +541 -0
  118. package/source/css/_page/_home/index.styl +15 -0
  119. package/source/css/_page/_home/pagination.styl +176 -0
  120. package/source/css/_page/_home/recent-post.styl +204 -0
  121. package/source/css/_page/about/index.styl +1 -0
  122. package/source/css/_page/about/tenyear.styl +56 -0
  123. package/source/css/_page/about.styl +555 -626
  124. package/source/css/_page/category.styl +95 -119
  125. package/source/css/_page/douban.styl +126 -0
  126. package/source/css/_page/equipment.styl +100 -99
  127. package/source/css/_page/error.styl +130 -146
  128. package/source/css/_page/home.styl +41 -50
  129. package/source/css/_page/index.styl +42 -10
  130. package/source/css/_page/links.styl +306 -0
  131. package/source/css/_page/moment.styl +51 -51
  132. package/source/css/_page/music.styl +506 -0
  133. package/source/css/_page/rss.styl +62 -67
  134. package/source/css/_page/says.styl +375 -344
  135. package/source/css/_page/tag.styl +15 -13
  136. package/source/css/_widgets/{aside → _aside}/flip.styl +7 -5
  137. package/source/css/_widgets/{aside → _aside}/history.styl +9 -2
  138. package/source/css/_widgets/_aside/index.styl +96 -0
  139. package/source/css/_widgets/{aside → _aside}/info.styl +86 -89
  140. package/source/css/_widgets/{aside → _aside}/newPost.styl +7 -1
  141. package/source/css/_widgets/{aside → _aside}/toc.styl +28 -5
  142. package/source/css/_widgets/{comment → _comment}/index.styl +4 -12
  143. package/source/css/_widgets/{comment → _comment}/twikoo.styl +5 -2
  144. package/source/css/_widgets/{comment → _comment}/waline.styl +21 -5
  145. package/source/css/{_extra → _widgets/_extra}/console.styl +33 -10
  146. package/source/css/_widgets/_extra/fullpage.styl +46 -0
  147. package/source/css/_widgets/_extra/music.styl +218 -0
  148. package/source/css/_widgets/_extra/pace.styl +39 -0
  149. package/source/css/_widgets/_extra/rightmenu.styl +78 -0
  150. package/source/css/_widgets/_mixins/article-sort.styl +93 -0
  151. package/source/css/_widgets/_mixins/footer.styl +273 -0
  152. package/source/css/_widgets/_mixins/other.styl +34 -0
  153. package/source/css/_widgets/_mixins/sidebar.styl +230 -0
  154. package/source/css/_widgets/_post/_highlight/diff.styl +75 -0
  155. package/source/css/_widgets/_post/_highlight/index.styl +144 -0
  156. package/source/css/_widgets/_post/_highlight/theme/default.styl +12 -0
  157. package/source/css/_widgets/_post/_highlight/theme/mac.styl +25 -0
  158. package/source/css/_widgets/_post/_highlight/theme.styl +68 -0
  159. package/source/css/_widgets/_post/commentBarrage.styl +144 -0
  160. package/source/css/_widgets/_post/content.styl +152 -0
  161. package/source/css/_widgets/_post/copyright.styl +98 -0
  162. package/source/css/_widgets/_post/index.styl +20 -0
  163. package/source/css/_widgets/_post/meta.styl +420 -0
  164. package/source/css/_widgets/_post/pagination.styl +177 -0
  165. package/source/css/_widgets/_post/postAI.styl +131 -0
  166. package/source/css/{_post → _widgets/_post}/relatedPost.styl +4 -1
  167. package/source/css/_widgets/_post/tools.styl +249 -0
  168. package/source/css/{_search → _widgets/_search}/algolia-search.styl +4 -0
  169. package/source/css/{_search → _widgets/_search}/local-search.styl +15 -5
  170. package/source/css/_widgets/_tags/button.styl +60 -0
  171. package/source/css/_widgets/_tags/bvideo.styl +8 -0
  172. package/source/css/_widgets/_tags/card.styl +52 -0
  173. package/source/css/_widgets/_tags/checkbox.styl +85 -0
  174. package/source/css/_widgets/_tags/fold.styl +79 -0
  175. package/source/css/_widgets/_tags/image.styl +10 -0
  176. package/source/css/_widgets/_tags/index.styl +61 -0
  177. package/source/css/_widgets/_tags/inline-image.styl +6 -0
  178. package/source/css/_widgets/_tags/label.styl +3 -0
  179. package/source/css/_widgets/_tags/link.styl +80 -0
  180. package/source/css/_widgets/_tags/note.styl +101 -0
  181. package/source/css/_widgets/_tags/span.styl +61 -0
  182. package/source/css/_widgets/_tags/tabs.styl +105 -0
  183. package/source/css/_widgets/_tags/timeline.styl +80 -0
  184. package/source/css/_widgets/index.styl +50 -1
  185. package/source/css/index.styl +0 -25
  186. package/source/js/{commentBarrage.js → extend/comment/twikoo/commentBarrage.js} +0 -4
  187. package/source/js/extend/comment/{twikoo.js → twikoo/twikoo.js} +12 -40
  188. package/source/js/extend/comment/waline/commentBarrage.js +155 -0
  189. package/source/js/extend/comment/{waline.js → waline/waline.js} +10 -11
  190. package/source/js/extend/search/algolia-search.js +1 -5
  191. package/source/js/extend/search/local-search.js +33 -13
  192. package/source/js/main.js +135 -171
  193. package/source/js/music.js +129 -0
  194. package/source/js/utils.js +4 -7
  195. package/source/lib/cover-color.min.js +7 -0
  196. package/source/lib/rightside.min.js +1 -0
  197. package/source/lib/sco-ai.min.js +8 -0
  198. package/source/lib/snackbar.min.css +1 -1
  199. package/source/lib/txmap.min.js +1 -0
  200. package/source/lib/universe.min.js +1 -0
  201. package/source/lib/view-image.min.js +1 -1
  202. package/layout/includes/widgets/aside/asidePower.pug +0 -19
  203. package/layout/includes/widgets/home/rencentPost.pug +0 -26
  204. package/source/css/_extra/rightmenu.styl +0 -83
  205. package/source/css/_layout/articleSort.styl +0 -199
  206. package/source/css/_layout/footer.styl +0 -359
  207. package/source/css/_layout/sidebar.styl +0 -226
  208. package/source/css/_page/homeTop.styl +0 -1035
  209. package/source/css/_page/link.styl +0 -433
  210. package/source/css/_post/commentBarrage.styl +0 -149
  211. package/source/css/_post/externalTags.styl +0 -694
  212. package/source/css/_post/highlight.styl +0 -96
  213. package/source/css/_post/index.styl +0 -935
  214. package/source/css/_post/pagination.styl +0 -467
  215. package/source/css/_post/postContent.styl +0 -957
  216. package/source/css/_post/reward.styl +0 -217
  217. package/source/css/_widgets/aside/index.styl +0 -156
  218. package/source/css/_widgets/aside/power.styl +0 -90
  219. package/source/img/logo-horizontal_version.png +0 -0
  220. package/source/img/pwa/16.png +0 -0
  221. package/source/img/pwa/180.png +0 -0
  222. package/source/img/pwa/192.png +0 -0
  223. package/source/img/pwa/32.png +0 -0
  224. package/source/img/pwa/512.png +0 -0
  225. package/source/img/pwa/logo.png +0 -0
  226. package/source/img/pwa/siteicon/splash-1125x2436.png +0 -0
  227. package/source/img/pwa/siteicon/splash-1136x640.png +0 -0
  228. package/source/img/pwa/siteicon/splash-1170x2532.png +0 -0
  229. package/source/img/pwa/siteicon/splash-1179x2556.png +0 -0
  230. package/source/img/pwa/siteicon/splash-1242x2208.png +0 -0
  231. package/source/img/pwa/siteicon/splash-1242x2688.png +0 -0
  232. package/source/img/pwa/siteicon/splash-1248x2778.png +0 -0
  233. package/source/img/pwa/siteicon/splash-1290x2796.png +0 -0
  234. package/source/img/pwa/siteicon/splash-1334x750.png +0 -0
  235. package/source/img/pwa/siteicon/splash-1536x2048.png +0 -0
  236. package/source/img/pwa/siteicon/splash-1620x2160.png +0 -0
  237. package/source/img/pwa/siteicon/splash-1668x2224.png +0 -0
  238. package/source/img/pwa/siteicon/splash-1668x2388.png +0 -0
  239. package/source/img/pwa/siteicon/splash-1792x828.png +0 -0
  240. package/source/img/pwa/siteicon/splash-2048x1536.png +0 -0
  241. package/source/img/pwa/siteicon/splash-2048x2732.png +0 -0
  242. package/source/img/pwa/siteicon/splash-2160x1620.png +0 -0
  243. package/source/img/pwa/siteicon/splash-2208x1242.png +0 -0
  244. package/source/img/pwa/siteicon/splash-2224x1668.png +0 -0
  245. package/source/img/pwa/siteicon/splash-2388x1668.png +0 -0
  246. package/source/img/pwa/siteicon/splash-2436x1125.png +0 -0
  247. package/source/img/pwa/siteicon/splash-2532x1170.png +0 -0
  248. package/source/img/pwa/siteicon/splash-2556x1179.png +0 -0
  249. package/source/img/pwa/siteicon/splash-2688x1242.png +0 -0
  250. package/source/img/pwa/siteicon/splash-2732x2048.png +0 -0
  251. package/source/img/pwa/siteicon/splash-2778x1248.png +0 -0
  252. package/source/img/pwa/siteicon/splash-2796x1290.png +0 -0
  253. package/source/img/pwa/siteicon/splash-640x1136.png +0 -0
  254. package/source/img/pwa/siteicon/splash-750x1334.png +0 -0
  255. package/source/img/pwa/siteicon/splash-828x1792.png +0 -0
  256. package/source/img/solitude-show.jpg +0 -0
  257. package/source/js/extend/covercolor/local.js +0 -160
  258. package/source/js/rightside.js +0 -402
  259. package/source/js/txmap.js +0 -236
  260. package/source/lib/chuckle-post-ai.js +0 -1
  261. /package/source/css/_widgets/{aside → _aside}/allinfo.styl +0 -0
  262. /package/source/css/_widgets/{aside → _aside}/welcome.styl +0 -0
  263. /package/source/img/{theme/avatar.png → avatar.png} +0 -0
@@ -1,21 +1,21 @@
1
1
  - cdn = theme.cdn.body
2
+ - page.type = is_post() ? 'post' : page.type
2
3
 
3
4
  script(src=url_for(cdn.pjaxjs))
4
5
  if theme.lazyload.enable
5
- script(src=url_for(cdn.lazyloadjs))
6
- script(src=url_for(cdn.snackbarjs))
6
+ script(src=cdn_url_for("/lib/lazyload.min.js"))
7
+ script(src=cdn_url_for("/lib/snackbar.min.js"))
7
8
  if theme.lightbox
8
- script(src=url_for(cdn.viewimagejs))
9
+ script(src=cdn_url_for("/lib/view-image.min.js"))
9
10
  if theme.says.home_mini || theme.aside.history.enable
10
11
  script(src=url_for(cdn.swiperjs))
11
12
 
12
13
  if theme.rightside.enable
13
14
  include ../widgets/rightside/index.pug
14
- script(src='/js/rightside.js')
15
+ script(src=cdn_url_for("/lib/rightside.min.js"))
15
16
 
16
17
  div#js-pjax
17
18
  if page.type === 'says'
18
- script(src=url_for(cdn.waterfalljs))
19
19
  script.
20
20
  window.addEventListener('resize', utils.throttle(function () {
21
21
  if (document.getElementById('waterfall')) {
@@ -30,18 +30,29 @@ div#js-pjax
30
30
  is_post: !{is_post()},
31
31
  is_page: !{is_page()},
32
32
  is_home: !{is_home()},
33
- page: '!{page.type || 'default'}',
33
+ page: '!{page.type}',
34
34
  toc: !{!!page.toc},
35
35
  comment: !{!!page.comment},
36
36
  }
37
- if theme.thirdparty.aplayer.enable
37
+
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
38
43
  script(src=url_for(cdn.aplayerjs))
39
44
  script(src=url_for(cdn.metingjs))
40
45
  script.
41
46
  const meting_api = '!{theme.thirdparty.aplayer.api}';
42
47
 
43
- if theme.post.covercolor
44
- script(src='/js/extend/covercolor/local.js')
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"))
45
56
 
46
57
  if theme.footer.randomlink
47
58
  include ../widgets/randomlink.pug
@@ -51,20 +62,32 @@ if page.katex
51
62
  script(src=url_for(cdn.katexjs))
52
63
 
53
64
  if theme.aside.welcome.enable
54
- script(src='/js/txmap.js')
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"))
55
70
 
56
71
  if theme.comment.enable
57
72
  case theme.comment.type
58
73
  when 'twikoo'
59
- script(src='/js/extend/comment/twikoo.js')
60
- script(src='/js/commentBarrage.js')
74
+ script(src=cdn_url_for("/js/extend/comment/twikoo/twikoo.js"))
75
+ script(src=cdn_url_for("/js/extend/comment/twikoo/commentBarrage.js"))
61
76
  when 'waline'
62
- script(src='/js/extend/comment/waline.js')
77
+ script(src=cdn_url_for("/js/extend/comment/waline/waline.js"))
78
+ script(src=cdn_url_for("/js/extend/comment/waline/commentBarrage.js"))
63
79
 
64
80
 
65
81
  // pjax
66
82
  include ../widgets/third-party/pjax.pug
67
83
 
84
+ // theme
85
+ include ../body/mode
86
+
87
+ // music
88
+ if theme.music.enable
89
+ script(src=cdn_url_for("/js/music.js"))
90
+
68
91
  // inject custom body
69
92
  if theme.extends.body
70
93
  each item in theme.extends.body
@@ -6,15 +6,11 @@ if theme.verify.baidu
6
6
  if theme.verify.google
7
7
  meta(name="google-site-verification", content=theme.verify.google)
8
8
 
9
- if theme.loading.pace
10
- script(src=cdn.pace, data-pace-options='{ "restartOnRequestAfter":false,"eventLag":false}')
11
-
12
- // pwa
13
- if theme.pwa.enable
14
- include ../head/pwa.pug
9
+ if theme.verify.sougou
10
+ meta(name="sogou_site_verification", content=theme.verify.sougou)
15
11
 
16
12
  link(rel="stylesheet", href=cdn.scoicon)
17
- link(rel="stylesheet", href=cdn.snackbarcss)
13
+ link(rel="stylesheet", href=cdn_url_for("/lib/snackbar.min.css"))
18
14
 
19
15
  // comment
20
16
  if theme.comment.enable
@@ -25,6 +21,10 @@ if theme.comment.enable
25
21
  script(src=cdn.walinejs)
26
22
  link(rel="stylesheet", href=cdn.walinecss)
27
23
 
24
+ // pace 胶囊加载条(Capsule loading bar)
25
+ if theme.loading.pace
26
+ script(src=cdn.pacejs)
27
+
28
28
  // search
29
29
  if theme.thirdparty.search.enable
30
30
  if theme.thirdparty.search.type === 'algolia'
@@ -34,26 +34,28 @@ if theme.thirdparty.search.enable
34
34
  script(src=url_for(cdn.lunrjs))
35
35
 
36
36
  // aplayer
37
- if theme.thirdparty.aplayer.enable
37
+ if theme.thirdparty.aplayer.enable || theme.music.enable
38
38
  link(rel="stylesheet", href=cdn.aplayercss)
39
39
 
40
40
  // swiper
41
41
  if theme.says.home_mini || theme.aside.history.enable
42
42
  link(rel="stylesheet", href=cdn.swipercss)
43
43
 
44
- // custom inject
45
- if theme.extends.head
46
- each item in theme.extends.head
47
- != item
48
-
49
- // post-ai
50
- if theme.thirdparty.ai.enable
51
- script(src='/lib/chuckle-post-ai.js')
52
-
53
44
  // echarts
54
45
  if theme.about.echarts.enable && theme.about.enable
55
46
  script(src=url_for(cdn.echartsjs))
56
47
 
48
+ // 灰色纪念日(Gray Anniversary)
49
+ if theme.fest.enable
50
+ include ../head/fest.pug
51
+
52
+ // Open Graph
53
+ include ../head/opengraph.pug
54
+
55
+ // pwa
56
+ if theme.pwa.enable
57
+ include ../head/pwa.pug
58
+
57
59
  script.
58
60
  (win => {
59
61
  win.saveToLocal = {
@@ -106,8 +108,16 @@ script.
106
108
  }
107
109
  )(window)
108
110
 
109
- console.log("%c🔥 程序:Hexo | 主题:Hexo-Theme-Solitude | 作者:DuoSco团队 | 官网:https://github.com/DuoSco/Hexo-theme-solitude 😋", "color:#fff; background: linear-gradient(270deg, #18d7d3, #68b7dd, #8695e6, #986fee); padding: 8px 15px; border-radius: 8px");
111
+ console.log(
112
+ "%c🔥 !{_p('head.console')}",
113
+ "color: #fff; background: linear-gradient(-25deg, #a8edea, #fed6e3); padding: 8px 15px; border-radius: 8px; text-shadow: 2px 2px 4px white; color: black;"
114
+ );
110
115
 
111
116
  div
112
- script(src="/js/utils.js")
113
- script(src="/js/main.js")
117
+ script(src=cdn_url_for("/js/utils.js"))
118
+ script(src=cdn_url_for("/js/main.js"))
119
+
120
+ // custom inject
121
+ if theme.extends.head
122
+ each item in theme.extends.head
123
+ != item
@@ -1,8 +1,11 @@
1
+ - page.type = is_home() ? 'solitude' : page.type
2
+
1
3
  doctype html
2
4
  html(lang=config.language, data-theme="light")
3
5
  head
4
6
  include ./head.pug
5
- body(id="body")
7
+ body#body(data-type=page.type)
8
+ canvas#universe
6
9
  // loading
7
10
  if theme.loading.fullpage
8
11
  include ./loading.pug
@@ -13,17 +16,17 @@ html(lang=config.language, data-theme="light")
13
16
  // sidebar
14
17
  include ./sidebar.pug
15
18
 
16
- if(page.type !== '404')
17
- div(class = is_post() ? 'post' : 'page', id="body-wrap")
18
- include ./header.pug
19
+ #body-wrap(class = is_post() ? 'post' : 'page')
20
+ include ./header.pug
19
21
 
22
+ if(page.type !== '404')
20
23
  block content
21
24
 
22
25
  footer#footer
23
26
  include ./footer.pug
24
- else
25
- div.error#body-wrap
26
- block content
27
+ else
28
+ .error#body-wrap
29
+ block content
27
30
 
28
31
  // inject body
29
32
  include ./inject/body.pug
@@ -32,4 +35,5 @@ html(lang=config.language, data-theme="light")
32
35
  include ./widgets/third-party/search/index.pug
33
36
 
34
37
  // music
35
- include ./widgets/third-party/music.pug
38
+ if theme.thirdparty.aplayer.enable
39
+ include ./widgets/third-party/music.pug
@@ -22,67 +22,4 @@ script.
22
22
  });
23
23
  document.addEventListener('pjax:complete', () => {
24
24
  preloader.endLoading();
25
- });
26
- style.
27
- #loading-box {
28
- -webkit-user-select: none;
29
- }
30
-
31
- #loading-box .loading-bg {
32
- display: flex;
33
- width: 100%;
34
- height: 100%;
35
- position: fixed;
36
- background: var(--sco-background);
37
- z-index: 1999;
38
- opacity: 1;
39
- transition: 0.2s;
40
- pointer-events: all;
41
- animation: showLoading 0.3s 0s backwards;
42
- }
43
-
44
- #loading-box.loaded .loading-bg {
45
- pointer-events: none;
46
- transition: 0.2s;
47
- animation: hideLoading 0.3s 0s forwards;
48
- }
49
-
50
- #loading-box .loading-img {
51
- width: 100px;
52
- margin: auto;
53
- animation-duration: 0.2s;
54
- animation-name: loadingAction;
55
- border-radius: 50px;
56
- animation-iteration-count: infinite;
57
- animation-direction: alternate;
58
- }
59
-
60
- @keyframes loadingAction {
61
- from {
62
- opacity: 1;
63
- }
64
-
65
- to {
66
- opacity: 0.6;
67
- }
68
- }
69
-
70
- @keyframes hideLoading {
71
- from {
72
- opacity: 1;
73
- }
74
-
75
- to {
76
- opacity: 0;
77
- }
78
- }
79
-
80
- @keyframes showLoading {
81
- from {
82
- opacity: 0;
83
- }
84
-
85
- to {
86
- opacity: 1;
87
- }
88
- }
25
+ });
@@ -2,13 +2,13 @@
2
2
  each post in page.posts.find({ parent: { $exists: false } }).data
3
3
  if(year !== post.date.year())
4
4
  - year = post.date.year()
5
- div.article-sort-item.year #{year}
6
- div.article-sort-item
5
+ .article-sort-item.year #{year}
6
+ .article-sort-item
7
7
  a.article-sort-item-img(href=url_for(post.path) title=post.title)
8
8
  img(src=post.cover alt=post.title)
9
- div.article-sort-item-info
9
+ .article-sort-item-info
10
10
  a.article-sort-item-title(href=url_for(post.path) title=post.title onclick="window.event.cancelBubble=true;") #{post.title}
11
- div.article-sort-item-tags
11
+ .article-sort-item-tags
12
12
  each tags in post.tags.data
13
13
  a.article-meta__tags(href=url_for(tags.path) onclick="window.event.cancelBubble=true;")
14
14
  span.tags-punctuation #{tags.name}
@@ -4,5 +4,5 @@ nav#pagination
4
4
  !=paginator(options)
5
5
  div.toPageGroup
6
6
  input#toPageText(oninput="value=value.replace(/[^0-9]/g,'')", maxlength="3", title="跳转到指定页面", onkeyup="if (this.value === '0') this.value = ''")
7
- a#toPageButton(onclick="sco.toPage()", data-pjax-state="")
7
+ a#toPageButton(onclick="sco.toPage()")
8
8
  i.scoicon.sco-show-right-line
@@ -1,22 +1,22 @@
1
1
  nav#nav.show
2
- div#nav-group
3
- div#blog_name
2
+ #nav-group
3
+ #blog_name
4
4
  if theme.nav.left.enable
5
- div.back-home-button(tabindex="-1")
5
+ .back-home-button(tabindex="-1")
6
6
  i.back-home-button-icon.scoicon.sco-more-fill
7
7
  include ./widgets/nav/left.pug
8
- a#site-name(href="/", title="返回博客主页", traget="_self")
8
+ a#site-name(href="/", title=_p('nav.site_name_title'), target="_self")
9
9
  if theme.site.name.class === 'i_class'
10
10
  i.scoicon(class=theme.site.name.custom, style="font-size: 16px;")
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
14
  span.scoicon= theme.site.name.custom
15
- div#page-name-mask
16
- div#page-name
17
- a#page-name-text(onclick="sco.toTop()")= page.title || config.title
18
- div#menus
15
+ #page-name-mask
16
+ #page-name
17
+ a#page-name-text(onclick="sco.toTop()")= title || config.title
18
+ #menus
19
19
  include ./widgets/nav/menu.pug
20
- div#nav-left
21
- div#nav-right
20
+ #nav-left
21
+ #nav-right
22
22
  include ./widgets/nav/right.pug
@@ -7,4 +7,5 @@ if theme.about.enable && site.data.about
7
7
  include ../widgets/page/about/motto
8
8
  include ../widgets/page/about/hobbies
9
9
  include ../widgets/page/about/other
10
+ include ../widgets/page/about/tenyear
10
11
  include ../widgets/page/about/award
@@ -1,6 +1,6 @@
1
- h1.page-title(style='display: inline')= _p('page.category')
2
- div.category-lists
3
- div.tag-cloud-list.is-center
1
+ h1.page-title= _p('page.category')
2
+ .category-lists
3
+ .tag-cloud-list.is-center
4
4
  each item in site.categories.find({ parent: { $exists: false } }).data
5
5
  a(href=url_for(item.path))
6
6
  span.tags-punctuation
@@ -1,2 +1,2 @@
1
- div#article-container
1
+ #article-container
2
2
  != page.content
@@ -2,6 +2,6 @@
2
2
  - var tagLength = theme.about.echarts.tagLength
3
3
  - var categoryParent = ""+theme.about.echarts.categoryParent
4
4
 
5
- div#posts-chart(data-start=startDate, style="border-radius: 8px; height: 300px; padding: 10px;")
6
- div#tags-chart(data-length=tagLength, style="border-radius: 8px; height: 300px; padding: 10px;")
7
- div#categories-chart(data-parent=categoryParent, style="border-radius: 8px; height: 300px; padding: 10px;")
5
+ #posts-chart(data-start=startDate, style="border-radius: 8px; height: 300px; padding: 10px;")
6
+ #tags-chart(data-length=tagLength, style="border-radius: 8px; height: 300px; padding: 10px;")
7
+ #categories-chart(data-parent=categoryParent, style="border-radius: 8px; height: 300px; padding: 10px;")
@@ -1,3 +1,2 @@
1
- - var pageClass = "sharePage"
2
1
  include ../widgets/page/banner
3
2
  include ../widgets/page/equipment/content
@@ -1,35 +1,14 @@
1
- div.flink#banners
1
+ .flink#banners
2
2
  include ../widgets/page/links/banner
3
3
  if theme.thirdparty.circle.angle.enable
4
4
  include ../widgets/page/moments/angle
5
- div.flink#article-container
5
+ .flink#article-container
6
6
  each data in site.data.links.links
7
- h2= data.class_name
8
- div.flink-desc= data.descr
7
+ h2= data.class_name + " (" + data.link_list.length + ")"
8
+ .flink-desc= data.descr
9
9
  case data.type
10
10
  when 'card'
11
11
  include ../widgets/page/links/linksCard
12
12
  when 'item'
13
13
  include ../widgets/page/links/linksItem
14
- h3(align='end') ——本站友链排序不分先后,所有站点都值得一看。
15
- if theme.comment.enable
16
- h2(id="友情链接申请")= "友情链接申请"
17
- div#article-container!= page.content
18
- p 请<b>勾选</b>你符合的条件:
19
- div#friendlink_checkboxs
20
- p
21
- label
22
- input(type='checkbox', id='checkbox1', onclick='checkForm()')
23
- | 我已添加 <b>#{config.title}</b> 博客的友情链接
24
- p
25
- label
26
- input(type='checkbox', id='checkbox2', onclick='checkForm()')
27
- | 我的链接主体为 <b>个人</b>,网站类型为<b>博客</b>
28
- p
29
- label
30
- input(type='checkbox', id='checkbox3', onclick='checkForm()')
31
- | 我的网站现在可以在中国大陆区域正常访问
32
- p
33
- label
34
- input(type='checkbox', id='checkbox4', onclick='checkForm()')
35
- | 网站内容符合中国大陆法律法规
14
+ != page.content
@@ -1,4 +1,3 @@
1
- - var pageClass = "sharePage"
2
1
  include ../widgets/page/banner
3
2
  if theme.thirdparty.circle.angle.enable
4
3
  include ../widgets/page/moments/angle
@@ -0,0 +1,19 @@
1
+ if theme.music.enable
2
+ #Music-bg
3
+ #Music-page
4
+ .Music-loading
5
+ div APlayer加载中...
6
+
7
+ script.
8
+ if (!window.musicConfig) {
9
+ window.musicConfig = {
10
+ userId: '#{theme.music.id}',
11
+ userServer: "#{theme.music.server}",
12
+ userType: "#{theme.music.type}",
13
+ volume: #{theme.music.volume},
14
+ mutex: #{theme.music.mutex}
15
+ }
16
+ }
17
+
18
+ else
19
+ include not_configured
@@ -0,0 +1,18 @@
1
+ style.
2
+ .not-configured {
3
+ display: flex;
4
+ justify-content: center;
5
+ font-size: 18px;
6
+ font-weight: bold;
7
+ height: 80vh;
8
+ align-items: center
9
+ }
10
+ .not-configured strong {
11
+ padding: 0 4px;
12
+ border-bottom: 2px dotted var(--sco-lighttext)
13
+ }
14
+
15
+ .not-configured
16
+ .title 请前往
17
+ strong 主题配置文件
18
+ | 进行配置
@@ -1,22 +1,20 @@
1
- main.layout.hide-aside#content-inner
2
- #page
3
- .rss-plan-list
4
- a.rss-plan-item.rss-plan-wechat(href=theme.footer.rss.wechatOA, title="公众号", target="_blank")
5
- .rss-plan-description 推送精选文章<br>推送全文
6
- .rss-plan-info-group
7
- .rss-plan-title 公众号订阅
8
- .rss-plan-info 推荐的订阅方式
9
- img.rss-plan-icon(src="https://bu.dusays.com/2023/11/01/6541d14a4de78.png", alt="wechat")
10
- a.rss-plan-item.rss-plan-mail(href=theme.footer.rss.emailOA, rel="external nofollow", title="email", target="_blank")
11
- .rss-plan-description 推送全部文章<br>推送封面与简介
12
- .rss-plan-info-group
13
- .rss-plan-title 邮件订阅
14
- .rss-plan-info 推荐的订阅方式
15
- img.rss-plan-icon(src="https://bu.dusays.com/2023/11/01/6541d16c3ea22.png", alt="email")
16
- a.rss-plan-item.rss-plan-rss(href=theme.footer.rss.rssOA, title="rss", target="_blank")
17
- .rss-plan-description 推送全部文章<br>推送简介
18
- .rss-plan-info-group
19
- .rss-plan-title RSS
20
- .rss-plan-info 备用订阅方式
21
- img.rss-plan-icon(src="https://bu.dusays.com/2023/11/01/6541d184e2a09.png", alt="rss")
22
- != page.content
1
+ .rss-plan-list
2
+ a.rss-plan-item.rss-plan-wechat(href=theme.footer.rss.wechatOA, title="公众号")
3
+ .rss-plan-description 推送精选文章<br>推送全文
4
+ .rss-plan-info-group
5
+ .rss-plan-title 公众号订阅
6
+ .rss-plan-info 推荐的订阅方式
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")
9
+ .rss-plan-description 推送全部文章<br>推送封面与简介
10
+ .rss-plan-info-group
11
+ .rss-plan-title 邮件订阅
12
+ .rss-plan-info 推荐的订阅方式
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")
15
+ .rss-plan-description 推送全部文章<br>推送简介
16
+ .rss-plan-info-group
17
+ .rss-plan-title RSS
18
+ .rss-plan-info 备用订阅方式
19
+ img.rss-plan-icon(src="https://bu.dusays.com/2023/11/01/6541d184e2a09.png", alt="rss")
20
+ != page.content
@@ -1,5 +1,4 @@
1
1
  if theme.says.enable
2
- - var pageClass = "sharePage"
3
2
  include ../widgets/page/banner
4
3
  #bber
5
4
  section.timeline.page-1
@@ -14,7 +13,7 @@ if theme.says.enable
14
13
  if theme.says.style === 1
15
14
  hr
16
15
  include ../widgets/page/says/saysBottom
17
- #bber-tips(style="color: var(--sco-secondtext);") - 只展示最近30条短文 -
16
+ #bber-tips - 只展示最近30条短文 -
18
17
 
19
18
  script.
20
19
  sco.reflashEssayWaterFall()
@@ -1,6 +1,6 @@
1
- h1.page-title(style='display: inline-block')= __('page.tag')
2
- div.category-lists
3
- div.tag-cloud-list.is-center
1
+ h1.page-title= __('page.tag')
2
+ .category-lists
3
+ .tag-cloud-list.is-center
4
4
  each tag in site.tags.find({ parent: { $exists: false } }).data
5
5
  a(href=url_for(tag.path))
6
6
  span.tags-punctuation
@@ -1,4 +1,3 @@
1
- - var pageClass = "sharePage"
2
1
  include ../widgets/page/banner
3
2
  .flink#article-container
4
3
  each data in site.data.tlink.links
@@ -1,17 +1,17 @@
1
1
  div#sidebar(style="zoom: 1;")
2
2
  div#menu-mask(style="display: none;")
3
3
  div#sidebar-menus
4
- span.sidebar-menu-item-title= "功能"
4
+ span.sidebar-menu-item-title= __('sidebar.title1')
5
5
  div.sidebar-menu-item
6
- a.darkmode_switchbutton.menu-child(onclick="sco.switchDarkMode()", title="显示模式切换", href="javascript:void(0);" rel="nofollow" data-pjax-state)
7
- i.scoicon.sco-moon-clear-fill(style="font-size: 1rem;")
8
- span= "显示模式"
6
+ a.darkmode_switchbutton.menu-child(onclick="sco.switchDarkMode()", href="javascript:void(0);")
7
+ i.scoicon.sco-moon-clear-fill
8
+ span= __('sidebar.darkmode')
9
9
  if theme.nav.left.enable
10
10
  include ./widgets/nav/left.pug
11
11
  include ./widgets/nav/menu.pug
12
- span.sidebar-menu-item-title= "标签"
12
+ span.sidebar-menu-item-title= __('sidebar.title2')
13
13
  div.card-widget.card-tags.card-archives.card-webinfo.card-allinfo
14
14
  div.card-tag-cloud
15
- each tag in site.tags.data
16
- a(href=url_for(tag.path), style="font-size: 1rem; color: #d3d3d3")= tag.name
15
+ each tag in site.tags.find({ parent: { $exists: false } }).data
16
+ a(href=url_for(tag.path))= tag.name
17
17
  sup= tag.length
@@ -1,18 +1,30 @@
1
1
  .aside-content#aside-content
2
- - var noSticky, Sticky;
2
+ - var noSticky, Sticky, customNoSticky, customSticky;
3
3
  if(is_home())
4
4
  - noSticky = theme.aside.home.noSticky.split(',')
5
5
  - Sticky = theme.aside.home.Sticky.split(',')
6
+ - customNoSticky = site.data.aside?.home?.noSticky
7
+ - customSticky = site.data.aside?.home?.Sticky
6
8
  else if(is_post())
7
9
  - noSticky = theme.aside.post.noSticky.split(',')
8
10
  - Sticky = theme.aside.post.Sticky.split(',')
11
+ - customNoSticky = site.data.aside?.post?.noSticky
12
+ - customSticky = site.data.aside?.post?.Sticky
9
13
  else if(is_page() || is_archive() || is_tag() || is_category())
10
14
  - noSticky = theme.aside.page.noSticky.split(',')
11
15
  - Sticky = theme.aside.page.Sticky.split(',')
16
+ - customNoSticky = site.data.aside?.page?.noSticky
17
+ - customSticky = site.data.aside?.page?.Sticky
12
18
  each item in noSticky
13
19
  include ./asideSwitch.pug
20
+ if customNoSticky
21
+ each item in customNoSticky
22
+ include ./asideCustom.pug
14
23
  .sticky_layout
15
24
  if page.toc
16
25
  include ./asideToc.pug
17
26
  each item in Sticky
18
27
  include ./asideSwitch.pug
28
+ if customSticky
29
+ each item in customSticky
30
+ include ./asideCustom.pug
@@ -1,9 +1,11 @@
1
+ - var archive = theme.aside.archive
2
+
1
3
  ul.card-archive-list
2
- - var type = locals.type ? locals.type : 'year'
4
+ - var type = archive.type ? archive.type : 'year'
3
5
  each value, key in getArchiveLength(type)
4
6
  li.card-archive-list-item
5
- a.card-archive-list-link(onclick=`pjax.loadUrl('/archives/${key}/')`, data-pjax-state="", href="javascript:void(0);")
7
+ a.card-archive-list-link(onclick=`pjax.loadUrl('/archives/${key}/')`, href="javascript:void(0);")
6
8
  span.card-archive-list-date= key
7
9
  .card-archive-list-count-group
8
10
  span.card-archive-list-count= value
9
- span.card-archive-list-count-unit
11
+ span.card-archive-list-count-unit= __('console.archive_unit')
@@ -0,0 +1,6 @@
1
+ .card-widget(class=item.class_name, id=item.id_name)
2
+ .item-headline
3
+ i(class=item.icon)
4
+ span=item.name
5
+ .item-content
6
+ != item.html