hexo-theme-solitude 1.2.6 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. package/CONTRIBUTING.md +41 -0
  2. package/README.md +8 -8
  3. package/README_EN.md +6 -6
  4. package/_config.yml +502 -297
  5. package/languages/en-US.yml +105 -8
  6. package/languages/zh-CN.yml +98 -1
  7. package/layout/archive.pug +4 -5
  8. package/layout/category.pug +4 -5
  9. package/layout/includes/body/mode.pug +40 -0
  10. package/layout/includes/console.pug +15 -16
  11. package/layout/includes/footer.pug +26 -28
  12. package/layout/includes/head/config.pug +27 -8
  13. package/layout/includes/head/fest.pug +22 -0
  14. package/layout/includes/head/opengraph.pug +11 -0
  15. package/layout/includes/head.pug +1 -3
  16. package/layout/includes/header.pug +1 -1
  17. package/layout/includes/inject/body.pug +36 -13
  18. package/layout/includes/inject/head.pug +30 -20
  19. package/layout/includes/layout.pug +12 -8
  20. package/layout/includes/loading.pug +1 -64
  21. package/layout/includes/mixins/articleSort.pug +4 -4
  22. package/layout/includes/mixins/pagination.pug +1 -1
  23. package/layout/includes/nav.pug +10 -10
  24. package/layout/includes/page/about.pug +1 -0
  25. package/layout/includes/page/categories.pug +3 -3
  26. package/layout/includes/page/default.pug +1 -1
  27. package/layout/includes/page/echarts.pug +3 -3
  28. package/layout/includes/page/equipment.pug +0 -1
  29. package/layout/includes/page/links.pug +5 -26
  30. package/layout/includes/page/moments.pug +0 -1
  31. package/layout/includes/page/music.pug +19 -0
  32. package/layout/includes/page/not_configured.pug +18 -0
  33. package/layout/includes/page/rss.pug +20 -22
  34. package/layout/includes/page/says.pug +1 -2
  35. package/layout/includes/page/tags.pug +3 -3
  36. package/layout/includes/page/tlink.pug +0 -1
  37. package/layout/includes/sidebar.pug +7 -7
  38. package/layout/includes/widgets/aside/aside.pug +13 -1
  39. package/layout/includes/widgets/aside/asideArchive.pug +5 -3
  40. package/layout/includes/widgets/aside/asideCustom.pug +6 -0
  41. package/layout/includes/widgets/aside/asideHistory.pug +3 -3
  42. package/layout/includes/widgets/aside/asideInfoCard.pug +4 -6
  43. package/layout/includes/widgets/aside/asideNewestPost.pug +1 -1
  44. package/layout/includes/widgets/aside/asideSwitch.pug +0 -11
  45. package/layout/includes/widgets/aside/asideTag.pug +2 -2
  46. package/layout/includes/widgets/aside/asideToc.pug +1 -1
  47. package/layout/includes/widgets/aside/asideWebInfo.pug +6 -6
  48. package/layout/includes/widgets/aside/asideWelcome.pug +1 -1
  49. package/layout/includes/widgets/home/banner.pug +2 -2
  50. package/layout/includes/widgets/home/bbTimeList.pug +3 -3
  51. package/layout/includes/widgets/home/categoryBar.pug +3 -3
  52. package/layout/includes/widgets/home/categoryGroup.pug +2 -2
  53. package/layout/includes/widgets/home/hometop.pug +7 -7
  54. package/layout/includes/widgets/home/postList.pug +12 -8
  55. package/layout/includes/widgets/home/topGroup.pug +17 -13
  56. package/layout/includes/widgets/nav/left.pug +6 -6
  57. package/layout/includes/widgets/nav/menu.pug +4 -4
  58. package/layout/includes/widgets/nav/right.pug +14 -14
  59. package/layout/includes/widgets/page/about/authorinfo.pug +1 -1
  60. package/layout/includes/widgets/page/about/award.pug +11 -9
  61. package/layout/includes/widgets/page/about/contentinfo.pug +7 -7
  62. package/layout/includes/widgets/page/about/hobbies.pug +1 -1
  63. package/layout/includes/widgets/page/about/motto.pug +2 -2
  64. package/layout/includes/widgets/page/about/other.pug +10 -9
  65. package/layout/includes/widgets/page/about/personalities.pug +2 -2
  66. package/layout/includes/widgets/page/about/skillsinfo.pug +10 -12
  67. package/layout/includes/widgets/page/about/tenyear.pug +48 -0
  68. package/layout/includes/widgets/page/banner.pug +2 -2
  69. package/layout/includes/widgets/page/links/banner.pug +12 -14
  70. package/layout/includes/widgets/page/links/linksItem.pug +0 -1
  71. package/layout/includes/widgets/page/moments/angle.pug +7 -12
  72. package/layout/includes/widgets/page/moments/index.pug +7 -2
  73. package/layout/includes/widgets/post/award.pug +12 -8
  74. package/layout/includes/widgets/post/copyright.pug +16 -14
  75. package/layout/includes/widgets/post/postMeta.pug +36 -25
  76. package/layout/includes/widgets/post/postNav.pug +15 -15
  77. package/layout/includes/widgets/randomlink.pug +10 -5
  78. package/layout/includes/widgets/rightside/index.pug +9 -8
  79. package/layout/includes/widgets/third-party/ai/index.pug +12 -0
  80. package/layout/includes/widgets/third-party/comments/comment.pug +6 -1
  81. package/layout/includes/widgets/third-party/comments/twikoo.pug +5 -4
  82. package/layout/includes/widgets/third-party/comments/waline.pug +4 -5
  83. package/layout/includes/widgets/third-party/music.pug +1 -1
  84. package/layout/includes/widgets/third-party/pjax.pug +6 -1
  85. package/layout/includes/widgets/third-party/search/algolia-search.pug +4 -3
  86. package/layout/includes/widgets/third-party/search/index.pug +2 -2
  87. package/layout/includes/widgets/third-party/search/local-search.pug +3 -3
  88. package/layout/index.pug +5 -6
  89. package/layout/page.pug +34 -29
  90. package/layout/post.pug +3 -23
  91. package/layout/tag.pug +3 -3
  92. package/package.json +2 -2
  93. package/scripts/filter/checkThemeConfig.js +0 -5
  94. package/scripts/helper/cdn.js +12 -0
  95. package/scripts/helper/page.js +13 -0
  96. package/scripts/helper/related_post.js +0 -1
  97. package/scripts/tags/button.js +21 -0
  98. package/scripts/tags/card.js +9 -0
  99. package/scripts/tags/checkbox.js +51 -0
  100. package/scripts/tags/fold.js +0 -5
  101. package/scripts/tags/image.js +75 -0
  102. package/scripts/tags/inline-image.js +12 -0
  103. package/scripts/tags/label.js +10 -0
  104. package/scripts/tags/link.js +2 -0
  105. package/scripts/tags/media.js +29 -0
  106. package/scripts/tags/span.js +17 -0
  107. package/scripts/tags/timeline.js +2 -15
  108. package/scripts/tags/u.js +7 -0
  109. package/source/css/_global/animation.css +57 -0
  110. package/source/css/_global/index.styl +5 -20
  111. package/source/css/_global/var.styl +16 -1
  112. package/source/css/_layout/{base.styl → basic.styl} +24 -116
  113. package/source/css/_layout/header.styl +204 -616
  114. package/source/css/_layout/index.styl +29 -271
  115. package/source/css/_mode/index.styl +102 -93
  116. package/source/css/_page/_home/category-bar.styl +74 -0
  117. package/source/css/_page/_home/home-top.styl +541 -0
  118. package/source/css/_page/_home/index.styl +15 -0
  119. package/source/css/_page/_home/pagination.styl +176 -0
  120. package/source/css/_page/_home/recent-post.styl +204 -0
  121. package/source/css/_page/about/index.styl +1 -0
  122. package/source/css/_page/about/tenyear.styl +56 -0
  123. package/source/css/_page/about.styl +555 -626
  124. package/source/css/_page/category.styl +95 -119
  125. package/source/css/_page/douban.styl +126 -0
  126. package/source/css/_page/equipment.styl +100 -99
  127. package/source/css/_page/error.styl +130 -146
  128. package/source/css/_page/home.styl +41 -50
  129. package/source/css/_page/index.styl +42 -10
  130. package/source/css/_page/links.styl +306 -0
  131. package/source/css/_page/moment.styl +51 -51
  132. package/source/css/_page/music.styl +506 -0
  133. package/source/css/_page/rss.styl +62 -67
  134. package/source/css/_page/says.styl +375 -344
  135. package/source/css/_page/tag.styl +15 -13
  136. package/source/css/_widgets/{aside → _aside}/flip.styl +7 -5
  137. package/source/css/_widgets/{aside → _aside}/history.styl +9 -2
  138. package/source/css/_widgets/_aside/index.styl +96 -0
  139. package/source/css/_widgets/{aside → _aside}/info.styl +86 -89
  140. package/source/css/_widgets/{aside → _aside}/newPost.styl +7 -1
  141. package/source/css/_widgets/{aside → _aside}/toc.styl +28 -5
  142. package/source/css/_widgets/{comment → _comment}/index.styl +4 -12
  143. package/source/css/_widgets/{comment → _comment}/twikoo.styl +5 -2
  144. package/source/css/_widgets/{comment → _comment}/waline.styl +21 -5
  145. package/source/css/{_extra → _widgets/_extra}/console.styl +33 -10
  146. package/source/css/_widgets/_extra/fullpage.styl +46 -0
  147. package/source/css/_widgets/_extra/music.styl +218 -0
  148. package/source/css/_widgets/_extra/pace.styl +39 -0
  149. package/source/css/_widgets/_extra/rightmenu.styl +78 -0
  150. package/source/css/_widgets/_mixins/article-sort.styl +93 -0
  151. package/source/css/_widgets/_mixins/footer.styl +273 -0
  152. package/source/css/_widgets/_mixins/other.styl +34 -0
  153. package/source/css/_widgets/_mixins/sidebar.styl +230 -0
  154. package/source/css/_widgets/_post/_highlight/diff.styl +75 -0
  155. package/source/css/_widgets/_post/_highlight/index.styl +144 -0
  156. package/source/css/_widgets/_post/_highlight/theme/default.styl +12 -0
  157. package/source/css/_widgets/_post/_highlight/theme/mac.styl +25 -0
  158. package/source/css/_widgets/_post/_highlight/theme.styl +68 -0
  159. package/source/css/_widgets/_post/commentBarrage.styl +144 -0
  160. package/source/css/_widgets/_post/content.styl +152 -0
  161. package/source/css/_widgets/_post/copyright.styl +98 -0
  162. package/source/css/_widgets/_post/index.styl +20 -0
  163. package/source/css/_widgets/_post/meta.styl +420 -0
  164. package/source/css/_widgets/_post/pagination.styl +177 -0
  165. package/source/css/_widgets/_post/postAI.styl +131 -0
  166. package/source/css/{_post → _widgets/_post}/relatedPost.styl +4 -1
  167. package/source/css/_widgets/_post/tools.styl +249 -0
  168. package/source/css/{_search → _widgets/_search}/algolia-search.styl +4 -0
  169. package/source/css/{_search → _widgets/_search}/local-search.styl +15 -5
  170. package/source/css/_widgets/_tags/button.styl +60 -0
  171. package/source/css/_widgets/_tags/bvideo.styl +8 -0
  172. package/source/css/_widgets/_tags/card.styl +52 -0
  173. package/source/css/_widgets/_tags/checkbox.styl +85 -0
  174. package/source/css/_widgets/_tags/fold.styl +79 -0
  175. package/source/css/_widgets/_tags/image.styl +10 -0
  176. package/source/css/_widgets/_tags/index.styl +61 -0
  177. package/source/css/_widgets/_tags/inline-image.styl +6 -0
  178. package/source/css/_widgets/_tags/label.styl +3 -0
  179. package/source/css/_widgets/_tags/link.styl +80 -0
  180. package/source/css/_widgets/_tags/note.styl +101 -0
  181. package/source/css/_widgets/_tags/span.styl +61 -0
  182. package/source/css/_widgets/_tags/tabs.styl +105 -0
  183. package/source/css/_widgets/_tags/timeline.styl +80 -0
  184. package/source/css/_widgets/index.styl +50 -1
  185. package/source/css/index.styl +0 -25
  186. package/source/js/{commentBarrage.js → extend/comment/twikoo/commentBarrage.js} +0 -4
  187. package/source/js/extend/comment/{twikoo.js → twikoo/twikoo.js} +12 -40
  188. package/source/js/extend/comment/waline/commentBarrage.js +155 -0
  189. package/source/js/extend/comment/{waline.js → waline/waline.js} +10 -11
  190. package/source/js/extend/search/algolia-search.js +1 -5
  191. package/source/js/extend/search/local-search.js +33 -13
  192. package/source/js/main.js +135 -171
  193. package/source/js/music.js +129 -0
  194. package/source/js/utils.js +4 -7
  195. package/source/lib/cover-color.min.js +7 -0
  196. package/source/lib/rightside.min.js +1 -0
  197. package/source/lib/sco-ai.min.js +8 -0
  198. package/source/lib/snackbar.min.css +1 -1
  199. package/source/lib/txmap.min.js +1 -0
  200. package/source/lib/universe.min.js +1 -0
  201. package/source/lib/view-image.min.js +1 -1
  202. package/layout/includes/widgets/aside/asidePower.pug +0 -19
  203. package/layout/includes/widgets/home/rencentPost.pug +0 -26
  204. package/source/css/_extra/rightmenu.styl +0 -83
  205. package/source/css/_layout/articleSort.styl +0 -199
  206. package/source/css/_layout/footer.styl +0 -359
  207. package/source/css/_layout/sidebar.styl +0 -226
  208. package/source/css/_page/homeTop.styl +0 -1035
  209. package/source/css/_page/link.styl +0 -433
  210. package/source/css/_post/commentBarrage.styl +0 -149
  211. package/source/css/_post/externalTags.styl +0 -694
  212. package/source/css/_post/highlight.styl +0 -96
  213. package/source/css/_post/index.styl +0 -935
  214. package/source/css/_post/pagination.styl +0 -467
  215. package/source/css/_post/postContent.styl +0 -957
  216. package/source/css/_post/reward.styl +0 -217
  217. package/source/css/_widgets/aside/index.styl +0 -156
  218. package/source/css/_widgets/aside/power.styl +0 -90
  219. package/source/img/logo-horizontal_version.png +0 -0
  220. package/source/img/pwa/16.png +0 -0
  221. package/source/img/pwa/180.png +0 -0
  222. package/source/img/pwa/192.png +0 -0
  223. package/source/img/pwa/32.png +0 -0
  224. package/source/img/pwa/512.png +0 -0
  225. package/source/img/pwa/logo.png +0 -0
  226. package/source/img/pwa/siteicon/splash-1125x2436.png +0 -0
  227. package/source/img/pwa/siteicon/splash-1136x640.png +0 -0
  228. package/source/img/pwa/siteicon/splash-1170x2532.png +0 -0
  229. package/source/img/pwa/siteicon/splash-1179x2556.png +0 -0
  230. package/source/img/pwa/siteicon/splash-1242x2208.png +0 -0
  231. package/source/img/pwa/siteicon/splash-1242x2688.png +0 -0
  232. package/source/img/pwa/siteicon/splash-1248x2778.png +0 -0
  233. package/source/img/pwa/siteicon/splash-1290x2796.png +0 -0
  234. package/source/img/pwa/siteicon/splash-1334x750.png +0 -0
  235. package/source/img/pwa/siteicon/splash-1536x2048.png +0 -0
  236. package/source/img/pwa/siteicon/splash-1620x2160.png +0 -0
  237. package/source/img/pwa/siteicon/splash-1668x2224.png +0 -0
  238. package/source/img/pwa/siteicon/splash-1668x2388.png +0 -0
  239. package/source/img/pwa/siteicon/splash-1792x828.png +0 -0
  240. package/source/img/pwa/siteicon/splash-2048x1536.png +0 -0
  241. package/source/img/pwa/siteicon/splash-2048x2732.png +0 -0
  242. package/source/img/pwa/siteicon/splash-2160x1620.png +0 -0
  243. package/source/img/pwa/siteicon/splash-2208x1242.png +0 -0
  244. package/source/img/pwa/siteicon/splash-2224x1668.png +0 -0
  245. package/source/img/pwa/siteicon/splash-2388x1668.png +0 -0
  246. package/source/img/pwa/siteicon/splash-2436x1125.png +0 -0
  247. package/source/img/pwa/siteicon/splash-2532x1170.png +0 -0
  248. package/source/img/pwa/siteicon/splash-2556x1179.png +0 -0
  249. package/source/img/pwa/siteicon/splash-2688x1242.png +0 -0
  250. package/source/img/pwa/siteicon/splash-2732x2048.png +0 -0
  251. package/source/img/pwa/siteicon/splash-2778x1248.png +0 -0
  252. package/source/img/pwa/siteicon/splash-2796x1290.png +0 -0
  253. package/source/img/pwa/siteicon/splash-640x1136.png +0 -0
  254. package/source/img/pwa/siteicon/splash-750x1334.png +0 -0
  255. package/source/img/pwa/siteicon/splash-828x1792.png +0 -0
  256. package/source/img/solitude-show.jpg +0 -0
  257. package/source/js/extend/covercolor/local.js +0 -160
  258. package/source/js/rightside.js +0 -402
  259. package/source/js/txmap.js +0 -236
  260. package/source/lib/chuckle-post-ai.js +0 -1
  261. /package/source/css/_widgets/{aside → _aside}/allinfo.styl +0 -0
  262. /package/source/css/_widgets/{aside → _aside}/welcome.styl +0 -0
  263. /package/source/img/{theme/avatar.png → avatar.png} +0 -0
@@ -1,4 +1,4 @@
1
- .author-content.author-content-item.single.nolazyload(style=`background: url(${page.cover}) no-repeat center; background-size: cover;`,class=`${pageClass}`)
1
+ .author-content.author-content-item.single.sharePage(style=`background: url(${page.cover}) no-repeat center; background-size: cover;`)
2
2
  .card-content
3
3
  .author-content-item-tips= page.title
4
4
  span.author-content-item-title= page.desc
@@ -9,6 +9,6 @@
9
9
  .tips!= page.rightend
10
10
  if page.rightbtn
11
11
  .banner-button-group
12
- a.banner-button(onclick="pjax.loadUrl(\"" + page.rightbtnlink + "\")", data-pjax-state)
12
+ a.banner-button(onclick="pjax.loadUrl(\"" + page.rightbtnlink + "\")")
13
13
  i.scoicon.sco-right-btn-fill
14
14
  span.banner-button-text= page.rightbtn
@@ -13,18 +13,16 @@
13
13
 
14
14
  .tags-group-all.nowrapMove
15
15
  .tags-group-wrapper
16
- - const data = site.data.links.links
16
+ - const data = site.data.links.banners
17
+ - var pairs = []
17
18
  - for (let i = 0; i < 2; i++)
18
- each x in data
19
- if x.type === "item"
20
- - var pairs = []
21
- each y, index in x.link_list
22
- if (index % 2 === 0)
23
- - pairs.push([y])
24
- else
25
- - pairs[pairs.length - 1].push(y)
26
- each pair in pairs
27
- .tags-group-icon-pair
28
- each y in pair
29
- a.tags-group-icon(href=url_for(y.link), title=y.name)
30
- img(src=y.avatar, title=y.name)
19
+ each y, index in data
20
+ if (index % 2 === 0)
21
+ - pairs.push([y])
22
+ else
23
+ - pairs[pairs.length - 1].push(y)
24
+ each pair in pairs
25
+ .tags-group-icon-pair
26
+ each y in pair
27
+ a.tags-group-icon(href=url_for(y.link), title=y.name)
28
+ img(src=y.avatar, title=y.name)
@@ -8,7 +8,6 @@
8
8
  else
9
9
  span.site-card-tag= item.tag
10
10
  img.flink-avatar.cf-friends-avatar(alt=item.name, src=item.avatar)
11
- .img-alt.is-center= item.name
12
11
  .flink-item-info
13
12
  span.flink-item-name.cf-friends-name= item.name
14
13
  span.flink-item-desc(title=item.descr)= item.descr
@@ -1,19 +1,14 @@
1
+ - var randomstart = page.type === "moments" ? '' : 'display: none;'
1
2
  .title-h2-a
2
3
  .title-h2-a-left
3
- h2(style="padding-top: 0;margin:0.6rem 0 0.6rem;") 🎣 钓鱼
4
- a#random-post-start(href="javascript:fetchRandomPost();", rel="external nofollow", style="transition-duration: 0.3s; transform: rotate(63000deg); opacity: 1;", data-pjax-state="")
5
- i.scoicon.refresh-line(hidden="hidden")
6
- .title-h2-a-right
7
- a.random-post-all(href="/links/", data-pjax-state="") 全部友链
4
+ h2 🎣 钓鱼
5
+ a#random-post-start(href="javascript:fetchRandomPost();" style="transition-duration: 0.3s; transform: rotate(7560deg); opacity: 1;"+randomstart)
6
+ i.scoicon.sco-refresh-line
7
+ .title-h2-a-right(style=randomstart)
8
+ a.random-post-all(href="/links/") 全部友链
8
9
 
9
10
  #random-post
10
11
 
11
- .title-h2-a
12
- .title-h2-a-left
13
- h2(style="padding-top: 0;margin:0.6rem 0 0.6rem;") 🐟 鱼塘
14
- .title-h2-a-right
15
- span 以下内容自动生成,未经过审核
16
-
17
12
  script.
18
13
  var fdata = {
19
14
  apiurl: "#{theme.thirdparty.circle.api}",
@@ -21,4 +16,4 @@ script.
21
16
  hungryFish: 100,
22
17
  }
23
18
 
24
- script(src="/lib/friends_post.js")
19
+ script(src=cdn_url_for("/lib/friends_post.js"))
@@ -1,3 +1,8 @@
1
+ .title-h2-a
2
+ .title-h2-a-left
3
+ h2 🐟 鱼塘
4
+ .title-h2-a-right
5
+ span 以下内容自动生成,未经过审核
1
6
  div#hexo-circle-of-friends-root
2
7
  script.
3
8
  let UserConfig = {
@@ -14,5 +19,5 @@ script.
14
19
  // 本地文章缓存数据过期时间(天)
15
20
  expire_days: !{theme.thirdparty.circle.expire_days},
16
21
  }
17
- script(src=url_for(theme.thirdparty.circle.appjs))
18
- script(src=url_for(theme.thirdparty.circle.bundlejs))
22
+ script(src=cdn_url_for("/lib/circle.min.js"))
23
+ script(src=cdn_url_for("/lib/bundle.min.js"))
@@ -1,30 +1,32 @@
1
- div.post-reward
2
- div.reward-button.button--animated(onclick="AddRewardMask()" title="赞赏作者")
1
+ .post-reward(onclick="AddRewardMask()")
2
+ .reward-button(title="赞赏作者")
3
3
  i.scoicon.sco-hand-heart-fill
4
4
  | 打赏作者
5
- div.reward-main
5
+ .reward-main
6
6
  ul.reward-all
7
7
  span.reward-title 感谢你赐予我前进的力量
8
8
  ul.reward-group
9
9
  if theme.post.award.wechat
10
10
  li.reward-item
11
- a(href=theme.post.award.wechat target="_blank")
11
+ a(href=theme.post.award.wechat)
12
12
  img.post-qr-code-img(src=theme.post.award.wechat alt="微信")
13
- div.post-qr-code-desc 微信
13
+ .post-qr-code-desc 微信
14
14
  if theme.post.award.alipay
15
15
  li.reward-item
16
16
  a(href=theme.post.award.alipay target="_blank")
17
17
  img.post-qr-code-img(src=theme.post.award.alipay alt="支付宝")
18
- div.post-qr-code-desc 支付宝
18
+ .post-qr-code-desc 支付宝
19
19
  a.reward-main-btn(href=url_for(theme.post.award.url))
20
- div.reward-text 赞赏者名单
21
- div.reward-dec 因为你们的支持让我意识到写文章的价值🙏
20
+ .reward-text 赞赏者名单
21
+ .reward-dec 因为你们的支持让我意识到写文章的价值🙏
22
22
 
23
23
  script.
24
24
  function RemoveRewardMask() {
25
25
  let rewardMainElements = document.querySelectorAll(".reward-main");
26
26
  let quitBoxElement = document.querySelector("#quit-box");
27
27
 
28
+ console.log("RemoveRewardMask")
29
+
28
30
  rewardMainElements.forEach(element => {
29
31
  element.style.display = "none";
30
32
  });
@@ -38,6 +40,8 @@ script.
38
40
  let rewardMainElements = document.querySelectorAll(".reward-main");
39
41
  let quitBoxElement = document.querySelector("#quit-box");
40
42
 
43
+ console.log("AddRewardMask")
44
+
41
45
  rewardMainElements.forEach(element => {
42
46
  element.style.display = "flex";
43
47
  });
@@ -1,27 +1,29 @@
1
- div.post-copyright
2
- div.post-copyright__author_group
3
- a.post-copyright__author_img(href="/about/", data-pjax-state="")
4
- img.post-copyright__author_img_back(src=theme.post.author_back)
1
+ .post-copyright
2
+ .post-copyright__author_group
3
+ a.post-copyright__author_img(href="/about/")
4
+ if theme.post.default.copyright.author.enable
5
+ img.post-copyright__author_img_back(src=theme.post.default.copyright.author.author_back)
5
6
  img.post-copyright__author_img_front(src=theme.site.icon)
6
- div.post-copyright__author_name= config.title
7
- div.post-copyright__author_desc= config.subtitle
8
- div.post-tools#post-tools
9
- div.post-tools-left
7
+ .post-copyright__author_name= config.title
8
+ .post-copyright__author_desc= config.subtitle
9
+ .post-tools#post-tools
10
+ .post-tools-left
11
+ #quit-box(onclick="RemoveRewardMask()")
10
12
  if theme.post.award.enable
11
13
  include ./award
12
- if theme.footer.rss.enable
13
- div.reward-link.mode
14
- a.reward-link-button(href=theme.footer.rss.url)
14
+ if theme.post.rss.enable
15
+ .reward-link.mode
16
+ a.reward-link-button(href=url_for(theme.post.rss.url), title="订阅")
15
17
  i.scoicon.sco-plant-fill
16
18
  | 订阅
17
19
  if theme.post.default.copyright.enable || page.copyright
18
- div.post-copyright__notice
20
+ .post-copyright__notice
19
21
  span.post-copyright-info
20
22
  if page.reprint
21
23
  | 本文是转载或翻译文章,版权归原作者所有。转载本文请联系原作者。
22
24
  else
23
25
  | 本文是原创文章,采用
24
- a(href=url_for(theme.post.default.copyright.licenurl), target="_blank")
26
+ a(href=url_for(theme.post.default.copyright.licenurl))
25
27
  | #{theme.post.default.copyright.license}
26
28
  | 协议,完整转载请注明来自
27
- a(href="/", target="_blank") #{config.title}
29
+ a(href="/") #{config.title}
@@ -1,55 +1,66 @@
1
- div.coverdiv#coverdiv
1
+ .coverdiv#coverdiv
2
2
  img#post-cover.nolazyload(src=url_for(page.cover), alt=page.title)
3
- div#post-info
4
- div#post-firstinfo
5
- div.meta-firstline
6
- - var cc = reprint ? '转载或翻译' : '原创'
7
- a.post-meta-original(title="该文章为" + cc + "文章,注意版权协议")= cc
3
+ #post-info
4
+ #post-firstinfo
5
+ .meta-firstline
6
+ - var cc = page.reprint ? _p('post.meta_reprint') : _p('post.meta_original')
7
+ a.post-meta-original(title=_p('post.meta_cc').replace(/\$\{cc}/, cc))= cc
8
8
  if page.categories.data.length > 0
9
9
  span.post-meta-categories
10
- a.post-meta-categories(href=page.categories.data[0].path)= page.categories.data[0].name
11
- div.tag_share
12
- div.post-meta__tag-list
10
+ a.post-meta-categories(href='/' + page.categories.data[0].path)= page.categories.data[0].name
11
+ .tag_share
12
+ .post-meta__tag-list
13
13
  each tag in page.tags.data
14
14
  a.post-meta__tags(href=url_for(tag.path))
15
15
  span.tags-name.tags-punctuation= tag.name
16
16
  h1.post-title= page.title
17
- div#post-meta
18
- div.meta-secondline
17
+ #post-meta
18
+ .meta-secondline
19
19
  if theme.post.meta.date
20
- span.post-meta-date(title="发布于")
20
+ span.post-meta-date(title=_p('meta_posted') + ' ' + full_date(page.date))
21
21
  i.post-meta-icon.scoicon.sco-calendar-todo-fill
22
22
  time(datetime=date_xml(page.date))= date_xml(page.date)
23
23
  if theme.post.meta.updated
24
- span.post-meta-date(title="最后更新于")
24
+ span.post-meta-date(title=_p('meta_updated') + ' ' + full_date(page.updated))
25
25
  i.post-meta-icon.scoicon.sco-refresh-line
26
26
  time(datetime=date_xml(page.updated))= date_xml(page.updated)
27
27
  if theme.thirdparty.wordcount
28
28
  span.post-meta-wordcount
29
29
  if theme.post.meta.wordcount
30
- i.post-meta-icon.scoicon.sco-word-fill(title="文章字数")
30
+ i.post-meta-icon.scoicon.sco-word-fill(title=_p('post.meta_wordcount'))
31
31
  span.word-count= wordcount(page.content)
32
32
  span.post-meta-separator
33
33
  if theme.post.meta.readtime
34
- i.post-meta-icon.scoicon.sco-clock-fill(title="阅读耗时")
34
+ i.post-meta-icon.scoicon.sco-clock-fill(title=_p('post.meta_minread'))
35
35
  span= min2read(page.content) + " min"
36
36
  if theme.post.meta.locate
37
- span.post-meta-position(title="作者IP归属地为" + page.locate)
37
+ span.post-meta-position(title=_p('post.meta_ip') + page.locate)
38
38
  i.post-meta-icon.scoicon.sco-map-pin-fill
39
39
  span= page.locate
40
- if theme.thirdparty.busuanzi.enable && theme.post.meta.pv
41
- a.post-meta-pv(href=url_for(page.path), title="文章热度")
40
+ if theme.post.meta.pv
41
+ a.post-meta-pv(href=url_for(page.path), title=_p('post.meta_pv'))
42
42
  i.post-meta-icon.scoicon.sco-fire-fill
43
- if theme.thirdparty.busuanzi.usecomment
44
- span#twikoo_visitors
45
- i.scoicon.sco-loading-line
46
- else
43
+ if theme.comment.enable
44
+ case theme.comment.type
45
+ when "twikoo"
46
+ span#twikoo_visitors
47
+ i.scoicon.sco-loading-line
48
+ when "waline"
49
+ span.waline-pageview-count
50
+ i.scoicon.sco-loading-line
51
+ else if theme.thirdparty.busuanzi
47
52
  span#busuanzi_value_page_pv
48
53
  i.scoicon.sco-loading-line
49
54
  if theme.post.meta.comment && page.comment
50
- span.post-meta-commentcount(title="评论数", onclick="sco.scrollTo('post-comment')")
55
+ span.post-meta-commentcount(title=_p('post.meta_comment'), onclick="sco.scrollTo('post-comment')")
51
56
  i.scoicon.sco-chat-fill
52
57
  a(href=url_for(page.path) + "#post-comment")
53
- span#twikoo-count
54
- i.scoicon.sco-loading-line
58
+ case theme.comment.type
59
+ when "twikoo"
60
+ span#twikoo-count
61
+ i.scoicon.sco-loading-line
62
+ when "waline"
63
+ span.waline-comment-count
64
+ i.scoicon.sco-loading-line
65
+
55
66
  include ./wave
@@ -1,25 +1,25 @@
1
1
  nav.needEndHide.pagination-post#pagination
2
2
  if page.prev && page.next
3
- div.prev-post.pull-left
3
+ .prev-post.pull-left
4
4
  a(href=url_for(page.prev.path))
5
- div.pagination-info
6
- div.label 上一篇
7
- div.prev_info= page.prev.title
8
- div.next-post.pull-right
5
+ .pagination-info
6
+ .label 上一篇
7
+ .prev_info= page.prev.title
8
+ .next-post.pull-right
9
9
  a(href=url_for(page.next.path))
10
- div.pagination-info
11
- div.label 下一篇
12
- div.next_info= page.next.title
10
+ .pagination-info
11
+ .label 下一篇
12
+ .next_info= page.next.title
13
13
  else
14
14
  if !page.prev && page.next
15
- div.next-post.pull-full
15
+ .next-post.pull-full
16
16
  a(href=url_for(page.next.path))
17
17
  div.pagination-info
18
- div.label 下一篇
19
- div.next_info= page.next.title
18
+ .label 下一篇
19
+ .next_info= page.next.title
20
20
  if !page.next && page.prev
21
- div.prev-post.pull-full
21
+ .prev-post.pull-full
22
22
  a(href=url_for(page.prev.path))
23
- div.pagination-info
24
- div.label 上一篇
25
- div.prev_info= page.prev.title
23
+ .pagination-info
24
+ .label 上一篇
25
+ .prev_info= page.prev.title
@@ -18,15 +18,20 @@ script.
18
18
 
19
19
  if theme.footer.randomlink
20
20
  script.
21
- function randomLinksList(){
22
- let data='';
21
+ function randomLinksList() {
22
+ const linkcard = document.getElementById('friend-links-in-footer');
23
+ if (linkcard == null) return;
24
+
25
+ let data = '';
23
26
  let linksCopy = [...links];
24
27
  let count = Math.min(3, linksCopy.length);
28
+
25
29
  for (let i = 0; i < count; i++) {
26
30
  let index = utils.randomNum(linksCopy.length);
27
- const link = linksCopy[index];
28
- data += '<a class="footer-item" href="' + link.link + '" target="_blank" rel="noopener nofollow">' + link.name + '</a>';
31
+ const {link, name} = linksCopy[index];
32
+ data += `<a class="footer-item" href="${link}">${name}</a>`;
29
33
  linksCopy.splice(index, 1);
30
34
  }
31
- document.getElementById('friend-links-in-footer').innerHTML = data + '<a class="footer-item" href="/links/">更多</a>';
35
+
36
+ linkcard.innerHTML = data + '<a class="footer-item" href="/links/">更多</a>';
32
37
  }
@@ -5,7 +5,7 @@ div#rightMenu
5
5
  div.rightMenu-item#menu-forward
6
6
  i.scoicon.sco-arrow-right-line
7
7
  div.rightMenu-item#menu-refresh
8
- i.scoicon.sco-restart-line(style="font-size: 19px;")
8
+ i.scoicon.sco-restart-line
9
9
  div.rightMenu-item#menu-top
10
10
  i.scoicon.sco-arrow-up-line
11
11
  div.rightMenu-group.rightMenu-line.rightMenuPlugin
@@ -15,7 +15,7 @@ div#rightMenu
15
15
  div.rightMenu-item#menu-pastetext
16
16
  i.scoicon.sco-clipboard-fill
17
17
  span 粘贴文本
18
- a.rightMenu-item#menu-commenttext(data-pjax-state="")
18
+ a.rightMenu-item#menu-commenttext
19
19
  i.scoicon.sco-chat-new-fill
20
20
  span 引用到评论
21
21
  div.rightMenu-item#menu-newwindow
@@ -52,22 +52,23 @@ div#rightMenu
52
52
  i.scoicon.sco-copy-fill
53
53
  span 复制歌名
54
54
  div.rightMenu-group.rightMenu-line.rightMenuOther
55
- a.rightMenu-item.menu-Link#menu-randomPost(data-pjax-state="")
55
+ a.rightMenu-item.menu-Link#menu-randomPost
56
56
  i.scoicon.sco-signal-tower-fill
57
57
  span 随便逛逛
58
- a.rightMenu-item.menu-link(href="/categories/", data-pjax-state="")
58
+ a.rightMenu-item.menu-link(href="/categories/")
59
59
  i.scoicon.sco-checkbox-multiple-blank-fill
60
60
  span 博客分类
61
- a.rightMenu-item.menu-link(href="/tags/", data-pjax-state="")
61
+ a.rightMenu-item.menu-link(href="/tags/")
62
62
  i.scoicon.sco-price-tag-fill
63
63
  span 文章标签
64
64
  div.rightMenu-group.rightMenu-line.rightMenuOther
65
65
  div.rightMenu-item#menu-copy
66
66
  i.scoicon.sco-external-link-fill
67
67
  span 复制地址
68
- div.rightMenu-item#menu-commentBarrage
69
- i.scoicon.sco-chat-fill
70
- span.menu-commentBarrage-text 关闭热评
68
+ if theme.comment.enable && theme.comment.commentBarrage
69
+ div.rightMenu-item#menu-commentBarrage
70
+ i.scoicon.sco-chat-fill
71
+ span.menu-commentBarrage-text 关闭热评
71
72
  div.rightMenu-item#menu-darkmode
72
73
  i.scoicon.sco-moon-clear-fill
73
74
  span.menu-darkmode-text 浅色模式
@@ -0,0 +1,12 @@
1
+ .post-ai
2
+ .ai-title
3
+ .ai-title-left
4
+ i.ai-title-icon.scoicon.sco-robot-fill
5
+ .ai-title-text 文章摘要
6
+ .ai-tag#ai-tag= theme.thirdparty.ai.modelName
7
+ .ai-explanation(style="display: block;")
8
+ .ai-suggestions
9
+ .ai-bottom
10
+ .ai-tips= theme.thirdparty.ai.tips
11
+ if theme.thirdparty.ai.report
12
+ a.ai-report(title="投诉", href=url_for(theme.thirdparty.ai.report)) 投诉
@@ -1,8 +1,13 @@
1
- div#post-comment(view-image)
1
+ #post-comment(view-image)
2
2
  .comment-head
3
3
  .comment-headline
4
4
  i.scoicon.sco-chat-fill
5
5
  span 评论
6
+ span
7
+ .comment-randomInfo
8
+ a(onclick="sco.addRandomCommentInfo()", href="javascript:void(0)") 匿名评论
9
+ .comment-tips#comment-tips
10
+ span ✅ 你无需删除空行,直接评论以获取最佳展示效果
6
11
  .comment-wrap
7
12
  #comment
8
13
  case theme.comment.type
@@ -1,10 +1,10 @@
1
1
  script.
2
- async function initComment(){
2
+ async function initComment() {
3
3
  var initOptions = Object.assign(
4
4
  !{JSON.stringify(theme.comment.twikoo || {})},
5
5
  {
6
6
  el: '#comment',
7
- onCommentLoaded: function() {
7
+ onCommentLoaded: function () {
8
8
  GLOBAL_CONFIG.lightbox && sco.lightbox('#article-container img, #twikoo .tk-content img:not(.tk-owo-emotion)')
9
9
  },
10
10
  lang: '#{theme.comment.twikoo.lang}',
@@ -20,9 +20,10 @@ script.
20
20
  }
21
21
  )
22
22
  const res = await twikoo.getCommentsCount(countOptions)
23
- try{
23
+ try {
24
24
  document.getElementById('twikoo-count').innerText = res[0].count
25
- }catch (e) {
25
+ document.querySelector('.comment-headline span:last-child').innerText = ` (${res[0].count})`
26
+ } catch (e) {
26
27
  document.getElementById('twikoo-count').innerText = '加载错误'
27
28
  }
28
29
  }
@@ -1,17 +1,16 @@
1
- - const { envId, option, pageview } = theme.comment.waline
2
- - const { lazyload, count, type } = theme.comment
1
+ - const { envId, option } = theme.comment.waline
3
2
 
4
3
  script.
5
4
  async function initComment() {
6
5
  (() => {
7
- const waline = Waline.init(Object.assign({
6
+ Waline.init(Object.assign({
8
7
  el: '#comment',
9
8
  serverURL: '!{envId}',
10
- pageview: !{lazyload ? false : pageview},
9
+ pageview: !{theme.post.meta.pv},
11
10
  dark: 'html[data-theme="dark"]',
12
11
  path: window.location.pathname,
13
12
  search: false,
14
- comment: !{lazyload ? false : count},
13
+ comment: #{theme.post.meta.comment && is_post()},
15
14
  }, !{JSON.stringify(option)}))
16
15
  })()
17
16
  }
@@ -1,3 +1,3 @@
1
1
  div.needEndHide#nav-music(onclick="sco.musicToggle()")
2
- div#nav-music-hoverTips= "音乐已暂停"
2
+ div#nav-music-hoverTips=__('music.hit')
3
3
  meting-js(id=theme.thirdparty.aplayer.id, server=theme.thirdparty.aplayer.server, type="playlist", mutex="true", preload="none", data-lrctype="0", order="random", theme="var(--sco-main)")
@@ -4,7 +4,8 @@ script.
4
4
  '#body-wrap',
5
5
  '#site-config',
6
6
  'meta[name="description"]',
7
- '#js-pjax'
7
+ '#js-pjax',
8
+ 'meta[property^="og:"]',
8
9
  ]
9
10
 
10
11
  const pjax = new Pjax({
@@ -23,6 +24,10 @@ script.
23
24
  item.parentNode.replaceChild(newScript, item)
24
25
  })
25
26
 
27
+ document.addEventListener('pjax:complete', () => {
28
+ window.refreshFn()
29
+ })
30
+
26
31
  document.addEventListener('pjax:error', (e) => {
27
32
  if (e.request.status === 404) {
28
33
  pjax.loadUrl('/404.html')
@@ -1,6 +1,6 @@
1
1
  div#algolia-search
2
2
  div.search-dialog
3
- div.search-dialog__title#algolia-search-title= "搜索"
3
+ div.search-dialog__title#algolia-search-title=__('nav.search')
4
4
  div#algolia-input-panel
5
5
  div#algolia-search-input
6
6
  div#search-results
@@ -8,7 +8,8 @@ div#algolia-search
8
8
  div#algolia-tips
9
9
  div#algolia-pagination
10
10
  div#algolia-stats
11
- #algolia-poweredBy
11
+ i.scoicon.sco-algolia-fill
12
+ span.algolia-tips-text='Algolia 提供搜索服务'
12
13
  span.search-close-button
13
14
  i.scoicon.sco-close-fill
14
- div#search-mask
15
+ div#search-mask
@@ -1,7 +1,7 @@
1
1
  if theme.thirdparty.search.enable
2
2
  if theme.thirdparty.search.type==="algolia"
3
3
  include ./algolia-search.pug
4
- script(src="/js/extend/search/algolia-search.js")
4
+ script(src=cdn_url_for("/js/extend/search/algolia-search.js"))
5
5
  else if theme.thirdparty.search.type === "local"
6
6
  include ./local-search.pug
7
- script(src="/js/extend/search/local-search.js")
7
+ script(src=cdn_url_for("/js/extend/search/local-search.js"))
@@ -1,12 +1,12 @@
1
- div#local-search
1
+ #local-search
2
2
  div.search-dialog
3
3
  nav.search-nav
4
- span.search-dialog-title 搜索
4
+ span.search-dialog-title=__('nav.search')
5
5
  button.search-close-button
6
6
  i.scoicon.sco-close-fill
7
7
  div.search-wrap
8
8
  div.search-box
9
- input.search-box-input(type="text", id="search-input", autocomplete="off", spellcheck="false", autocorrect="off", autocapitalize="off", placeholder=__('search.placeholder'))
9
+ input.search-box-input#search-input(type="text", autocomplete="off", spellcheck="false", autocorrect="off", autocapitalize="off", placeholder=__('search.placeholder'))
10
10
  div#search-results
11
11
  div#search-pagination
12
12
  div#search-tips
package/layout/index.pug CHANGED
@@ -1,17 +1,16 @@
1
1
  extends includes/layout.pug
2
2
 
3
3
  block content
4
- div#home_top
4
+ #home_top
5
5
  if(theme.says.home_mini)
6
6
  include ./includes/widgets/home/bbTimeList.pug
7
7
  if(theme.hometop.banner.enable)
8
8
  include ./includes/widgets/home/hometop.pug
9
- main(class="layout", id="content-inner")
10
- div(class="recent-posts", id="recent-posts")
11
- div#category-bar
9
+ main.layout#content-inner
10
+ .recent-posts#recent-posts
11
+ #category-bar
12
12
  include ./includes/widgets/home/categoryBar.pug
13
-
14
- for post in page.posts.sort('-date').data
13
+ for post in page.posts.sort("-sticky" || "-date").data
15
14
  include ./includes/widgets/home/postList.pug
16
15
 
17
16
  // pageination