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
@@ -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,10 @@
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)
6
8
  // loading
7
9
  if theme.loading.fullpage
8
10
  include ./loading.pug
@@ -13,17 +15,17 @@ html(lang=config.language, data-theme="light")
13
15
  // sidebar
14
16
  include ./sidebar.pug
15
17
 
16
- if(page.type !== '404')
17
- div(class = is_post() ? 'post' : 'page', id="body-wrap")
18
- include ./header.pug
18
+ #body-wrap(class = is_post() ? 'post' : 'page')
19
+ include ./header.pug
19
20
 
21
+ if(page.type !== '404')
20
22
  block content
21
23
 
22
24
  footer#footer
23
25
  include ./footer.pug
24
- else
25
- div.error#body-wrap
26
- block content
26
+ else
27
+ .error#body-wrap
28
+ block content
27
29
 
28
30
  // inject body
29
31
  include ./inject/body.pug
@@ -32,4 +34,5 @@ html(lang=config.language, data-theme="light")
32
34
  include ./widgets/third-party/search/index.pug
33
35
 
34
36
  // music
35
- include ./widgets/third-party/music.pug
37
+ if theme.thirdparty.aplayer.enable
38
+ 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
@@ -2,7 +2,7 @@ if theme.aside.history.enable
2
2
  .card-widget.card-history
3
3
  .item-headline
4
4
  i(class=theme.aside.history.icon || 'scoicon sco-clock-fill')
5
- span= theme.aside.history.title || '那年今日'
6
- #history-baidu(style="height: 100px;overflow: hidden")
5
+ span= theme.aside.history.title || _p('aside.history')
6
+ #history-baidu
7
7
  #history-container.history_swiper-container(style="width: 100%;height: 100%;margin-top: 6px")
8
- #history_container_wrapper.swiper-wrapper(style="height:20px")
8
+ #history_container_wrapper.swiper-wrapper
@@ -2,18 +2,16 @@
2
2
  .card-content
3
3
  .card-info-avatar.is-center
4
4
  .author-info__top-group
5
- .author-info__sayhi#author-info__sayhi(onclick="sco.changeSayHelloText()") 一日之计在于晨
5
+ .author-info__sayhi#author-info__sayhi(onclick="sco.changeSayHelloText()")= _p('sayhello.morning')
6
6
  .avatar-img-group
7
- img.avatar-img(alt="avatar", src=theme.aside.card.author.img)
7
+ img.avatar-img(alt=_p('aside.avatar'), src=theme.aside.card.author.img)
8
8
  .avatar-sticker
9
- svg.avatar-sticker-img(alt="avatar", aria-hidden="true")
10
- use(xlink:href=theme.aside.card.author.state)
11
- script(src=url_for(theme.aside.card.author.js))
9
+ img.avatar-sticker-img(src=theme.aside.card.author.sticker, alt=_p('aside.sticker'))
12
10
  .author-info__description_group
13
11
  .author-info__description!= theme.aside.card.content
14
12
  .author-info__description2!= theme.aside.card.content2
15
13
  .author-info__bottom-group
16
- a.author-info__bottom-group-left(href=theme.about ? "/about" : "/", data-pjax-state)
14
+ a.author-info__bottom-group-left(href=theme.about ? "/about" : "/")
17
15
  .author-info__name= config.author
18
16
  .author-info__desc!= config.subtitle
19
17
  .card-info-social-icons.is-center
@@ -1,7 +1,7 @@
1
1
  .card-widget.card-recent-post
2
2
  .item-headline
3
3
  i.scoicon.sco-map-line
4
- span 最近发布
4
+ span= _p('aside.newpost')
5
5
  .aside-list
6
6
  - let index = 1
7
7
  each post in site.posts.data.sort((a, b) => b.date < a.date ? -1 : 1)
@@ -1,6 +1,4 @@
1
1
  case item
2
- when 'power'
3
- include ./asidePower.pug
4
2
  when 'about'
5
3
  include ./asideInfoCard.pug
6
4
  when 'flip'
@@ -11,15 +9,6 @@ case item
11
9
  include ./asideHistory.pug
12
10
  when 'newestPost'
13
11
  include ./asideNewestPost.pug
14
- when 'tag'
15
- .card-widget.card-tags
16
- include ./asideTag.pug
17
- when 'archive'
18
- .card-widget.card-archives
19
- include ./asideArchive.pug
20
- when 'webInfo'
21
- .card-widget.card-webinfo
22
- include ./asideWebInfo.pug
23
12
  when 'allInfo'
24
13
  include ./asideAllInfo.pug
25
14
  default
@@ -1,9 +1,9 @@
1
1
  .card-tag-cloud
2
2
  each tag in site.tags.find({ parent: { $exists: false } }).data
3
- a(href=url_for(tag.path), style="font-size: 0.8rem;")= tag.name
3
+ a(href=url_for(tag.path))= tag.name
4
4
  sup= tag.length
5
5
  if site.tags.length > 50
6
- a#more-tags-btn(href="javascript:void(0);", rel="external nofollow", onclick="sco.openAllTags();", data-pjax-state="") 查看全部
6
+ a#more-tags-btn(href="javascript:void(0);", onclick="sco.openAllTags();")= __('aside.tagmore')
7
7
  else
8
8
  style.
9
9
  .card-tag-cloud::after {
@@ -1,5 +1,5 @@
1
1
  .card-widget#card-toc
2
2
  .item-headline
3
3
  i.scoicon.sco-menu-line
4
- span 文章目录
4
+ span= __('aside.toc')
5
5
  .toc-content#toc-content!= toc(page.content, { list_number: false })