hexo-theme-solitude 1.1.0 → 1.2.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 (304) hide show
  1. package/LICENSE +674 -19
  2. package/README.md +56 -19
  3. package/README_EN.md +98 -0
  4. package/_config.yml +274 -224
  5. package/languages/en-US.yml +1 -0
  6. package/languages/zh-CN.yml +8 -8
  7. package/layout/404.pug +24 -0
  8. package/layout/archive.pug +11 -0
  9. package/layout/category.pug +16 -0
  10. package/layout/includes/console.pug +42 -0
  11. package/layout/includes/footer.pug +71 -0
  12. package/layout/includes/head/config.pug +79 -0
  13. package/layout/includes/head/pwa.pug +59 -0
  14. package/layout/includes/head.pug +29 -0
  15. package/layout/includes/header.pug +4 -0
  16. package/layout/includes/inject/body.pug +68 -0
  17. package/layout/{partial/compoment/inject/head.ejs → includes/inject/head.pug} +60 -37
  18. package/layout/includes/layout.pug +35 -0
  19. package/layout/{partial/loading.ejs → includes/loading.pug} +19 -17
  20. package/layout/includes/mixins/articleSort.pug +14 -0
  21. package/layout/includes/mixins/pagination.pug +8 -0
  22. package/layout/includes/nav.pug +22 -0
  23. package/layout/includes/page/about.pug +10 -0
  24. package/layout/includes/page/categories.pug +8 -0
  25. package/layout/includes/page/default.pug +2 -0
  26. package/layout/includes/page/echarts.pug +7 -0
  27. package/layout/includes/page/equipment.pug +3 -0
  28. package/layout/includes/page/links.pug +35 -0
  29. package/layout/includes/page/moments.pug +5 -0
  30. package/layout/includes/page/rss.pug +22 -0
  31. package/layout/includes/page/says.pug +20 -0
  32. package/layout/includes/page/tags.pug +8 -0
  33. package/layout/includes/page/tlink.pug +9 -0
  34. package/layout/includes/recent-posts.pug +9 -0
  35. package/layout/includes/sidebar.pug +17 -0
  36. package/layout/includes/widgets/aside/aside.pug +18 -0
  37. package/layout/includes/widgets/aside/asideAllInfo.pug +8 -0
  38. package/layout/includes/widgets/aside/asideArchive.pug +9 -0
  39. package/layout/includes/widgets/aside/asideFlipCard.pug +5 -0
  40. package/layout/includes/widgets/aside/asideHistory.pug +8 -0
  41. package/layout/includes/widgets/aside/asideInfoCard.pug +22 -0
  42. package/layout/includes/widgets/aside/asideNewestPost.pug +16 -0
  43. package/layout/includes/widgets/aside/asidePower.pug +19 -0
  44. package/layout/includes/widgets/aside/asideSwitch.pug +26 -0
  45. package/layout/includes/widgets/aside/asideTag.pug +11 -0
  46. package/layout/includes/widgets/aside/asideToc.pug +5 -0
  47. package/layout/includes/widgets/aside/asideWebInfo.pug +40 -0
  48. package/layout/includes/widgets/aside/asideWelcome.pug +12 -0
  49. package/layout/includes/widgets/home/banner.pug +16 -0
  50. package/layout/includes/widgets/home/bbTimeList.pug +8 -0
  51. package/layout/includes/widgets/home/categoryBar.pug +10 -0
  52. package/layout/includes/widgets/home/categoryGroup.pug +9 -0
  53. package/layout/includes/widgets/home/hometop.pug +9 -0
  54. package/layout/includes/widgets/home/postList.pug +26 -0
  55. package/layout/includes/widgets/home/rencentPost.pug +26 -0
  56. package/layout/includes/widgets/home/topGroup.pug +27 -0
  57. package/layout/includes/widgets/nav/left.pug +10 -0
  58. package/layout/includes/widgets/nav/menu.pug +16 -0
  59. package/layout/includes/widgets/nav/right.pug +23 -0
  60. package/layout/includes/widgets/page/about/authorinfo.pug +12 -0
  61. package/layout/includes/widgets/page/about/award.pug +34 -0
  62. package/layout/includes/widgets/page/about/contentinfo.pug +38 -0
  63. package/layout/includes/widgets/page/about/hobbies.pug +33 -0
  64. package/layout/includes/widgets/page/about/motto.pug +19 -0
  65. package/layout/includes/widgets/page/about/other.pug +61 -0
  66. package/layout/includes/widgets/page/about/personalities.pug +16 -0
  67. package/layout/includes/widgets/page/about/skillsinfo.pug +41 -0
  68. package/layout/includes/widgets/page/banner.pug +14 -0
  69. package/layout/includes/widgets/page/equipment/content.pug +23 -0
  70. package/layout/includes/widgets/page/links/banner.pug +30 -0
  71. package/layout/includes/widgets/page/links/linksCard.pug +18 -0
  72. package/layout/includes/widgets/page/links/linksItem.pug +14 -0
  73. package/layout/includes/widgets/page/moments/angle.pug +24 -0
  74. package/layout/includes/widgets/page/moments/index.pug +18 -0
  75. package/layout/includes/widgets/page/says/saysBottom.pug +11 -0
  76. package/layout/includes/widgets/page/says/saysContent.pug +6 -0
  77. package/layout/includes/widgets/page/says/saysFunction.pug +10 -0
  78. package/layout/includes/widgets/page/says/saysMeta.pug +7 -0
  79. package/layout/includes/widgets/post/award.pug +48 -0
  80. package/layout/includes/widgets/post/copyright.pug +27 -0
  81. package/layout/includes/widgets/post/postMeta.pug +55 -0
  82. package/layout/includes/widgets/post/postNav.pug +25 -0
  83. package/layout/includes/widgets/post/wave.pug +9 -0
  84. package/layout/includes/widgets/randomlink.pug +32 -0
  85. package/layout/includes/widgets/rightside/index.pug +74 -0
  86. package/layout/includes/widgets/third-party/comments/comment.pug +14 -0
  87. package/layout/includes/widgets/third-party/comments/gitalk.pug +0 -0
  88. package/layout/{partial/compoment/third-party/comments/twikoo.ejs → includes/widgets/third-party/comments/twikoo.pug} +8 -9
  89. package/layout/includes/widgets/third-party/comments/valine.pug +0 -0
  90. package/layout/includes/widgets/third-party/music.pug +3 -0
  91. package/layout/includes/widgets/third-party/pjax.pug +30 -0
  92. package/layout/includes/widgets/third-party/search/algolia-search.pug +16 -0
  93. package/layout/includes/widgets/third-party/search/index.pug +7 -0
  94. package/layout/includes/widgets/third-party/search/local-search.pug +15 -0
  95. package/layout/index.pug +20 -0
  96. package/layout/page.pug +32 -0
  97. package/layout/post.pug +43 -0
  98. package/layout/tag.pug +19 -0
  99. package/package.json +3 -3
  100. package/scripts/event/page.js +20 -2
  101. package/scripts/filter/checkThemeConfig.js +0 -1
  102. package/scripts/filter/randomPosts.js +0 -1
  103. package/scripts/helper/{charts.js → echarts.js} +21 -11
  104. package/scripts/helper/related_post.js +10 -3
  105. package/scripts/helper/stylus.js +23 -0
  106. package/scripts/tags/bvideo.js +1 -36
  107. package/scripts/tags/fold.js +2 -3
  108. package/scripts/tags/note.js +6 -2
  109. package/scripts/tags/tabs.js +1 -1
  110. package/source/css/_comment/index.styl +121 -0
  111. package/source/css/_comment/twikoo.styl +515 -0
  112. package/source/css/_extra/console.styl +354 -0
  113. package/source/css/_extra/rightmenu.styl +83 -0
  114. package/source/css/_global/animation.css +756 -0
  115. package/source/css/_global/function.styl +83 -0
  116. package/source/css/_global/index.styl +120 -0
  117. package/source/css/_global/var.styl +1 -0
  118. package/source/css/_layout/articleSort.styl +199 -0
  119. package/source/css/_layout/base.styl +392 -0
  120. package/source/css/_layout/footer.styl +359 -0
  121. package/source/css/_layout/header.styl +1331 -0
  122. package/source/css/_layout/index.styl +293 -0
  123. package/source/css/_layout/sidebar.styl +226 -0
  124. package/source/css/_mode/index.styl +52 -0
  125. package/source/css/_page/about.styl +944 -0
  126. package/source/css/_page/category.styl +141 -0
  127. package/source/css/_page/equipment.styl +108 -0
  128. package/source/css/_page/error.styl +161 -0
  129. package/source/css/_page/home.styl +58 -0
  130. package/source/css/_page/homeTop.styl +1035 -0
  131. package/source/css/_page/index.styl +22 -0
  132. package/source/css/_page/link.styl +433 -0
  133. package/source/css/_page/moment.styl +186 -0
  134. package/source/css/_page/rss.styl +87 -0
  135. package/source/css/_page/says.styl +353 -0
  136. package/source/css/_page/tag.styl +56 -0
  137. package/source/css/_post/commentBarrage.styl +149 -0
  138. package/source/css/_post/externalTags.styl +694 -0
  139. package/source/css/_post/highlight.styl +96 -0
  140. package/source/css/_post/index.styl +935 -0
  141. package/source/css/_post/pagination.styl +467 -0
  142. package/source/css/_post/postContent.styl +957 -0
  143. package/source/css/_post/relatedPost.styl +160 -0
  144. package/source/css/_post/reward.styl +217 -0
  145. package/source/css/_search/algolia-search.styl +206 -0
  146. package/source/css/_search/local-search.styl +112 -0
  147. package/source/css/_widgets/aside/allinfo.styl +134 -0
  148. package/source/css/_widgets/aside/flip.styl +68 -0
  149. package/source/css/_widgets/aside/history.styl +35 -0
  150. package/source/css/_widgets/aside/index.styl +156 -0
  151. package/source/css/_widgets/aside/info.styl +263 -0
  152. package/source/css/_widgets/aside/newPost.styl +55 -0
  153. package/source/css/_widgets/aside/power.styl +90 -0
  154. package/source/css/_widgets/aside/toc.styl +85 -0
  155. package/source/css/_widgets/aside/welcome.styl +14 -0
  156. package/source/css/_widgets/index.styl +3 -0
  157. package/source/css/index.styl +40 -0
  158. package/source/img/default.png +0 -0
  159. package/source/img/logo-horizontal_version.png +0 -0
  160. package/source/img/pwa/16.png +0 -0
  161. package/source/img/pwa/180.png +0 -0
  162. package/source/img/pwa/192.png +0 -0
  163. package/source/img/pwa/32.png +0 -0
  164. package/source/img/pwa/512.png +0 -0
  165. package/source/img/pwa/logo.png +0 -0
  166. package/source/img/pwa/siteicon/splash-1125x2436.png +0 -0
  167. package/source/img/pwa/siteicon/splash-1136x640.png +0 -0
  168. package/source/img/pwa/siteicon/splash-1170x2532.png +0 -0
  169. package/source/img/pwa/siteicon/splash-1179x2556.png +0 -0
  170. package/source/img/pwa/siteicon/splash-1242x2208.png +0 -0
  171. package/source/img/pwa/siteicon/splash-1242x2688.png +0 -0
  172. package/source/img/pwa/siteicon/splash-1248x2778.png +0 -0
  173. package/source/img/pwa/siteicon/splash-1290x2796.png +0 -0
  174. package/source/img/pwa/siteicon/splash-1334x750.png +0 -0
  175. package/source/img/pwa/siteicon/splash-1536x2048.png +0 -0
  176. package/source/img/pwa/siteicon/splash-1620x2160.png +0 -0
  177. package/source/img/pwa/siteicon/splash-1668x2224.png +0 -0
  178. package/source/img/pwa/siteicon/splash-1668x2388.png +0 -0
  179. package/source/img/pwa/siteicon/splash-1792x828.png +0 -0
  180. package/source/img/pwa/siteicon/splash-2048x1536.png +0 -0
  181. package/source/img/pwa/siteicon/splash-2048x2732.png +0 -0
  182. package/source/img/pwa/siteicon/splash-2160x1620.png +0 -0
  183. package/source/img/pwa/siteicon/splash-2208x1242.png +0 -0
  184. package/source/img/pwa/siteicon/splash-2224x1668.png +0 -0
  185. package/source/img/pwa/siteicon/splash-2388x1668.png +0 -0
  186. package/source/img/pwa/siteicon/splash-2436x1125.png +0 -0
  187. package/source/img/pwa/siteicon/splash-2532x1170.png +0 -0
  188. package/source/img/pwa/siteicon/splash-2556x1179.png +0 -0
  189. package/source/img/pwa/siteicon/splash-2688x1242.png +0 -0
  190. package/source/img/pwa/siteicon/splash-2732x2048.png +0 -0
  191. package/source/img/pwa/siteicon/splash-2778x1248.png +0 -0
  192. package/source/img/pwa/siteicon/splash-2796x1290.png +0 -0
  193. package/source/img/pwa/siteicon/splash-640x1136.png +0 -0
  194. package/source/img/pwa/siteicon/splash-750x1334.png +0 -0
  195. package/source/img/pwa/siteicon/splash-828x1792.png +0 -0
  196. package/source/img/solitude-show.jpg +0 -0
  197. package/source/js/commentBarrage.js +8 -5
  198. package/source/js/extend/console/comment.js +60 -63
  199. package/source/js/extend/covercolor/local.js +105 -95
  200. package/source/js/extend/search/algolia-search.js +104 -111
  201. package/source/js/extend/search/local-search.js +7 -7
  202. package/source/js/main.js +673 -520
  203. package/source/js/utils.js +131 -137
  204. package/source/lib/chuckle-post-ai.js +1 -1
  205. package/layout/404.ejs +0 -34
  206. package/layout/archive.ejs +0 -10
  207. package/layout/category.ejs +0 -18
  208. package/layout/index.ejs +0 -20
  209. package/layout/layout.ejs +0 -30
  210. package/layout/page/about.ejs +0 -13
  211. package/layout/page/categories.ejs +0 -12
  212. package/layout/page/circle.ejs +0 -5
  213. package/layout/page/echarts.ejs +0 -14
  214. package/layout/page/equipment.ejs +0 -2
  215. package/layout/page/links.ejs +0 -46
  216. package/layout/page/page.ejs +0 -3
  217. package/layout/page/rss.ejs +0 -37
  218. package/layout/page/says.ejs +0 -17
  219. package/layout/page/tags.ejs +0 -12
  220. package/layout/page/tlink.ejs +0 -11
  221. package/layout/page.ejs +0 -45
  222. package/layout/partial/body.ejs +0 -7
  223. package/layout/partial/compoment/about/authorinfo.ejs +0 -18
  224. package/layout/partial/compoment/about/award.ejs +0 -59
  225. package/layout/partial/compoment/about/contentinfo.ejs +0 -33
  226. package/layout/partial/compoment/about/hobbies.ejs +0 -53
  227. package/layout/partial/compoment/about/motto.ejs +0 -17
  228. package/layout/partial/compoment/about/other.ejs +0 -76
  229. package/layout/partial/compoment/about/personalities.ejs +0 -11
  230. package/layout/partial/compoment/about/skillsinfo.ejs +0 -62
  231. package/layout/partial/compoment/aside/aside.ejs +0 -28
  232. package/layout/partial/compoment/aside/asideAllInfo.ejs +0 -6
  233. package/layout/partial/compoment/aside/asideArchive.ejs +0 -11
  234. package/layout/partial/compoment/aside/asideFlipCard.ejs +0 -72
  235. package/layout/partial/compoment/aside/asideHistory.ejs +0 -49
  236. package/layout/partial/compoment/aside/asideInfoCard.ejs +0 -39
  237. package/layout/partial/compoment/aside/asideNewestPost.ejs +0 -31
  238. package/layout/partial/compoment/aside/asidePower.ejs +0 -31
  239. package/layout/partial/compoment/aside/asideSwitch.ejs +0 -41
  240. package/layout/partial/compoment/aside/asideTag.ejs +0 -5
  241. package/layout/partial/compoment/aside/asideToc.ejs +0 -11
  242. package/layout/partial/compoment/aside/asideWebInfo.ejs +0 -60
  243. package/layout/partial/compoment/aside/asideWelcome.ejs +0 -33
  244. package/layout/partial/compoment/circle/angle.ejs +0 -26
  245. package/layout/partial/compoment/circle/banner.ejs +0 -11
  246. package/layout/partial/compoment/circle/content.ejs +0 -19
  247. package/layout/partial/compoment/dorakika/rightmenu.ejs +0 -100
  248. package/layout/partial/compoment/equipment/list.ejs +0 -37
  249. package/layout/partial/compoment/home/homeCategoryBar.ejs +0 -11
  250. package/layout/partial/compoment/home/postList.ejs +0 -37
  251. package/layout/partial/compoment/hometop/bbTimeList.ejs +0 -15
  252. package/layout/partial/compoment/hometop/categoryGroup.ejs +0 -19
  253. package/layout/partial/compoment/hometop/groupTag.ejs +0 -30
  254. package/layout/partial/compoment/hometop/topGroup.ejs +0 -41
  255. package/layout/partial/compoment/inject/body.ejs +0 -72
  256. package/layout/partial/compoment/links/angle.ejs +0 -26
  257. package/layout/partial/compoment/links/banner.ejs +0 -42
  258. package/layout/partial/compoment/links/linksCard.ejs +0 -27
  259. package/layout/partial/compoment/links/linksItem.ejs +0 -21
  260. package/layout/partial/compoment/mixins/articleSort.ejs +0 -26
  261. package/layout/partial/compoment/mixins/pagination.ejs +0 -11
  262. package/layout/partial/compoment/nav/left.ejs +0 -22
  263. package/layout/partial/compoment/nav/menu.ejs +0 -25
  264. package/layout/partial/compoment/nav/right.ejs +0 -42
  265. package/layout/partial/compoment/post/award.ejs +0 -52
  266. package/layout/partial/compoment/post/copyright.ejs +0 -37
  267. package/layout/partial/compoment/post/postMeta.ejs +0 -83
  268. package/layout/partial/compoment/post/postNav.ejs +0 -41
  269. package/layout/partial/compoment/post/wave.ejs +0 -14
  270. package/layout/partial/compoment/says/banner.ejs +0 -10
  271. package/layout/partial/compoment/says/saysBottom.ejs +0 -18
  272. package/layout/partial/compoment/says/saysContent.ejs +0 -10
  273. package/layout/partial/compoment/says/saysFunction.ejs +0 -15
  274. package/layout/partial/compoment/third-party/comments/comment.ejs +0 -12
  275. package/layout/partial/compoment/third-party/comments/twikoo_k.ejs +0 -29
  276. package/layout/partial/compoment/third-party/music.ejs +0 -5
  277. package/layout/partial/compoment/third-party/pjax.ejs +0 -31
  278. package/layout/partial/compoment/third-party/search/algolia-search.ejs +0 -20
  279. package/layout/partial/compoment/third-party/search/index.ejs +0 -10
  280. package/layout/partial/compoment/third-party/search/local-search.ejs +0 -22
  281. package/layout/partial/compoment/tlink/banner.ejs +0 -10
  282. package/layout/partial/console.ejs +0 -68
  283. package/layout/partial/footer.ejs +0 -104
  284. package/layout/partial/head.ejs +0 -37
  285. package/layout/partial/header.ejs +0 -6
  286. package/layout/partial/hometop.ejs +0 -15
  287. package/layout/partial/nav.ejs +0 -34
  288. package/layout/partial/pwa.ejs +0 -40
  289. package/layout/partial/sidebar.ejs +0 -31
  290. package/layout/post.ejs +0 -52
  291. package/layout/tag.ejs +0 -19
  292. package/scripts/filter/katex.js +0 -25
  293. package/scripts/helper/randomLinks.js +0 -16
  294. package/scripts/helper/themeJsExport.js +0 -79
  295. package/scripts/tags/expand.js +0 -4
  296. package/scripts/tags/hide.js +0 -70
  297. package/source/css/commentBarrage.css +0 -174
  298. package/source/css/custom.css +0 -901
  299. package/source/css/main.css +0 -16420
  300. package/source/css/search/algolia-search.css +0 -141
  301. package/source/css/search/local-search.css +0 -138
  302. package/source/css/var.css +0 -189
  303. package/source/js/extend/covercolor/web.js +0 -137
  304. /package/source/js/{rightmenu.js → rightside.js} +0 -0
@@ -25,6 +25,7 @@ page:
25
25
  tag: Tags
26
26
  category: Categories
27
27
  archives: Archives
28
+ echarts: Echarts
28
29
 
29
30
  nav:
30
31
  backtop: Back to top
@@ -14,17 +14,17 @@ time:
14
14
  runtime: 天
15
15
 
16
16
  sayhello:
17
- morning: 早上好
18
- noon: 中午好
19
- afternoon: 下午好
20
- night: 晚上好
21
- goodnight: 晚安
22
- iam: '! 我是'
17
+ morning: 一日之计在于晨
18
+ noon: 吃饱了才有力气干活
19
+ afternoon: 集中精力,攻克难关
20
+ night: 不要太劳累了,早睡更健康
21
+ goodnight: 睡个好觉,保证精力充沛
23
22
 
24
23
  page:
25
24
  tag: 标签
26
25
  category: 分类
27
26
  archives: 文章
27
+ echarts: 博客统计
28
28
 
29
29
  nav:
30
30
  backtop: 返回顶部
@@ -34,6 +34,6 @@ nav:
34
34
  console: 中控台
35
35
 
36
36
  search:
37
- empty: 搜索结果为空
38
- hit: 已为您找到 ${query} 条结果
37
+ empty: 找不到你查询的内容:${query}
38
+ hit: 找到 ${hits} 条结果,用时 ${time} 毫秒
39
39
  placeholder: 输入关键词快速查找
package/layout/404.pug ADDED
@@ -0,0 +1,24 @@
1
+ extends includes/layout.pug
2
+
3
+ block content
4
+ #error-wrap
5
+ .error-content
6
+ .error-img(style='background-image: url(' + url_for(theme.errorpage.img) + ')')
7
+ .error-info
8
+ h1.error_title 404
9
+ .error_subtitle= theme.errorpage.text
10
+ a.button--animated(href="/")
11
+ i.scoicon.sco-external-link
12
+ | 回到主页
13
+
14
+ if theme.errorpage.recommendList
15
+ .aside-list
16
+ .aside-list-group
17
+ each post, index in site.posts.sort('-date').data
18
+ if index >= 5
19
+ break
20
+ .aside-list-item
21
+ a.thumbnail(href=url_for(post.path), title=post.title)
22
+ img(src=post.cover, alt=post.title)
23
+ .content
24
+ a.title(href=url_for(post.path), title=post.title)= post.title
@@ -0,0 +1,11 @@
1
+ extends includes/layout.pug
2
+
3
+ block content
4
+ main.layout#content-inner
5
+ div#archive
6
+ div.article-sort-title #{__('page.archives')}<sup>#{page.posts.length}</sup>
7
+ div.article-sort
8
+ include includes/mixins/articleSort
9
+ include includes/mixins/pagination
10
+ include includes/widgets/aside/aside
11
+
@@ -0,0 +1,16 @@
1
+ extends includes/layout.pug
2
+
3
+ block content
4
+ main.layout#content-inner
5
+ div#category
6
+ div#category-bar
7
+ div.category-bar-items#category-bar-items
8
+ include includes/widgets/home/categoryBar
9
+ div.recent-posts#recent-posts
10
+ - const currentCategory = page.category
11
+ each post in site.posts.data
12
+ each category in post.categories.data
13
+ if category.name === currentCategory
14
+ include includes/widgets/home/postList
15
+ include includes/mixins/pagination
16
+ include includes/widgets/aside/aside
@@ -0,0 +1,42 @@
1
+ div#console(style="zoom: 1")
2
+ div.close-btn(onclick="sco.hideConsole()", href="javascript:void(0);")
3
+ i.scoicon.sco-close-fill
4
+ if theme.thirdparty.consolePlus
5
+ div.console-card-group
6
+ div.console-card-group-left
7
+ div.console-card#card-newest-comments(onclick="sco.hideConsole()")
8
+ div.card-content
9
+ div.author-content-item-tips= "互动"
10
+ div.author-content-item-title= "最新评论"
11
+ div.aside-list
12
+
13
+ div.console-card-group-right
14
+ div.console-card.tags(onclick="sco.hideConsole()")
15
+ div.card-content
16
+ div.author-content-item-tips= "标签"
17
+ div.author-content-item-title= "寻找感兴趣的领域"
18
+ div.card-tag-cloud
19
+ each tag in site.tags.data
20
+ a(href=url_for(tag.path), style="font-size: 0.8rem; color: #d3d3d3")= tag.name
21
+ sup= tag.length
22
+
23
+ div.console-card.history(onclick="sco.hideConsole()")
24
+ include ./widgets/aside/asideArchive.pug
25
+
26
+ div.button-group
27
+ div.console-btn-item
28
+ a.darkmode_switchbutton(onclick="sco.switchDarkMode()", title="昼夜切换", href="javascript:void(0);" rel="nofollow" data-pjax-state)
29
+ i.scoicon.sco-moon-clear-fill(style="font-size: 1rem;")
30
+ div.console-btn-item#consoleHideAside
31
+ a.asideSwitch(onclick="sco.switchHideAside()", title="边栏显示控制", href="javascript:void(0);" rel="nofollow" data-pjax-state)
32
+ i.scoicon.sco-side-bar-fill(style="font-size: 1rem;")
33
+ if theme.thirdparty.aplayer.enable
34
+ div.console-btn-item#consoleMusic(onclick="sco.musicToggle()")
35
+ a.music-switch(title="音乐开关")
36
+ i.scoicon.sco-disc-fill(style="font-size: 1rem;")
37
+
38
+ if theme.comment.enable
39
+ div.console-btn-item.on#consoleCommentBarrage(onclick="sco.switchCommentBarrage()")
40
+ a.commentBarrage
41
+ i.scoicon.sco-chat-fill(style="font-size: 1rem;")
42
+ div.console-mask(onclick="sco.hideConsole()")
@@ -0,0 +1,71 @@
1
+ div#sco-footer-bar
2
+ div.footer-logo
3
+ if theme.site.name.class === 'i_class'
4
+ i.scoicon(class=theme.site.name.custom, style="font-size: 1rem")
5
+ else if theme.site.name.class === 'img'
6
+ i.scoicon(style="background-image: url(" + url_for(theme.site.name.custom) + ")")
7
+ else if theme.site.name.class === 'text'
8
+ span.scoicon= theme.site.name.custom
9
+ div.footer-bar-description= "来自" + config.title + " - " + config.subtitle + "的文章"
10
+ a.footer-bar-link(href="/", data-pjax-state)= "了解更多"
11
+ div#footer_deal
12
+ - var leftInfo = theme.footer && theme.footer.information && theme.footer.information.left ? theme.footer.information.left : {}
13
+ - var rightInfo = theme.footer && theme.footer.information && theme.footer.information.right ? theme.footer.information.right : {}
14
+
15
+ each value, i in leftInfo
16
+ a.deal_link(href=url_for(value.url), rel="external nofollow", title=i)
17
+ i(class=value.icon)
18
+
19
+ img.footer_mini_logo(src=theme.site.icon, title="返回顶部", onclick="sco.toTop()")
20
+
21
+ each value, i in rightInfo
22
+ a.deal_link(href=url_for(value.url), rel="external nofollow", title=i)
23
+ i(class=value.icon)
24
+ div#sco-footer
25
+ - var group = theme.footer && theme.footer.group ? theme.footer.group : {}
26
+
27
+ each value, x in group
28
+ div.footer-group
29
+ h3.footer-title= x
30
+ div.footer-links
31
+ each url, y in value
32
+ a.footer-item(href=url_for(url), title=y, rel="noopener external nofollow noreferrer")= y
33
+
34
+ if theme.footer && theme.footer.randomlink
35
+ div.footer-group
36
+ div.footer-title-group
37
+ h3.footer-title 友链
38
+ a.random-friends-btn(href="javascript:randomLinksList();", rel="external nofollow")
39
+ i.scoicon.sco-refresh-line
40
+ div.footer-links#friend-links-in-footer
41
+ div#footer-bar
42
+ div.footer-bar-links
43
+ div.footer-bar-left
44
+ div#footer-bar-tips
45
+ if moment(theme.aside.siteinfo.runtime).year() === new Date().getFullYear()
46
+ div.copyright © #{moment(theme.aside.siteinfo.runtime).year()} By&nbsp;
47
+ a.footer-bar-link(href="/", rel="external nofollow")= config.author
48
+ else
49
+ div.copyright © #{moment(theme.aside.siteinfo.runtime).year()} - #{new Date().getFullYear()} By&nbsp;
50
+ a.footer-bar-link(href="/", rel="external nofollow")= config.author
51
+ div.footer-bar-right
52
+ if theme.footer && theme.footer.rss && theme.footer.rss.enable
53
+ a.footer-bar-link(href="/rss/", rel="external nofollow", target="_self") 订阅
54
+ a.footer-bar-link(href="https://github.com/DuoSco/hexo-theme-solitude", rel="external nofollow", target="_self") 主题
55
+ if theme.site && theme.site.icp
56
+ a.footer-bar-link(href="https://beian.miit.gov.cn/#/Integrated/index", target="_blank", rel="noopener external nofollow noreferrer noopener")= theme.site.icp
57
+ a.footer-bar-link.cc(href=theme.footer.license.url, target="_self", rel="external nofollow")
58
+ i.scoicon.sco-copyright-line
59
+ i.scoicon.sco-creative-commons-by-line
60
+ i.scoicon.sco-creative-commons-nc-line
61
+ i.scoicon.sco-creative-commons-nd-line
62
+ div.needEndHide#cookies-window
63
+ div.cookies-window-title 协议提醒助手
64
+ div.cookies-window-content
65
+ span.cookies-tip 查看本站为你的个人隐私做出的努力
66
+ a.cookies-link(href="/privacy/", title="本站如何保护你的隐私", data-pjax-state="")
67
+ i.scoicon.sco-arrow-right-circle-fill
68
+ if theme.post.award.enable
69
+ div#quit-box(onclick="RemoveRewardMask()", style="display=none")
70
+ if theme.comment.enable
71
+ div.comment-barrage.needEndHide
@@ -0,0 +1,79 @@
1
+ -
2
+ if (theme.thirdparty.search.enable) {
3
+ var localSearch = 'undefined';
4
+ if (theme.thirdparty.search.local_search.enable)
5
+ localSearch = JSON.stringify({
6
+ preload: theme.thirdparty.search.local_search.preload,
7
+ path: theme.thirdparty.search.local_search.path || '/search.xml'
8
+ })
9
+ var algolia = 'undefined';
10
+ if (theme.thirdparty.search.algolia_search.enable)
11
+ algolia = JSON.stringify({
12
+ appId: config.algolia.appId || config.algolia.applicationID,
13
+ apiKey: config.algolia.apiKey,
14
+ indexName: config.algolia.indexName,
15
+ hits: {
16
+ per_page: theme.thirdparty.search.algolia_search.hits.per_page || 10
17
+ }
18
+ })
19
+ }
20
+
21
+ script.
22
+ const GLOBAL_CONFIG = {
23
+ root: '!{config.root}',
24
+ algolia: !{algolia ? algolia : 'undefined'},
25
+ localsearch: !{localSearch ? localSearch : 'undefined'},
26
+ runtime: '!{theme.aside.siteinfo.runtimeenable ? theme.aside.siteinfo.runtime : false}',
27
+ lazyload: {
28
+ enable: !{theme.lazyload.enable},
29
+ error: '!{theme.lazyload.errorimg}'
30
+ },
31
+ hightlight: {
32
+ enable: !{theme.hightlight.enable},
33
+ limit: '!{theme.hightlight.hightlimit}'
34
+ },
35
+ lightbox: !{theme.lightbox},
36
+ randomlinks: !{theme.footer.randomlink},
37
+ lang: {
38
+ theme: {
39
+ dark: '!{_p('theme.dark')}',
40
+ light: '!{_p('theme.light')}',
41
+ },
42
+ copy: {
43
+ success: '!{_p('copy.success')}',
44
+ error: '!{_p('copy.error')}',
45
+ },
46
+ backtop: '!{_p('nav.backtop')}',
47
+ time: {
48
+ recent: '!{_p('time.recent')}',
49
+ yesterday: '!{_p('time.yesterday')}',
50
+ berforeyesterday: '!{_p('time.berforeyesterday')}',
51
+ daybefore: '!{_p('time.daybefore')}',
52
+ runtime: '!{_p('time.runtime')}',
53
+ },
54
+ sayhello: {
55
+ morning: '!{_p('sayhello.morning')}',
56
+ noon: '!{_p('sayhello.noon')}',
57
+ afternoon: '!{_p('sayhello.afternoon')}',
58
+ night: '!{_p('sayhello.night')}',
59
+ goodnight: '!{_p('sayhello.goodnight')}',
60
+ },
61
+ search: {
62
+ empty: '!{_p('search.empty')}',
63
+ hit: '!{_p('search.hit')}',
64
+ placeholder: '!{_p('search.placeholder')}',
65
+ }
66
+ },
67
+ covercolor: !{theme.post.covercolor.enable},
68
+ comment: {
69
+ enable: !{theme.comment.enable},
70
+ type: '!{theme.comment.type}',
71
+ twikoo: {
72
+ url: '!{theme.comment.twikoo.envId}',
73
+ accessToken: '!{theme.comment.twikoo.accessToken}'
74
+ },
75
+ },
76
+ rightside: {
77
+ enable: !{theme.rightside.enable}
78
+ }
79
+ }
@@ -0,0 +1,59 @@
1
+ if theme.pwa.enable
2
+ meta(name="theme-color", content=theme.pwa.theme_color)
3
+ link(rel="manifest", href=url_for(theme.pwa.manifest))
4
+ if theme.pwa.theme_color
5
+ meta(name="msapplication-TileColor", content=theme.pwa.theme_color)
6
+ if theme.pwa.mask_icon
7
+ link(rel="mask-icon", href=theme.pwa.mask_icon, color=theme.pwa.theme_color)
8
+ if theme.pwa.apple_touch_icon
9
+ link(rel="apple-touch-icon", sizes="180x180", href=theme.pwa.apple_touch_icon)
10
+ link(rel="apple-touch-icon-precomposed", sizes="180x180", href=theme.pwa.apple_touch_icon)
11
+ meta(name="apple-mobile-web-app-title", content=config.title)
12
+ if theme.pwa.favicon_16_16
13
+ link(rel="icon", type="image/png", sizes="16x16", href=theme.pwa.favicon_16_16)
14
+ if theme.pwa.favicon_32_32
15
+ link(rel="icon", type="image/png", sizes="32x32", href=theme.pwa.favicon_32_32)
16
+ if theme.pwa.bookmark_icon
17
+ link(rel="bookmark", href=theme.pwa.bookmark_icon)
18
+ if theme.pwa.startup_image_enable
19
+ -
20
+ var medias = {
21
+ "2048_2732": "(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)",
22
+ "2732_2048": "(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)",
23
+ "1668_2388": "(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)",
24
+ "2388_1668": "(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)",
25
+ "1536_2048": "(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)",
26
+ "2048_1536": "(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)",
27
+ "1668_2224": "(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)",
28
+ "2224_1668": "(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)",
29
+ "1620_2160": "(device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)",
30
+ "2160_1620": "(device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)",
31
+ "1290_2796": "(device-width: 430px) and (device-height: 932px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)",
32
+ "2796_1290": "(device-width: 430px) and (device-height: 932px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)",
33
+ "1179_2556": "(device-width: 393px) and (device-height: 852px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)",
34
+ "2556_1179": "(device-width: 393px) and (device-height: 852px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)",
35
+ "1248_2778": "(device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)",
36
+ "2778_1248": "(device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)",
37
+ "1170_2532": "(device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)",
38
+ "2532_1170": "(device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)",
39
+ "1125_2436": "(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)",
40
+ "2436_1125": "(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)",
41
+ "1242_2688": "(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)",
42
+ "2688_1242": "(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)",
43
+ "828_1792": "(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)",
44
+ "1792_828": "(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)",
45
+ "1242_2208": "(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)",
46
+ "2208_1242": "(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)",
47
+ "750_1334": "(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)",
48
+ "1334_750": "(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)",
49
+ "640_1136": "(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)",
50
+ "1136_640": "(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)",
51
+ }
52
+ each media,size in medias
53
+ if (theme.pwa["favicon_" + size])
54
+ link(rel="apple-touch-startup-image", href=theme.pwa["favicon_" + size], media=media)
55
+
56
+ else
57
+ meta(name="apple-mobile-web-app-capable", content=config.title)
58
+ link(rel="bookmark", href=theme.site.siteIcon)
59
+ link(rel="apple-touch-icon", href=theme.site.siteIcon, sizes="180x180")
@@ -0,0 +1,29 @@
1
+ - let title = page.title, subtitle =''
2
+ - if (is_home()) title = config.title
3
+ - else if (is_archive()) title = _p('page.archives') + (page.year || "")
4
+ - else if (is_tag()) title = _p('page.tag')+': ' + page.tag
5
+ - else if (is_category()) title = _p('page.category') +': ' + page.category
6
+ - else if (page.type === '404') title = '404'+': ' + theme.errorpage.text
7
+ - else if (is_post() || is_page()) title = page.title
8
+
9
+ - if (is_home()) subtitle = config.subtitle ? ' - ' + config.subtitle : ''
10
+ - else subtitle = title ? ' | ' + config.title : config.title
11
+ - var description = page.desc || page.excerpt || config.description
12
+
13
+ meta(charset="utf-8")
14
+ meta(http-equiv="X-UA-Compatible", content="IE=edge")
15
+ meta(name="viewport" content="width=device-width, initial-scale=1")
16
+
17
+ title= title + subtitle
18
+ noscript 开启JavaScript才能访问本站哦
19
+ link(rel="icon", href=theme.site.siteIcon)
20
+ meta(name="description", content=description)
21
+
22
+ // index.css
23
+ link(rel="stylesheet", href="/css/index.css")
24
+
25
+ // inject head
26
+ include ./inject/head.pug
27
+
28
+ // global head
29
+ include ./head/config.pug
@@ -0,0 +1,4 @@
1
+ header(class=is_post() ? 'post-bg' : 'not-top-img', id="page-header")
2
+ include ./nav.pug
3
+ if is_post()
4
+ include ./widgets/post/postMeta.pug
@@ -0,0 +1,68 @@
1
+ - cdn = theme.cdn.body
2
+
3
+ script(src=url_for(cdn.pjaxjs))
4
+ if theme.lazyload.enable
5
+ script(src=url_for(cdn.lazyloadjs))
6
+ script(src=url_for(cdn.snackbarjs))
7
+ if theme.lightbox
8
+ script(src=url_for(cdn.viewimagejs))
9
+ if theme.says.home_mini || theme.aside.history.enable
10
+ script(src=url_for(cdn.swiperjs))
11
+
12
+ if theme.rightside.enable
13
+ include ../widgets/rightside/index.pug
14
+ script(src='/js/rightside.js')
15
+
16
+ div#js-pjax
17
+ if page.type === 'says'
18
+ script(src=url_for(cdn.waterfalljs))
19
+ script.
20
+ window.addEventListener('resize', utils.throttle(function () {
21
+ if (document.getElementById('waterfall')) {
22
+ sco.reflashEssayWaterFall();
23
+ }
24
+ }), 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))
27
+
28
+ script#config-diff.
29
+ var PAGE_CONFIG = {
30
+ is_post: !{is_post()},
31
+ is_page: !{is_page()},
32
+ is_home: !{is_home()},
33
+ page: '!{page.type || 'default'}',
34
+ toc: !{!!page.toc},
35
+ comment: !{!!page.comment},
36
+ }
37
+ if theme.thirdparty.aplayer.enable
38
+ script(src=url_for(cdn.aplayerjs))
39
+ script(src=url_for(cdn.metingjs))
40
+ script.
41
+ const meting_api = '!{theme.thirdparty.aplayer.api}';
42
+
43
+ if theme.post.covercolor
44
+ script(src='/js/extend/covercolor/local.js')
45
+
46
+ if theme.footer.randomlink
47
+ include ../widgets/randomlink.pug
48
+
49
+ if page.katex
50
+ link(rel="stylesheet", href=url_for(cdn.katexcss))
51
+ script(src=url_for(cdn.katexjs))
52
+
53
+ if theme.aside.welcome.enable
54
+ script(src='/js/txmap.js')
55
+
56
+ if theme.comment.enable
57
+ script(src='/js/extend/console/comment.js')
58
+
59
+ if theme.comment.type === 'twikoo'
60
+ script(src='/js/commentBarrage.js')
61
+
62
+ // pjax
63
+ include ../widgets/third-party/pjax.pug
64
+
65
+ // inject custom body
66
+ if theme.extends.body
67
+ each item in theme.extends.body
68
+ item
@@ -1,31 +1,55 @@
1
- <% const cdn = theme.cdn.head %>
2
- <% if(theme.verify.baidu){%>
3
- <meta name="baidu-site-verification" content="<%- theme.verify.baidu %>" />
4
- <%} %>
5
- <% if(theme.loading.pace){ %>
6
- <script data-pace-options="{ &quot;restartOnRequestAfter&quot;:false,&quot;eventLag&quot;:false}" src="<%= cdn.pacejs %>"></script>
7
- <% } %>
8
- <% if(theme.icon.customicon){ %>
9
- <%- css(theme.icon.customicon) %>
10
- <% } %>
11
- <%- css(cdn.scoicon) %>
12
- <%- css(cdn.snackbarcss) %>
13
- <% if(theme.comment.enable){ %>
14
- <%- css('/css/commentBarrage') %>
15
- <%- js(cdn.twikoojs) %>
16
- <% } %>
17
- <% if(theme.thirdparty.search.algolia_search.enable){ %>
18
- <%- js(cdn.instantsearch) %>
19
- <%- js(cdn.algolia) %>
20
- <% } %>
21
- <% if(theme.thirdparty.aplayer.enable){%>
22
- <%- css(cdn.aplayercss) %>
23
- <%} %>
24
- <% if(theme.hometop.bbtime || theme.aside.history.enable){ %>
25
- <%- css(cdn.swipercss) %>
26
- <% } %>
27
- <script>
28
- (win=> {
1
+ - var cdn = theme.cdn.head
2
+
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.loading.pace
10
+ script(src=cdn.pace, data-pace-options='{ &quot;restartOnRequestAfter&quot;:false,&quot;eventLag&quot;:false}')
11
+
12
+ // pwa
13
+ if theme.pwa.enable
14
+ include ../head/pwa.pug
15
+
16
+ link(rel="stylesheet", href=cdn.scoicon)
17
+ link(rel="stylesheet", href=cdn.snackbarcss)
18
+
19
+ // comment
20
+ if theme.comment.enable
21
+ if theme.comment.type === 'twikoo'
22
+ script(src=cdn.twikoojs)
23
+
24
+ // search
25
+ if theme.thirdparty.search.enable
26
+ if theme.thirdparty.search.type === 'algolia'
27
+ script(src=url_for(cdn.instantsearch))
28
+ script(src=url_for(cdn.algoliajs))
29
+
30
+ // aplayer
31
+ if theme.thirdparty.aplayer.enable
32
+ link(rel="stylesheet", href=cdn.aplayercss)
33
+
34
+ // swiper
35
+ if theme.says.home_mini || theme.aside.history.enable
36
+ link(rel="stylesheet", href=cdn.swipercss)
37
+
38
+ // custom inject
39
+ if theme.extends.head
40
+ each item in theme.extends.head
41
+ item
42
+
43
+ // post-ai
44
+ if theme.thirdparty.ai.enable
45
+ script(src='/lib/chuckle-post-ai.js')
46
+
47
+ // echarts
48
+ if theme.about.echarts.enable && theme.about.enable
49
+ script(src=url_for(cdn.echartsjs))
50
+
51
+ script.
52
+ (win => {
29
53
  win.saveToLocal = {
30
54
  set: function setWithExpiry(key, value, ttl) {
31
55
  if (ttl === 0)
@@ -56,12 +80,11 @@
56
80
  }
57
81
  }
58
82
 
59
- const DarkModeStatus = saveToLocal.get('theme')
60
- if(DarkModeStatus !== undefined){
61
- if(DarkModeStatus === 'dark'){
83
+ const DarkModeStatus = localStorage.getItem('theme')
84
+ if (DarkModeStatus !== null) {
85
+ if (DarkModeStatus === 'dark') {
62
86
  document.documentElement.setAttribute('data-theme', 'dark')
63
-
64
- }else{
87
+ } else {
65
88
  document.documentElement.setAttribute('data-theme', 'light')
66
89
  }
67
90
  }
@@ -78,7 +101,7 @@
78
101
  )(window)
79
102
 
80
103
  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");
81
- </script>
82
- <% if(theme.ai.enable){ %>
83
- <%- js('/lib/chuckle-post-ai') %>
84
- <% } %>
104
+
105
+ div
106
+ script(src="/js/utils.js")
107
+ script(src="/js/main.js")
@@ -0,0 +1,35 @@
1
+ doctype html
2
+ html(lang=config.language, data-theme="light")
3
+ head
4
+ include ./head.pug
5
+ body(id="body")
6
+ // loading
7
+ if theme.loading.fullpage
8
+ include ./loading.pug
9
+
10
+ // console
11
+ include ./console.pug
12
+
13
+ // sidebar
14
+ include ./sidebar.pug
15
+
16
+ if(page.type !== '404')
17
+ div(class = is_post() ? 'post' : 'page', id="body-wrap")
18
+ include ./header.pug
19
+
20
+ block content
21
+
22
+ footer#footer
23
+ include ./footer.pug
24
+ else
25
+ div.error#body-wrap
26
+ block content
27
+
28
+ // inject body
29
+ include ./inject/body.pug
30
+
31
+ // search
32
+ include ./widgets/third-party/search/index.pug
33
+
34
+ // music
35
+ include ./widgets/third-party/music.pug
@@ -1,26 +1,29 @@
1
- <div id="loading-box" onclick="preloader.endLoading();" class style="zoom: 1;">
2
- <div class="loading-bg">
3
- <img class="loading-img nolazyload" alt="loading image"
4
- src="<%= theme.site.icon %>">
5
- </div>
6
- </div>
7
- <script>
1
+ div(id="loading-box" onclick="preloader.endLoading();" style="zoom:1")
2
+ div.loading-bg
3
+ img.loading-img(src=url_for(theme.site.icon), alt="loading image")
4
+
5
+ script.
8
6
  const preloader = {
9
7
  endLoading: () => {
10
- document.getElementById('loading-box').classList.add("loaded")
8
+ document.getElementById('loading-box').classList.add('loaded');
11
9
  },
12
10
  initLoading: () => {
13
- document.getElementById('loading-box').classList.remove("loaded")
11
+ document.getElementById('loading-box').classList.remove('loaded');
14
12
  },
15
13
  removePaceDone: () => {
16
- document.getElementById('body').classList = 'pace-done'
14
+ document.getElementById('body').classList = 'pace-done';
17
15
  }
18
16
  }
19
- window.addEventListener('load',()=> { preloader.endLoading() })
20
- document.addEventListener('pjax:send', () => { preloader.initLoading() })
21
- document.addEventListener('pjax:complete', () => { preloader.endLoading() })
22
- </script>
23
- <style>
17
+ window.addEventListener('load', () => {
18
+ preloader.endLoading();
19
+ });
20
+ window.addEventListener('pjax:send', () => {
21
+ preloader.initLoading();
22
+ });
23
+ document.addEventListener('pjax:complete', () => {
24
+ preloader.endLoading();
25
+ });
26
+ style.
24
27
  #loading-box {
25
28
  -webkit-user-select: none;
26
29
  }
@@ -82,5 +85,4 @@
82
85
  to {
83
86
  opacity: 1;
84
87
  }
85
- }
86
- </style>
88
+ }