hexo-theme-solitude 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/.github/FUNDING.yml +13 -0
  2. package/.github/ISSUE_TEMPLATE/bug_report.yml +107 -0
  3. package/.github/ISSUE_TEMPLATE/config.yml +13 -0
  4. package/.github/ISSUE_TEMPLATE/feature_request.yml +14 -0
  5. package/.github/workflows/npm-publish.yml +21 -0
  6. package/CONTRIBUTING.md +0 -0
  7. package/LICENSE +0 -0
  8. package/README.md +60 -43
  9. package/README_EN.md +60 -42
  10. package/_config.yml +606 -444
  11. package/languages/en-US.yml +3 -23
  12. package/languages/zh-CN.yml +3 -23
  13. package/layout/404.pug +0 -0
  14. package/layout/archive.pug +2 -3
  15. package/layout/category.pug +0 -0
  16. package/layout/includes/body/mode.pug +35 -0
  17. package/layout/includes/console.pug +3 -3
  18. package/layout/includes/footer.pug +16 -15
  19. package/layout/includes/head/config.pug +38 -30
  20. package/layout/includes/head/opengraph.pug +0 -0
  21. package/layout/includes/head/pwa.pug +5 -44
  22. package/layout/includes/head.pug +3 -1
  23. package/layout/includes/header.pug +0 -0
  24. package/layout/includes/inject/body.pug +115 -63
  25. package/layout/includes/inject/head.pug +11 -46
  26. package/layout/includes/layout.pug +1 -1
  27. package/layout/includes/loading.pug +0 -0
  28. package/layout/includes/mixins/articleSort.pug +0 -0
  29. package/layout/includes/mixins/pagination.pug +0 -0
  30. package/layout/includes/nav.pug +1 -1
  31. package/layout/includes/page/about.pug +1 -1
  32. package/layout/includes/page/categories.pug +0 -0
  33. package/layout/includes/page/default.pug +0 -0
  34. package/layout/includes/page/equipment.pug +0 -0
  35. package/layout/includes/page/links.pug +2 -2
  36. package/layout/includes/page/music.pug +0 -0
  37. package/layout/includes/page/not_configured.pug +0 -0
  38. package/layout/includes/page/rss.pug +3 -3
  39. package/layout/includes/page/says.pug +15 -15
  40. package/layout/includes/page/tags.pug +0 -0
  41. package/layout/includes/page/tlink.pug +1 -0
  42. package/layout/includes/recent-posts.pug +0 -0
  43. package/layout/includes/sidebar.pug +0 -0
  44. package/layout/includes/widgets/aside/aside.pug +6 -6
  45. package/layout/includes/widgets/aside/asideAllInfo.pug +0 -0
  46. package/layout/includes/widgets/aside/asideArchive.pug +0 -0
  47. package/layout/includes/widgets/aside/asideCustom.pug +1 -1
  48. package/layout/includes/widgets/aside/asideFlipCard.pug +0 -0
  49. package/layout/includes/widgets/aside/asideInfoCard.pug +3 -3
  50. package/layout/includes/widgets/aside/asideNewestPost.pug +0 -0
  51. package/layout/includes/widgets/aside/asideSwitch.pug +0 -4
  52. package/layout/includes/widgets/aside/asideTag.pug +1 -1
  53. package/layout/includes/widgets/aside/asideToc.pug +0 -0
  54. package/layout/includes/widgets/aside/asideWebInfo.pug +2 -2
  55. package/layout/includes/widgets/home/banner.pug +0 -0
  56. package/layout/includes/widgets/home/bb/json.pug +22 -0
  57. package/layout/includes/widgets/home/bb/local.pug +17 -0
  58. package/layout/includes/widgets/home/bb/memos.pug +25 -0
  59. package/layout/includes/widgets/home/bbTimeList.pug +11 -7
  60. package/layout/includes/widgets/home/categoryBar.pug +0 -0
  61. package/layout/includes/widgets/home/categoryGroup.pug +1 -1
  62. package/layout/includes/widgets/home/hometop.pug +0 -0
  63. package/layout/includes/widgets/home/postList.pug +0 -0
  64. package/layout/includes/widgets/home/topGroup.pug +0 -0
  65. package/layout/includes/widgets/nav/left.pug +0 -0
  66. package/layout/includes/widgets/nav/menu.pug +1 -1
  67. package/layout/includes/widgets/nav/right.pug +6 -5
  68. package/layout/includes/widgets/page/about/authorinfo.pug +10 -9
  69. package/layout/includes/widgets/page/about/award.pug +0 -0
  70. package/layout/includes/widgets/page/about/contentinfo.pug +35 -34
  71. package/layout/includes/widgets/page/about/hobbies.pug +21 -17
  72. package/layout/includes/widgets/page/about/motto.pug +17 -16
  73. package/layout/includes/widgets/page/about/other.pug +16 -16
  74. package/layout/includes/widgets/page/about/personalities.pug +15 -14
  75. package/layout/includes/widgets/page/about/skillsinfo.pug +37 -36
  76. package/layout/includes/widgets/page/about/tenyear.pug +0 -0
  77. package/layout/includes/widgets/page/banner.pug +9 -3
  78. package/layout/includes/widgets/page/equipment/content.pug +0 -0
  79. package/layout/includes/widgets/page/links/banner.pug +14 -12
  80. package/layout/includes/widgets/page/links/linksCard.pug +4 -6
  81. package/layout/includes/widgets/page/links/linksDiscn.pug +8 -0
  82. package/layout/includes/widgets/page/links/linksItem.pug +4 -6
  83. package/layout/includes/widgets/page/says/json.pug +80 -0
  84. package/layout/includes/widgets/page/says/local.pug +48 -0
  85. package/layout/includes/widgets/page/says/memos.pug +109 -0
  86. package/layout/includes/widgets/post/award.pug +0 -0
  87. package/layout/includes/widgets/post/copyright.pug +2 -2
  88. package/layout/includes/widgets/post/post-ai.pug +12 -0
  89. package/layout/includes/widgets/post/postMeta.pug +2 -2
  90. package/layout/includes/widgets/post/postNav.pug +0 -0
  91. package/layout/includes/widgets/post/wave.pug +0 -0
  92. package/layout/includes/widgets/randomlink.pug +1 -1
  93. package/layout/includes/widgets/rightside/index.pug +6 -5
  94. package/layout/includes/widgets/third-party/comments/comment.pug +1 -5
  95. package/layout/includes/widgets/third-party/comments/twikoo.pug +1 -1
  96. package/layout/includes/widgets/third-party/comments/waline.pug +9 -11
  97. package/layout/includes/widgets/third-party/music.pug +1 -1
  98. package/layout/includes/widgets/third-party/news-comment/newest-comment.pug +6 -0
  99. package/layout/includes/widgets/third-party/news-comment/twikoo.pug +70 -0
  100. package/layout/includes/widgets/third-party/news-comment/waline.pug +64 -0
  101. package/layout/includes/widgets/third-party/pjax.pug +0 -0
  102. package/layout/includes/widgets/third-party/search/algolia-search.pug +0 -0
  103. package/layout/includes/widgets/third-party/search/index.pug +8 -7
  104. package/layout/includes/widgets/third-party/search/local-search.pug +0 -0
  105. package/layout/index.pug +3 -3
  106. package/layout/page.pug +0 -4
  107. package/layout/post.pug +2 -2
  108. package/layout/tag.pug +0 -0
  109. package/package.json +18 -9
  110. package/plugins.yml +109 -0
  111. package/scripts/event/cdn.js +129 -0
  112. package/scripts/event/init.js +0 -0
  113. package/scripts/event/page.js +1 -21
  114. package/scripts/event/welcome.js +1 -1
  115. package/scripts/filter/checkThemeConfig.js +0 -0
  116. package/scripts/filter/default.js +0 -0
  117. package/scripts/filter/lazyload.js +1 -1
  118. package/scripts/filter/randomPosts.js +0 -0
  119. package/scripts/helper/cdn.js +0 -0
  120. package/scripts/helper/getArchiveLength.js +0 -0
  121. package/scripts/helper/page.js +0 -0
  122. package/scripts/helper/related_post.js +0 -0
  123. package/scripts/helper/stylus.js +0 -0
  124. package/scripts/tags/button.js +0 -0
  125. package/scripts/tags/bvideo.js +0 -0
  126. package/scripts/tags/card.js +0 -0
  127. package/scripts/tags/checkbox.js +0 -0
  128. package/scripts/tags/fold.js +0 -0
  129. package/scripts/tags/image.js +0 -0
  130. package/scripts/tags/inline-image.js +0 -0
  131. package/scripts/tags/label.js +0 -0
  132. package/scripts/tags/link.js +0 -0
  133. package/scripts/tags/media.js +0 -0
  134. package/scripts/tags/note.js +0 -0
  135. package/scripts/tags/span.js +0 -0
  136. package/scripts/tags/tabs.js +0 -0
  137. package/scripts/tags/timeline.js +0 -0
  138. package/scripts/tags/u.js +0 -0
  139. package/source/css/_global/animation.css +0 -0
  140. package/source/css/_global/function.styl +42 -42
  141. package/source/css/_global/index.styl +1 -1
  142. package/source/css/_global/var.styl +0 -0
  143. package/source/css/_layout/basic.styl +10 -12
  144. package/source/css/_layout/header.styl +8 -3
  145. package/source/css/_layout/index.styl +59 -5
  146. package/source/css/_mode/index.styl +0 -0
  147. package/source/css/_page/_home/category-bar.styl +0 -0
  148. package/source/css/_page/_home/home-top.styl +10 -31
  149. package/source/css/_page/_home/index.styl +0 -0
  150. package/source/css/_page/_home/pagination.styl +3 -0
  151. package/source/css/_page/_home/recent-post.styl +10 -3
  152. package/source/css/_page/about/index.styl +0 -0
  153. package/source/css/_page/about/tenyear.styl +0 -0
  154. package/source/css/_page/about.styl +9 -0
  155. package/source/css/_page/category.styl +0 -0
  156. package/source/css/_page/douban.styl +0 -1
  157. package/source/css/_page/equipment.styl +0 -0
  158. package/source/css/_page/error.styl +0 -0
  159. package/source/css/_page/home.styl +0 -0
  160. package/source/css/_page/index.styl +2 -3
  161. package/source/css/_page/links.styl +85 -49
  162. package/source/css/_page/moment.styl +0 -0
  163. package/source/css/_page/music.styl +1 -1
  164. package/source/css/_page/rss.styl +0 -0
  165. package/source/css/_page/says.styl +10 -0
  166. package/source/css/_page/tag.styl +0 -0
  167. package/source/css/_widgets/_aside/allinfo.styl +34 -0
  168. package/source/css/_widgets/_aside/flip.styl +0 -0
  169. package/source/css/_widgets/_aside/index.styl +1 -7
  170. package/source/css/_widgets/_aside/info.styl +0 -0
  171. package/source/css/_widgets/_aside/newPost.styl +0 -0
  172. package/source/css/_widgets/_aside/toc.styl +0 -0
  173. package/source/css/_widgets/_aside/welcome.styl +0 -0
  174. package/source/css/_widgets/_comment/index.styl +0 -0
  175. package/source/css/_widgets/_comment/twikoo.styl +0 -2
  176. package/source/css/_widgets/_comment/waline.styl +0 -0
  177. package/source/css/_widgets/_extra/console.styl +0 -0
  178. package/source/css/_widgets/_extra/fullpage.styl +0 -0
  179. package/source/css/_widgets/_extra/music.styl +1 -1
  180. package/source/css/_widgets/_extra/pace.styl +0 -0
  181. package/source/css/_widgets/_extra/rightmenu.styl +0 -0
  182. package/source/css/_widgets/_mixins/article-sort.styl +0 -0
  183. package/source/css/_widgets/_mixins/footer.styl +1 -2
  184. package/source/css/_widgets/_mixins/other.styl +0 -4
  185. package/source/css/_widgets/_mixins/sidebar.styl +0 -0
  186. package/source/css/_widgets/_post/_highlight/diff.styl +0 -0
  187. package/source/css/_widgets/_post/_highlight/index.styl +0 -1
  188. package/source/css/_widgets/_post/_highlight/theme/default.styl +0 -0
  189. package/source/css/_widgets/_post/_highlight/theme/mac.styl +0 -0
  190. package/source/css/_widgets/_post/_highlight/theme.styl +0 -0
  191. package/source/css/_widgets/_post/commentBarrage.styl +0 -0
  192. package/source/css/_widgets/_post/content.styl +42 -11
  193. package/source/css/_widgets/_post/copyright.styl +0 -0
  194. package/source/css/_widgets/_post/index.styl +1 -1
  195. package/source/css/_widgets/_post/meta.styl +0 -3
  196. package/source/css/_widgets/_post/pagination.styl +1 -1
  197. package/source/css/_widgets/_post/postAI.styl +0 -0
  198. package/source/css/_widgets/_post/relatedPost.styl +0 -0
  199. package/source/css/_widgets/_post/tools.styl +0 -0
  200. package/source/css/_widgets/_search/algolia-search.styl +0 -0
  201. package/source/css/_widgets/_search/local-search.styl +0 -0
  202. package/source/css/_widgets/_tags/button.styl +0 -0
  203. package/source/css/_widgets/_tags/bvideo.styl +0 -0
  204. package/source/css/_widgets/_tags/card.styl +0 -0
  205. package/source/css/_widgets/_tags/checkbox.styl +0 -0
  206. package/source/css/_widgets/_tags/fold.styl +0 -0
  207. package/source/css/_widgets/_tags/image.styl +0 -0
  208. package/source/css/_widgets/_tags/index.styl +0 -0
  209. package/source/css/_widgets/_tags/inline-image.styl +0 -0
  210. package/source/css/_widgets/_tags/label.styl +0 -0
  211. package/source/css/_widgets/_tags/link.styl +4 -2
  212. package/source/css/_widgets/_tags/note.styl +0 -0
  213. package/source/css/_widgets/_tags/span.styl +0 -0
  214. package/source/css/_widgets/_tags/tabs.styl +0 -0
  215. package/source/css/_widgets/_tags/timeline.styl +0 -1
  216. package/source/css/_widgets/index.styl +4 -4
  217. package/source/css/index.styl +0 -0
  218. package/source/img/avatar.png +0 -0
  219. package/source/img/default.png +0 -0
  220. package/source/img/error_load.png +0 -0
  221. package/source/js/{extend/comment/twikoo/commentBarrage.js → comment/twikoo_commentBarrage.js} +0 -0
  222. package/source/js/{extend/comment/waline/commentBarrage.js → comment/waline_commentBarrage.js} +0 -0
  223. package/source/js/covercolor/api.js +95 -0
  224. package/source/js/covercolor/local.js +154 -0
  225. package/source/js/main.js +28 -252
  226. package/source/js/music.js +0 -0
  227. package/source/js/rightside.js +404 -0
  228. package/source/js/{extend/search/algolia-search.js → search/algolia.js} +10 -0
  229. package/source/js/{extend/search/local-search.js → search/local.js} +24 -2
  230. package/source/js/utils.js +75 -1
  231. package/layout/includes/head/fest.pug +0 -22
  232. package/layout/includes/page/echarts.pug +0 -7
  233. package/layout/includes/page/moments.pug +0 -4
  234. package/layout/includes/widgets/aside/asideHistory.pug +0 -8
  235. package/layout/includes/widgets/aside/asideWelcome.pug +0 -12
  236. package/layout/includes/widgets/page/moments/angle.pug +0 -19
  237. package/layout/includes/widgets/page/moments/index.pug +0 -23
  238. package/layout/includes/widgets/page/says/saysBottom.pug +0 -11
  239. package/layout/includes/widgets/page/says/saysContent.pug +0 -6
  240. package/layout/includes/widgets/page/says/saysFunction.pug +0 -10
  241. package/layout/includes/widgets/page/says/saysMeta.pug +0 -7
  242. package/layout/includes/widgets/third-party/ai/index.pug +0 -12
  243. package/layout/includes/widgets/third-party/comments/gitalk.pug +0 -0
  244. package/layout/includes/widgets/third-party/comments/valine.pug +0 -0
  245. package/scripts/helper/echarts.js +0 -407
  246. package/source/css/_widgets/_aside/history.styl +0 -42
  247. package/source/js/extend/comment/twikoo/twikoo.js +0 -67
  248. package/source/js/extend/comment/waline/waline.js +0 -60
  249. package/source/lib/bundle.min.js +0 -27
  250. package/source/lib/circle.min.js +0 -1
  251. package/source/lib/cover-color.min.js +0 -7
  252. package/source/lib/friends_post.js +0 -4
  253. package/source/lib/lazyload.min.js +0 -1
  254. package/source/lib/rightside.min.js +0 -1
  255. package/source/lib/snackbar.min.css +0 -1
  256. package/source/lib/snackbar.min.js +0 -9
  257. package/source/lib/txmap.min.js +0 -1
  258. package/source/lib/view-image.min.js +0 -6
  259. package/source/lib/waterfall.min.js +0 -1
  260. /package/source/{lib → js}/sco-ai.min.js +0 -0
@@ -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.0 😄'
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.0 😄'
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
@@ -3,9 +3,8 @@ extends includes/layout.pug
3
3
  block content
4
4
  main.layout#content-inner
5
5
  #archive
6
- .article-sort-title #{__('page.archives')}<sup>#{page.posts.find({ parent: { $exists: false } }).length}</sup>
6
+ .article-sort-title #{__('page.archives')}<sup>#{site.posts.find({ parent: { $exists: false } }).length}</sup>
7
7
  .article-sort
8
8
  include includes/mixins/articleSort
9
9
  include includes/mixins/pagination
10
- include includes/widgets/aside/aside
11
-
10
+ include includes/widgets/aside/aside
File without changes
@@ -0,0 +1,35 @@
1
+ case theme.display_mode.type
2
+ when "auto"
3
+ script.
4
+ initTheme = () => {
5
+ let isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches
6
+ const cachedMode = saveToLocal.get('theme');
7
+ if (cachedMode === undefined) {
8
+ const nowMode =
9
+ isDarkMode ? 'dark' : 'light'
10
+ document.documentElement.setAttribute('data-theme', nowMode);
11
+ } else {
12
+ document.documentElement.setAttribute('data-theme', cachedMode);
13
+ }
14
+ }
15
+ initTheme()
16
+ when "dark"
17
+ script.
18
+ initTheme = () => {
19
+ const cachedMode = saveToLocal.get('theme');
20
+ if (cachedMode === undefined)
21
+ document.documentElement.setAttribute('data-theme', 'dark');
22
+ else
23
+ document.documentElement.setAttribute('data-theme', cachedMode);
24
+ }
25
+ initTheme()
26
+ when "light"
27
+ script.
28
+ initTheme = () => {
29
+ const cachedMode = saveToLocal.get('theme');
30
+ if (cachedMode === undefined)
31
+ document.documentElement.setAttribute('data-theme', 'light');
32
+ else
33
+ document.documentElement.setAttribute('data-theme', cachedMode);
34
+ }
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&nbsp;
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