hexo-theme-solitude 1.3.1 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/.github/FUNDING.yml +13 -0
  2. package/.github/ISSUE_TEMPLATE/bug_report.yml +107 -0
  3. package/.github/ISSUE_TEMPLATE/config.yml +13 -0
  4. package/.github/ISSUE_TEMPLATE/feature_request.yml +14 -0
  5. package/.github/workflows/npm-publish.yml +21 -0
  6. package/CONTRIBUTING.md +0 -0
  7. package/LICENSE +0 -0
  8. package/README.md +60 -43
  9. package/README_EN.md +60 -42
  10. package/_config.yml +606 -451
  11. package/languages/en-US.yml +3 -23
  12. package/languages/zh-CN.yml +3 -23
  13. package/layout/404.pug +0 -0
  14. package/layout/archive.pug +0 -0
  15. package/layout/category.pug +0 -0
  16. package/layout/includes/body/mode.pug +1 -6
  17. package/layout/includes/console.pug +3 -3
  18. package/layout/includes/footer.pug +16 -15
  19. package/layout/includes/head/config.pug +38 -30
  20. package/layout/includes/head/opengraph.pug +0 -0
  21. package/layout/includes/head/pwa.pug +5 -44
  22. package/layout/includes/head.pug +3 -1
  23. package/layout/includes/header.pug +0 -0
  24. package/layout/includes/inject/body.pug +114 -65
  25. package/layout/includes/inject/head.pug +11 -46
  26. package/layout/includes/layout.pug +1 -2
  27. package/layout/includes/loading.pug +0 -0
  28. package/layout/includes/mixins/articleSort.pug +0 -0
  29. package/layout/includes/mixins/pagination.pug +0 -0
  30. package/layout/includes/nav.pug +1 -1
  31. package/layout/includes/page/about.pug +1 -1
  32. package/layout/includes/page/categories.pug +0 -0
  33. package/layout/includes/page/default.pug +0 -0
  34. package/layout/includes/page/equipment.pug +0 -0
  35. package/layout/includes/page/links.pug +2 -2
  36. package/layout/includes/page/music.pug +0 -0
  37. package/layout/includes/page/not_configured.pug +0 -0
  38. package/layout/includes/page/rss.pug +3 -3
  39. package/layout/includes/page/says.pug +15 -15
  40. package/layout/includes/page/tags.pug +0 -0
  41. package/layout/includes/page/tlink.pug +1 -0
  42. package/layout/includes/recent-posts.pug +0 -0
  43. package/layout/includes/sidebar.pug +0 -0
  44. package/layout/includes/widgets/aside/aside.pug +6 -6
  45. package/layout/includes/widgets/aside/asideAllInfo.pug +0 -0
  46. package/layout/includes/widgets/aside/asideArchive.pug +0 -0
  47. package/layout/includes/widgets/aside/asideCustom.pug +1 -1
  48. package/layout/includes/widgets/aside/asideFlipCard.pug +0 -0
  49. package/layout/includes/widgets/aside/asideInfoCard.pug +3 -3
  50. package/layout/includes/widgets/aside/asideNewestPost.pug +0 -0
  51. package/layout/includes/widgets/aside/asideSwitch.pug +0 -4
  52. package/layout/includes/widgets/aside/asideTag.pug +1 -1
  53. package/layout/includes/widgets/aside/asideToc.pug +0 -0
  54. package/layout/includes/widgets/aside/asideWebInfo.pug +2 -2
  55. package/layout/includes/widgets/home/banner.pug +0 -0
  56. package/layout/includes/widgets/home/bb/json.pug +22 -0
  57. package/layout/includes/widgets/home/bb/local.pug +17 -0
  58. package/layout/includes/widgets/home/bb/memos.pug +25 -0
  59. package/layout/includes/widgets/home/bbTimeList.pug +11 -7
  60. package/layout/includes/widgets/home/categoryBar.pug +0 -0
  61. package/layout/includes/widgets/home/categoryGroup.pug +1 -1
  62. package/layout/includes/widgets/home/hometop.pug +0 -0
  63. package/layout/includes/widgets/home/postList.pug +0 -0
  64. package/layout/includes/widgets/home/topGroup.pug +0 -0
  65. package/layout/includes/widgets/nav/left.pug +0 -0
  66. package/layout/includes/widgets/nav/menu.pug +1 -1
  67. package/layout/includes/widgets/nav/right.pug +6 -5
  68. package/layout/includes/widgets/page/about/authorinfo.pug +10 -9
  69. package/layout/includes/widgets/page/about/award.pug +0 -0
  70. package/layout/includes/widgets/page/about/contentinfo.pug +35 -34
  71. package/layout/includes/widgets/page/about/hobbies.pug +21 -17
  72. package/layout/includes/widgets/page/about/motto.pug +17 -16
  73. package/layout/includes/widgets/page/about/other.pug +16 -16
  74. package/layout/includes/widgets/page/about/personalities.pug +15 -14
  75. package/layout/includes/widgets/page/about/skillsinfo.pug +37 -36
  76. package/layout/includes/widgets/page/about/tenyear.pug +0 -0
  77. package/layout/includes/widgets/page/banner.pug +9 -3
  78. package/layout/includes/widgets/page/equipment/content.pug +0 -0
  79. package/layout/includes/widgets/page/links/banner.pug +14 -12
  80. package/layout/includes/widgets/page/links/linksCard.pug +4 -6
  81. package/layout/includes/widgets/page/links/linksDiscn.pug +8 -0
  82. package/layout/includes/widgets/page/links/linksItem.pug +4 -6
  83. package/layout/includes/widgets/page/says/json.pug +80 -0
  84. package/layout/includes/widgets/page/says/local.pug +48 -0
  85. package/layout/includes/widgets/page/says/memos.pug +109 -0
  86. package/layout/includes/widgets/post/award.pug +0 -0
  87. package/layout/includes/widgets/post/copyright.pug +2 -2
  88. package/layout/includes/widgets/post/post-ai.pug +12 -0
  89. package/layout/includes/widgets/post/postMeta.pug +2 -2
  90. package/layout/includes/widgets/post/postNav.pug +0 -0
  91. package/layout/includes/widgets/post/wave.pug +0 -0
  92. package/layout/includes/widgets/randomlink.pug +1 -1
  93. package/layout/includes/widgets/rightside/index.pug +6 -5
  94. package/layout/includes/widgets/third-party/comments/comment.pug +1 -5
  95. package/layout/includes/widgets/third-party/comments/twikoo.pug +1 -1
  96. package/layout/includes/widgets/third-party/comments/waline.pug +9 -11
  97. package/layout/includes/widgets/third-party/music.pug +1 -1
  98. package/layout/includes/widgets/third-party/news-comment/newest-comment.pug +6 -0
  99. package/layout/includes/widgets/third-party/news-comment/twikoo.pug +70 -0
  100. package/layout/includes/widgets/third-party/news-comment/waline.pug +64 -0
  101. package/layout/includes/widgets/third-party/pjax.pug +0 -0
  102. package/layout/includes/widgets/third-party/search/algolia-search.pug +0 -0
  103. package/layout/includes/widgets/third-party/search/index.pug +8 -7
  104. package/layout/includes/widgets/third-party/search/local-search.pug +0 -0
  105. package/layout/index.pug +3 -3
  106. package/layout/page.pug +0 -4
  107. package/layout/post.pug +2 -2
  108. package/layout/tag.pug +0 -0
  109. package/package.json +18 -9
  110. package/plugins.yml +109 -0
  111. package/scripts/event/cdn.js +129 -0
  112. package/scripts/event/init.js +0 -0
  113. package/scripts/event/page.js +1 -21
  114. package/scripts/event/welcome.js +1 -1
  115. package/scripts/filter/checkThemeConfig.js +0 -0
  116. package/scripts/filter/default.js +0 -0
  117. package/scripts/filter/lazyload.js +1 -1
  118. package/scripts/filter/randomPosts.js +0 -0
  119. package/scripts/helper/cdn.js +0 -0
  120. package/scripts/helper/getArchiveLength.js +0 -0
  121. package/scripts/helper/page.js +0 -0
  122. package/scripts/helper/related_post.js +0 -0
  123. package/scripts/helper/stylus.js +0 -0
  124. package/scripts/tags/button.js +0 -0
  125. package/scripts/tags/bvideo.js +0 -0
  126. package/scripts/tags/card.js +0 -0
  127. package/scripts/tags/checkbox.js +0 -0
  128. package/scripts/tags/fold.js +0 -0
  129. package/scripts/tags/image.js +0 -0
  130. package/scripts/tags/inline-image.js +0 -0
  131. package/scripts/tags/label.js +0 -0
  132. package/scripts/tags/link.js +0 -0
  133. package/scripts/tags/media.js +0 -0
  134. package/scripts/tags/note.js +0 -0
  135. package/scripts/tags/span.js +0 -0
  136. package/scripts/tags/tabs.js +0 -0
  137. package/scripts/tags/timeline.js +0 -0
  138. package/scripts/tags/u.js +0 -0
  139. package/source/css/_global/animation.css +0 -0
  140. package/source/css/_global/function.styl +42 -42
  141. package/source/css/_global/index.styl +1 -1
  142. package/source/css/_global/var.styl +0 -0
  143. package/source/css/_layout/basic.styl +10 -12
  144. package/source/css/_layout/header.styl +7 -2
  145. package/source/css/_layout/index.styl +59 -5
  146. package/source/css/_mode/index.styl +1 -17
  147. package/source/css/_page/_home/category-bar.styl +0 -0
  148. package/source/css/_page/_home/home-top.styl +10 -31
  149. package/source/css/_page/_home/index.styl +0 -0
  150. package/source/css/_page/_home/pagination.styl +3 -0
  151. package/source/css/_page/_home/recent-post.styl +10 -3
  152. package/source/css/_page/about/index.styl +0 -0
  153. package/source/css/_page/about/tenyear.styl +0 -0
  154. package/source/css/_page/about.styl +9 -0
  155. package/source/css/_page/category.styl +0 -0
  156. package/source/css/_page/douban.styl +0 -1
  157. package/source/css/_page/equipment.styl +0 -0
  158. package/source/css/_page/error.styl +0 -0
  159. package/source/css/_page/home.styl +0 -0
  160. package/source/css/_page/index.styl +2 -3
  161. package/source/css/_page/links.styl +84 -49
  162. package/source/css/_page/moment.styl +0 -0
  163. package/source/css/_page/music.styl +0 -0
  164. package/source/css/_page/rss.styl +0 -0
  165. package/source/css/_page/says.styl +10 -0
  166. package/source/css/_page/tag.styl +0 -0
  167. package/source/css/_widgets/_aside/allinfo.styl +34 -0
  168. package/source/css/_widgets/_aside/flip.styl +0 -0
  169. package/source/css/_widgets/_aside/index.styl +1 -7
  170. package/source/css/_widgets/_aside/info.styl +0 -0
  171. package/source/css/_widgets/_aside/newPost.styl +0 -0
  172. package/source/css/_widgets/_aside/toc.styl +0 -0
  173. package/source/css/_widgets/_aside/welcome.styl +0 -0
  174. package/source/css/_widgets/_comment/index.styl +0 -0
  175. package/source/css/_widgets/_comment/twikoo.styl +0 -2
  176. package/source/css/_widgets/_comment/waline.styl +0 -0
  177. package/source/css/_widgets/_extra/console.styl +0 -0
  178. package/source/css/_widgets/_extra/fullpage.styl +0 -0
  179. package/source/css/_widgets/_extra/music.styl +1 -1
  180. package/source/css/_widgets/_extra/pace.styl +0 -0
  181. package/source/css/_widgets/_extra/rightmenu.styl +0 -0
  182. package/source/css/_widgets/_mixins/article-sort.styl +0 -0
  183. package/source/css/_widgets/_mixins/footer.styl +1 -2
  184. package/source/css/_widgets/_mixins/other.styl +0 -4
  185. package/source/css/_widgets/_mixins/sidebar.styl +0 -0
  186. package/source/css/_widgets/_post/_highlight/diff.styl +0 -0
  187. package/source/css/_widgets/_post/_highlight/index.styl +0 -1
  188. package/source/css/_widgets/_post/_highlight/theme/default.styl +0 -0
  189. package/source/css/_widgets/_post/_highlight/theme/mac.styl +0 -0
  190. package/source/css/_widgets/_post/_highlight/theme.styl +0 -0
  191. package/source/css/_widgets/_post/commentBarrage.styl +0 -0
  192. package/source/css/_widgets/_post/content.styl +42 -11
  193. package/source/css/_widgets/_post/copyright.styl +0 -0
  194. package/source/css/_widgets/_post/index.styl +1 -1
  195. package/source/css/_widgets/_post/meta.styl +0 -3
  196. package/source/css/_widgets/_post/pagination.styl +1 -1
  197. package/source/css/_widgets/_post/postAI.styl +0 -0
  198. package/source/css/_widgets/_post/relatedPost.styl +0 -0
  199. package/source/css/_widgets/_post/tools.styl +0 -0
  200. package/source/css/_widgets/_search/algolia-search.styl +0 -0
  201. package/source/css/_widgets/_search/local-search.styl +0 -0
  202. package/source/css/_widgets/_tags/button.styl +0 -0
  203. package/source/css/_widgets/_tags/bvideo.styl +0 -0
  204. package/source/css/_widgets/_tags/card.styl +0 -0
  205. package/source/css/_widgets/_tags/checkbox.styl +0 -0
  206. package/source/css/_widgets/_tags/fold.styl +0 -0
  207. package/source/css/_widgets/_tags/image.styl +0 -0
  208. package/source/css/_widgets/_tags/index.styl +0 -0
  209. package/source/css/_widgets/_tags/inline-image.styl +0 -0
  210. package/source/css/_widgets/_tags/label.styl +0 -0
  211. package/source/css/_widgets/_tags/link.styl +4 -2
  212. package/source/css/_widgets/_tags/note.styl +0 -0
  213. package/source/css/_widgets/_tags/span.styl +0 -0
  214. package/source/css/_widgets/_tags/tabs.styl +0 -0
  215. package/source/css/_widgets/_tags/timeline.styl +0 -1
  216. package/source/css/_widgets/index.styl +4 -4
  217. package/source/css/index.styl +0 -0
  218. package/source/img/avatar.png +0 -0
  219. package/source/img/default.png +0 -0
  220. package/source/img/error_load.png +0 -0
  221. package/source/js/{extend/comment/twikoo/commentBarrage.js → comment/twikoo_commentBarrage.js} +0 -0
  222. package/source/js/{extend/comment/waline/commentBarrage.js → comment/waline_commentBarrage.js} +0 -0
  223. package/source/js/covercolor/api.js +95 -0
  224. package/source/js/covercolor/local.js +154 -0
  225. package/source/js/main.js +28 -235
  226. package/source/js/music.js +0 -0
  227. package/source/js/rightside.js +404 -0
  228. package/source/js/{extend/search/algolia-search.js → search/algolia.js} +10 -0
  229. package/source/js/{extend/search/local-search.js → search/local.js} +24 -2
  230. package/source/js/utils.js +75 -1
  231. package/layout/includes/head/fest.pug +0 -22
  232. package/layout/includes/page/echarts.pug +0 -7
  233. package/layout/includes/page/moments.pug +0 -4
  234. package/layout/includes/widgets/aside/asideHistory.pug +0 -8
  235. package/layout/includes/widgets/aside/asideWelcome.pug +0 -12
  236. package/layout/includes/widgets/page/moments/angle.pug +0 -19
  237. package/layout/includes/widgets/page/moments/index.pug +0 -23
  238. package/layout/includes/widgets/page/says/saysBottom.pug +0 -11
  239. package/layout/includes/widgets/page/says/saysContent.pug +0 -6
  240. package/layout/includes/widgets/page/says/saysFunction.pug +0 -10
  241. package/layout/includes/widgets/page/says/saysMeta.pug +0 -7
  242. package/layout/includes/widgets/third-party/ai/index.pug +0 -12
  243. package/layout/includes/widgets/third-party/comments/gitalk.pug +0 -0
  244. package/layout/includes/widgets/third-party/comments/valine.pug +0 -0
  245. package/scripts/helper/echarts.js +0 -407
  246. package/source/css/_widgets/_aside/history.styl +0 -42
  247. package/source/js/extend/comment/twikoo/twikoo.js +0 -67
  248. package/source/js/extend/comment/waline/waline.js +0 -60
  249. package/source/lib/bundle.min.js +0 -27
  250. package/source/lib/circle.min.js +0 -1
  251. package/source/lib/cover-color.min.js +0 -7
  252. package/source/lib/friends_post.js +0 -4
  253. package/source/lib/lazyload.min.js +0 -1
  254. package/source/lib/rightside.min.js +0 -1
  255. package/source/lib/snackbar.min.css +0 -1
  256. package/source/lib/snackbar.min.js +0 -9
  257. package/source/lib/txmap.min.js +0 -1
  258. package/source/lib/universe.min.js +0 -1
  259. package/source/lib/view-image.min.js +0 -6
  260. package/source/lib/waterfall.min.js +0 -1
  261. /package/source/{lib → js}/sco-ai.min.js +0 -0
@@ -13,24 +13,16 @@ time:
13
13
  daybefore: Days ago
14
14
  runtime: days
15
15
 
16
- sayhello:
17
- morning: The plan of the day is in the morning
18
- noon: Only when you are full can you have the strength to work
19
- afternoon: Concentrate and overcome the difficulties
20
- night: Don't get too tired, it's healthier to go to bed early
21
- goodnight: Get a good night's sleep and keep yourself energized
22
-
23
16
  page:
24
17
  tag: Tags
25
18
  category: Categories
19
+ tags: All tags
20
+ categories: All categories
26
21
  archives: Archives
27
22
  echarts: Echarts
28
23
 
29
24
  home:
30
25
  bannertext: Just browsing
31
- bbtime:
32
- text: Read more
33
- image: [ Image ]
34
26
  categoryBar:
35
27
  home: Home
36
28
  more: More
@@ -42,16 +34,6 @@ home:
42
34
  recommend: Favor
43
35
  recommendmore: More
44
36
 
45
- about:
46
- info:
47
- title1: Hello, nice to meet you👋
48
- title2: 'My name is '
49
- title3: 'I am a '
50
- tip1: Pursue
51
- tip2: Originated from
52
- tip3: 'Love to go '
53
- tip4: Create
54
-
55
37
  post:
56
38
  meta_reprint: Reprint or translation
57
39
  meta_original: Original
@@ -89,7 +71,7 @@ search:
89
71
 
90
72
  head:
91
73
  noscript: Please enable JavaScript to view the site
92
- console: 'Program: Hexo | Theme: Hexo-Theme-Solitude | Author: WangZhuoSco、YiFeng | Github: https://github.com/DuoSco/Hexo-theme-solitude | Version: v1.3.1 😄'
74
+ console: 'Program: Hexo | Theme: Hexo-Theme-Solitude | Author: WangZhuoSco、YiFeng | Github: https://github.com/DuoSco/Hexo-theme-solitude | Version: v1.4.0 😄'
93
75
 
94
76
  aside:
95
77
  postcount: 'Posts :'
@@ -98,12 +80,10 @@ aside:
98
80
  runtime: 'Runtime :'
99
81
  updatetime: 'Last update :'
100
82
  wordcount: 'Word count :'
101
- welcome: Visitors
102
83
  toc: Table of contents
103
84
  tagmore: View all
104
85
  avatar: Avatar
105
86
  sticker: Mood sticker
106
- history: On this day
107
87
  newpost: New posts
108
88
 
109
89
  console:
@@ -13,16 +13,11 @@ time:
13
13
  daybefore: 天前
14
14
  runtime: 天
15
15
 
16
- sayhello:
17
- morning: 一日之计在于晨
18
- noon: 吃饱了才有力气干活
19
- afternoon: 集中精力,攻克难关
20
- night: 不要太劳累了,早睡更健康
21
- goodnight: 睡个好觉,保证精力充沛
22
-
23
16
  page:
24
17
  tag: 标签
25
18
  category: 分类
19
+ tags: 全部标签
20
+ categories: 全部分类
26
21
  archives: 文章
27
22
  echarts: 博客统计
28
23
 
@@ -36,9 +31,6 @@ nav:
36
31
 
37
32
  home:
38
33
  bannertext: 随便逛逛
39
- bbtime:
40
- text: 查看全文
41
- image: 【图片】
42
34
  categoryBar:
43
35
  home: 首页
44
36
  more: 更多
@@ -50,16 +42,6 @@ home:
50
42
  recommend: 荐
51
43
  recommendmore: 更多推荐
52
44
 
53
- about:
54
- info:
55
- title1: 你好,很高兴认识你👋
56
- title2: 我叫
57
- title3: 是一名
58
- tip1: 追求
59
- tip2: 源于
60
- tip3: 热爱而去
61
- tip4: 创造
62
-
63
45
  post:
64
46
  meta_reprint: 转载或翻译
65
47
  meta_original: 原创
@@ -88,7 +70,7 @@ search:
88
70
 
89
71
  head:
90
72
  noscript: 开启JavaScript才能访问本站哦~
91
- console: '程序:Hexo | 主题:Hexo-Theme-Solitude | 作者:王卓Sco、亦封 | Github: https://github.com/DuoSco/Hexo-theme-solitude | 版本:v1.3.1 😄'
73
+ console: '程序:Hexo | 主题:Hexo-Theme-Solitude | 作者:王卓Sco、亦封 | Github: https://github.com/DuoSco/Hexo-theme-solitude | 版本:v1.4.0 😄'
92
74
 
93
75
  aside:
94
76
  postcount: '文章总数 :'
@@ -97,12 +79,10 @@ aside:
97
79
  runtime: '建站天数 :'
98
80
  updatetime: '最后更新 :'
99
81
  wordcount: '全站字数 :'
100
- welcome: 来访者
101
82
  toc: 文章目录
102
83
  tagmore: 查看全部
103
84
  avatar: 头像
104
85
  sticker: 心情贴纸
105
- history: 那年今日
106
86
  newpost: 最近发布
107
87
 
108
88
  console:
package/layout/404.pug CHANGED
File without changes
File without changes
File without changes
@@ -32,9 +32,4 @@ case theme.display_mode.type
32
32
  else
33
33
  document.documentElement.setAttribute('data-theme', cachedMode);
34
34
  }
35
- initTheme()
36
-
37
- if theme.display_mode.dark_universe
38
- script(src=cdn_url_for("/lib/universe.min.js"))
39
- script.
40
- dark()
35
+ initTheme()
@@ -1,7 +1,7 @@
1
1
  div#console
2
2
  div.close-btn(onclick="sco.hideConsole()")
3
3
  i.scoicon.sco-close-fill
4
- if theme.thirdparty.consolePlus
4
+ if theme.comment.newComment
5
5
  div.console-card-group
6
6
  div.console-card-group-left
7
7
  div.console-card#card-newest-comments(onclick="sco.hideConsole()")
@@ -30,11 +30,11 @@ div#console
30
30
  div.console-btn-item#consoleHideAside
31
31
  a.asideSwitch(onclick="sco.switchHideAside()", title=_p('console.switch_hideAside'), href="javascript:void(0);")
32
32
  i.scoicon.sco-side-bar-fill
33
- if theme.thirdparty.aplayer.enable
33
+ if theme.capsule.enable
34
34
  div.console-btn-item#consoleMusic(onclick="sco.musicToggle()")
35
35
  a.music-switch(title=_p('console.switch_music'), href="javascript:void(0);")
36
36
  i.scoicon.sco-disc-fill
37
- if theme.comment.commentBarrage
37
+ if theme.comment.enable && theme.comment.commentBarrage
38
38
  div.console-btn-item.on#consoleCommentBarrage(onclick="sco.switchCommentBarrage()")
39
39
  a.commentBarrage
40
40
  i.scoicon.sco-chat-fill
@@ -9,19 +9,19 @@ div#sco-footer-bar
9
9
  div.footer-bar-description= __('footer.description').replace(/\$\{title}/, config.title + " - " + config.subtitle)
10
10
  a.footer-bar-link(href="/")= __('footer.learnmore')
11
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 : {}
12
+ - var leftInfo = theme.footer && theme.footer.information && theme.footer.information.left || {}
13
+ - var rightInfo = theme.footer && theme.footer.information && theme.footer.information.right || {}
14
14
 
15
15
  each value, i in leftInfo
16
16
  a.deal_link(href=url_for(value.url), title=i)
17
- i(class=value.icon)
17
+ i.scoicon(class=value.icon)
18
18
 
19
19
  div#footer_mini_logo.footer_mini_logo(title=_p('nav.backtop'), onclick="sco.toTop()")
20
20
  img(src=theme.site.icon, alt=_p('nav.backtop'))
21
21
 
22
22
  each value, i in rightInfo
23
23
  a.deal_link(href=url_for(value.url), title=i)
24
- i(class=value.icon)
24
+ i.scoicon(class=value.icon)
25
25
  div#sco-footer
26
26
  - var group = theme.footer && theme.footer.group ? theme.footer.group : {}
27
27
 
@@ -49,21 +49,22 @@ div#footer-bar
49
49
  div.copyright © #{moment(theme.aside.siteinfo.runtime).year()} - #{new Date().getFullYear()} By 
50
50
  a.footer-bar-link(href="/")= config.author
51
51
  div.footer-bar-right
52
- if theme.footer.rss.enable
53
- a.footer-bar-link(href="/rss/", target="_self")= _p('footer.rss')
52
+ if theme.footer.rss
53
+ a.footer-bar-link(href=theme.footer.rss)= _p('footer.rss')
54
54
  a.footer-bar-link(href="https://github.com/DuoSco/hexo-theme-solitude")= _p('footer.theme')
55
55
  if theme.site && theme.site.icp
56
- a.footer-bar-link(href="https://beian.miit.gov.cn/#/Integrated/index")= theme.site.icp
57
- a.footer-bar-link.cc(href=theme.footer.license.url)
56
+ a.footer-bar-link(href=theme.site.icp_url || "https://beian.miit.gov.cn/#/Integrated/index")= theme.site.icp
57
+ a.footer-bar-link.cc(href=theme.footer.license)
58
58
  i.scoicon.sco-copyright-line
59
59
  i.scoicon.sco-creative-commons-by-line
60
60
  i.scoicon.sco-creative-commons-nc-line
61
61
  i.scoicon.sco-creative-commons-nd-line
62
- div.needEndHide#cookies-window
63
- div.cookies-window-title= __('cookies.title')
64
- div.cookies-window-content
65
- span.cookies-tip= __('cookies.tip')
66
- a.cookies-link(href="/privacy/", title=_p('cookies.privacy'))
67
- i.scoicon.sco-right-btn-fill
68
- if theme.comment.commentBarrage
62
+ if theme.footer.privacy
63
+ div.needEndHide#cookies-window
64
+ div.cookies-window-title= __('cookies.title')
65
+ div.cookies-window-content
66
+ span.cookies-tip= __('cookies.tip')
67
+ a.cookies-link(href=theme.footer.privacy, title=_p('cookies.privacy'))
68
+ i.scoicon.sco-right-btn-fill
69
+ if theme.comment.enable && theme.comment.commentBarrage
69
70
  div.comment-barrage.needEndHide
@@ -1,25 +1,30 @@
1
1
  -
2
- if (theme.thirdparty.search.enable) {
2
+ if (theme.search.enable) {
3
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?.CDN || '/search.xml'
8
- })
9
4
  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
- })
5
+ switch (theme.search.type) {
6
+ case 'local':
7
+ localSearch = JSON.stringify({
8
+ preload: theme.search.local.preload,
9
+ path: theme?.search?.local?.CDN || '/search.xml'
10
+ })
11
+ break;
12
+ case 'algolia':
13
+ algolia = JSON.stringify({
14
+ appId: config.algolia.appId || config.algolia.applicationID,
15
+ apiKey: config.algolia.apiKey,
16
+ indexName: config.algolia.indexName,
17
+ hits: {
18
+ per_page: theme?.search?.algolia_search?.hits?.per_page || 10
19
+ }
20
+ })
21
+ break;
22
+ }
19
23
  }
20
24
 
21
25
  const commentInfoStart = theme.comment.randomInfoStart.map(item => `"${item}"`) || ""
22
26
  const commentInfoEnd = theme.comment.randomInfoEnd.map(item => `"${item}"`) || ""
27
+ var sayhello2 = theme.aside.card.sayhello2.map(item => `"${item}"`) || []
23
28
 
24
29
  script.
25
30
  const GLOBAL_CONFIG = {
@@ -37,7 +42,6 @@ script.
37
42
  expand: !{theme.hightlight.expand},
38
43
  copy: !{theme.hightlight.copy},
39
44
  },
40
- lightbox: !{theme.lightbox},
41
45
  randomlinks: !{theme.footer.randomlink},
42
46
  lang: {
43
47
  theme: {
@@ -56,26 +60,29 @@ script.
56
60
  daybefore: '!{_p('time.daybefore')}',
57
61
  runtime: '!{_p('time.runtime')}',
58
62
  },
59
- sayhello: {
60
- morning: `!{_p('sayhello.morning')}`,
61
- noon: `!{_p('sayhello.noon')}`,
62
- afternoon: `!{_p('sayhello.afternoon')}`,
63
- night: `!{_p('sayhello.night')}`,
64
- goodnight: `!{_p('sayhello.goodnight')}`,
65
- },
66
63
  search: {
67
64
  empty: '!{_p('search.empty')}',
68
65
  hit: '!{_p('search.hit')}',
69
66
  placeholder: '!{_p('search.placeholder')}',
70
67
  }
71
68
  },
69
+ aside: {
70
+ sayhello: {
71
+ morning: '!{theme.aside.card.sayhello.morning}',
72
+ noon: '!{theme.aside.card.sayhello.noon}',
73
+ afternoon: '!{theme.aside.card.sayhello.afternoon}',
74
+ night: '!{theme.aside.card.sayhello.night}',
75
+ goodnight: '!{theme.aside.card.sayhello.goodnight}',
76
+ },
77
+ sayhello2: [!{sayhello2}],
78
+ },
72
79
  covercolor: {
73
80
  enable: !{theme.post.covercolor.enable}
74
81
  },
75
82
  comment: {
76
83
  enable: !{theme.comment.enable},
77
84
  type: '!{theme.comment.type}',
78
- commentBarrage: !{theme.comment.commentBarrage},
85
+ commentBarrage: !{theme.comment.commentBarrage && theme.comment.enable},
79
86
  randomInfoStart: [!{commentInfoStart}],
80
87
  randomInfoEnd: [!{commentInfoEnd}],
81
88
  twikoo: {
@@ -86,16 +93,17 @@ script.
86
93
  url: '!{theme.comment.waline.envId}',
87
94
  }
88
95
  },
96
+ lightbox: '!{ theme.mediumZoom ? "mediumZoom" : (theme.fancybox ? "fancybox" : "null" )}',
89
97
  rightside: {
90
98
  enable: !{theme.rightside.enable}
91
99
  },
92
- ai:{
93
- enable: !{theme.thirdparty.ai.enable},
94
- key: '!{theme.thirdparty.ai.key}',
95
- talk: '!{theme.thirdparty.ai.talk}',
96
- randomPost: !{theme.thirdparty.ai.randomPost},
100
+ ai: {
101
+ enable: !{theme.post_ai.enable},
102
+ key: '!{theme.post_ai.key}',
103
+ talk: '!{theme.post_ai.talk}',
104
+ randomPost: !{theme.post_ai.randomPost},
97
105
  },
98
- music:{
106
+ music: {
99
107
  enable: !{theme.music.enable},
100
108
  }
101
109
  }
File without changes
@@ -1,57 +1,18 @@
1
1
  if theme.pwa.enable
2
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)
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
6
  if theme.pwa.mask_icon
7
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)
8
+ if(theme.pwa.apple_touch_icon)
9
+ link(rel="apple-touch-icon" sizes="180x180" href=url_for(theme.pwa.apple_touch_icon))
12
10
  if theme.pwa.favicon_16_16
13
11
  link(rel="icon", type="image/png", sizes="16x16", href=theme.pwa.favicon_16_16)
14
12
  if theme.pwa.favicon_32_32
15
13
  link(rel="icon", type="image/png", sizes="32x32", href=theme.pwa.favicon_32_32)
16
14
  if theme.pwa.bookmark_icon
17
15
  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
16
 
56
17
  else
57
18
  meta(name="apple-mobile-web-app-capable", content=config.title)
@@ -4,6 +4,8 @@
4
4
  - else if (is_tag()) title = _p('page.tag')+': ' + page.tag
5
5
  - else if (is_category()) title = _p('page.category') +': ' + page.category
6
6
  - else if (page.type === '404') title = '404'+': ' + theme.errorpage.text
7
+ - else if (page.type === 'tags') title = _p('page.tags')
8
+ - else if (page.type === 'categories') title = _p('page.categories')
7
9
  - else if (is_post() || is_page()) title = page.title
8
10
 
9
11
  - if (is_home()) subtitle = config.subtitle ? ' - ' + config.subtitle : ''
@@ -18,7 +20,7 @@ noscript= _p('head.noscript')
18
20
  link(rel="icon", href=theme.site.siteIcon)
19
21
 
20
22
  // index.css
21
- link(rel="stylesheet", href="/css/index.css")
23
+ link(rel="stylesheet", href=url_for(theme.cdn.main_css))
22
24
 
23
25
  // inject head
24
26
  include ./inject/head.pug
File without changes
@@ -1,29 +1,124 @@
1
- - cdn = theme.cdn.body
2
1
  - page.type = is_post() ? 'post' : page.type
3
2
 
4
- script(src=url_for(cdn.pjaxjs))
5
- if theme.lazyload.enable
6
- script(src=cdn_url_for("/lib/lazyload.min.js"))
7
- script(src=cdn_url_for("/lib/snackbar.min.js"))
8
- if theme.lightbox
9
- script(src=cdn_url_for("/lib/view-image.min.js"))
10
- if theme.says.home_mini || theme.aside.history.enable
11
- script(src=url_for(cdn.swiperjs))
12
-
13
- if theme.rightside.enable
14
- include ../widgets/rightside/index.pug
15
- script(src=cdn_url_for("/lib/rightside.min.js"))
3
+ div
4
+ script(src=url_for(theme.cdn.main))
5
+
6
+ mixin katex
7
+ link(rel="stylesheet", href=url_for(theme.cdn.katex))
8
+ if theme.katex.copytex
9
+ script(src=url_for(theme.cdn.katex_copytex))
10
+ script.
11
+ (() => {
12
+ document.querySelectorAll('#article-container span.katex-display').forEach(item => {
13
+ utils.wrap(item, 'div', {class: 'katex-wrap'})
14
+ })
15
+ })()
16
+
17
+ if theme.katex && theme.katex.enable
18
+ if theme.katex.per_page
19
+ if is_post() || is_page()
20
+ +katex
21
+ else
22
+ if page.katex
23
+ +katex
24
+
25
+ script(src=url_for(theme.cdn.pjax))
26
+ if theme.lazyload.enable
27
+ script(src=url_for(theme.cdn.lazyload))
28
+ script(src=url_for(theme.cdn.snackbar))
29
+ if theme.lightbox
30
+ if theme.mediumZoom
31
+ script(src=url_for(theme.cdn.medium_zoom))
32
+ if theme.fancybox
33
+ script(src=url_for(theme.cdn.fancyapps_ui))
34
+ if theme.says.home_mini
35
+ script(src=url_for(theme.cdn.swiper_js))
36
+
37
+ if theme.rightside.enable
38
+ include ../widgets/rightside/index
39
+ script(src=url_for(theme.cdn.rightside_js))
40
+
41
+ // post-ai)
42
+ if theme.post_ai.enable
43
+ script(src=url_for(theme.cdn.sco_ai_js))
44
+
45
+ if theme.capsule.enable || theme.music.enable
46
+ script(src=url_for(theme.cdn.aplayer_js))
47
+ script(src=url_for(theme.cdn.meting_js))
48
+ script.
49
+ const meting_api = '!{theme.meting_api}';
50
+
51
+ if theme.post.covercolor.enable
52
+ case theme.post.covercolor.mode
53
+ when 'local'
54
+ script(src=url_for(theme.cdn.cover_local))
55
+ when 'api'
56
+ script.
57
+ const coverColorConfig = {
58
+ api: '!{theme.post.covercolor.api}',
59
+ time: !{theme.post.covercolor.time},
60
+ }
61
+ script(src=url_for(theme.cdn.cover_api))
62
+
63
+ // waterfall
64
+ if theme.says.enable
65
+ script(src=url_for(theme.cdn.waterfall))
66
+
67
+ // comment
68
+ if theme.comment.enable
69
+ case theme.comment.type
70
+ when 'twikoo'
71
+ script(src=url_for(theme.cdn.twikoo))
72
+ when 'waline'
73
+ script(src=url_for(theme.cdn.waline_js))
74
+ link(rel="stylesheet", href=url_for(theme.cdn.waline_css))
75
+
76
+ if theme.comment.commentBarrage
77
+ case theme.comment.type
78
+ when 'twikoo'
79
+ script(src=url_for(theme.cdn.twikoo_commentBarrage))
80
+ when 'waline'
81
+ script(src=url_for(theme.cdn.waline_commentBarrage))
82
+
83
+ // music
84
+ if theme.music.enable
85
+ script(src=url_for(theme.cdn.music_js))
86
+
87
+ // gallery
88
+ if theme.gallery
89
+ script(src=url_for(theme.cdn.fj_gallery))
90
+ link(rel="stylesheet", href=url_for(theme.cdn.fj_gallery_css))
91
+
92
+ // pace 胶囊加载条(Capsule loading bar)
93
+ if theme.loading.pace
94
+ script(src=url_for(theme.cdn.pace_js))
95
+
96
+ // search
97
+ if theme.search.enable
98
+ case theme.search.type
99
+ when 'algolia'
100
+ script(src=url_for(theme.cdn.instantsearch))
101
+ script(src=url_for(theme.cdn.algolia_search))
102
+ when 'local'
103
+ script(src=url_for(theme.cdn.lunr_js))
104
+
105
+ // inject custom body
106
+ if theme.extends.body
107
+ each item in theme.extends.body
108
+ != item
16
109
 
17
110
  div#js-pjax
18
- if page.type === 'says'
111
+ if page.type === 'says' && theme.says.enable
19
112
  script.
20
113
  window.addEventListener('resize', utils.throttle(function () {
21
114
  if (document.getElementById('waterfall')) {
22
115
  sco.reflashEssayWaterFall();
23
116
  }
24
117
  }), 500);
25
- if theme.thirdparty.busuanzi && (theme.aside.siteinfo.uv || theme.aside.siteinfo.pv || theme.thirdparty.busuanzi.usecomment === false)
26
- script(async src=url_for(cdn.busuanzijs))
118
+ sco.reflashEssayWaterFall();
119
+ GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".bber-content-img img"));
120
+ if theme.busuanzi && (theme.aside.siteinfo.uv || theme.aside.siteinfo.pv)
121
+ script(async src=url_for(theme.cdn.busuanzi_js))
27
122
 
28
123
  script#config-diff.
29
124
  var PAGE_CONFIG = {
@@ -35,60 +130,14 @@ div#js-pjax
35
130
  comment: !{!!page.comment},
36
131
  }
37
132
 
38
- // post-ai)
39
- if theme.thirdparty.ai.enable
40
- script(src=cdn_url_for("/lib/sco-ai.min.js"))
41
-
42
- if theme.thirdparty.aplayer.enable || theme.music.enable
43
- script(src=url_for(cdn.aplayerjs))
44
- script(src=url_for(cdn.metingjs))
45
- script.
46
- const meting_api = '!{theme.thirdparty.aplayer.api}';
47
-
48
- if theme.post.covercolor.enable
49
- script.
50
- const coverColorConfig = {
51
- mode: '!{theme.post.covercolor.mode}',
52
- api: '!{theme.post.covercolor.api}',
53
- time: !{theme.post.covercolor.time},
54
- }
55
- script(src=cdn_url_for("/lib/cover-color.min.js"))
56
-
57
133
  if theme.footer.randomlink
58
134
  include ../widgets/randomlink.pug
59
135
 
60
- if page.katex
61
- link(rel="stylesheet", href=url_for(cdn.katexcss))
62
- script(src=url_for(cdn.katexjs))
63
-
64
- if theme.aside.welcome.enable
65
- script(src=cdn_url_for("/lib/txmap.min.js"))
66
-
67
- // waterfall
68
- if theme.says.enable
69
- script(src=cdn_url_for("/lib/waterfall.min.js"))
70
-
71
- if theme.comment.enable
72
- case theme.comment.type
73
- when 'twikoo'
74
- script(src=cdn_url_for("/js/extend/comment/twikoo/twikoo.js"))
75
- script(src=cdn_url_for("/js/extend/comment/twikoo/commentBarrage.js"))
76
- when 'waline'
77
- script(src=cdn_url_for("/js/extend/comment/waline/waline.js"))
78
- script(src=cdn_url_for("/js/extend/comment/waline/commentBarrage.js"))
79
-
136
+ // newest comment
137
+ include ../widgets/third-party/news-comment/newest-comment.pug
80
138
 
81
139
  // pjax
82
140
  include ../widgets/third-party/pjax.pug
83
141
 
84
142
  // theme
85
- include ../body/mode
86
-
87
- // music
88
- if theme.music.enable
89
- script(src=cdn_url_for("/js/music.js"))
90
-
91
- // inject custom body
92
- if theme.extends.body
93
- each item in theme.extends.body
94
- != item
143
+ include ../body/mode