hexo-theme-solitude 1.2.6 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/CONTRIBUTING.md +41 -0
  2. package/README.md +8 -8
  3. package/README_EN.md +6 -6
  4. package/_config.yml +495 -297
  5. package/languages/en-US.yml +105 -8
  6. package/languages/zh-CN.yml +98 -1
  7. package/layout/archive.pug +3 -3
  8. package/layout/category.pug +4 -5
  9. package/layout/includes/console.pug +15 -16
  10. package/layout/includes/footer.pug +26 -28
  11. package/layout/includes/head/config.pug +27 -8
  12. package/layout/includes/head/fest.pug +22 -0
  13. package/layout/includes/head/opengraph.pug +11 -0
  14. package/layout/includes/head.pug +1 -3
  15. package/layout/includes/header.pug +1 -1
  16. package/layout/includes/inject/body.pug +33 -13
  17. package/layout/includes/inject/head.pug +30 -20
  18. package/layout/includes/layout.pug +11 -8
  19. package/layout/includes/loading.pug +1 -64
  20. package/layout/includes/mixins/articleSort.pug +4 -4
  21. package/layout/includes/mixins/pagination.pug +1 -1
  22. package/layout/includes/nav.pug +10 -10
  23. package/layout/includes/page/about.pug +1 -0
  24. package/layout/includes/page/categories.pug +3 -3
  25. package/layout/includes/page/default.pug +1 -1
  26. package/layout/includes/page/echarts.pug +3 -3
  27. package/layout/includes/page/equipment.pug +0 -1
  28. package/layout/includes/page/links.pug +5 -26
  29. package/layout/includes/page/moments.pug +0 -1
  30. package/layout/includes/page/music.pug +19 -0
  31. package/layout/includes/page/not_configured.pug +18 -0
  32. package/layout/includes/page/rss.pug +20 -22
  33. package/layout/includes/page/says.pug +1 -2
  34. package/layout/includes/page/tags.pug +3 -3
  35. package/layout/includes/page/tlink.pug +0 -1
  36. package/layout/includes/sidebar.pug +7 -7
  37. package/layout/includes/widgets/aside/aside.pug +13 -1
  38. package/layout/includes/widgets/aside/asideArchive.pug +5 -3
  39. package/layout/includes/widgets/aside/asideCustom.pug +6 -0
  40. package/layout/includes/widgets/aside/asideHistory.pug +3 -3
  41. package/layout/includes/widgets/aside/asideInfoCard.pug +4 -6
  42. package/layout/includes/widgets/aside/asideNewestPost.pug +1 -1
  43. package/layout/includes/widgets/aside/asideSwitch.pug +0 -11
  44. package/layout/includes/widgets/aside/asideTag.pug +2 -2
  45. package/layout/includes/widgets/aside/asideToc.pug +1 -1
  46. package/layout/includes/widgets/aside/asideWebInfo.pug +6 -6
  47. package/layout/includes/widgets/aside/asideWelcome.pug +1 -1
  48. package/layout/includes/widgets/home/banner.pug +2 -2
  49. package/layout/includes/widgets/home/bbTimeList.pug +3 -3
  50. package/layout/includes/widgets/home/categoryBar.pug +3 -3
  51. package/layout/includes/widgets/home/categoryGroup.pug +2 -2
  52. package/layout/includes/widgets/home/hometop.pug +7 -7
  53. package/layout/includes/widgets/home/postList.pug +12 -8
  54. package/layout/includes/widgets/home/topGroup.pug +17 -13
  55. package/layout/includes/widgets/nav/left.pug +6 -6
  56. package/layout/includes/widgets/nav/menu.pug +4 -4
  57. package/layout/includes/widgets/nav/right.pug +14 -14
  58. package/layout/includes/widgets/page/about/authorinfo.pug +1 -1
  59. package/layout/includes/widgets/page/about/award.pug +11 -9
  60. package/layout/includes/widgets/page/about/contentinfo.pug +7 -7
  61. package/layout/includes/widgets/page/about/hobbies.pug +1 -1
  62. package/layout/includes/widgets/page/about/motto.pug +2 -2
  63. package/layout/includes/widgets/page/about/other.pug +10 -9
  64. package/layout/includes/widgets/page/about/personalities.pug +2 -2
  65. package/layout/includes/widgets/page/about/skillsinfo.pug +10 -12
  66. package/layout/includes/widgets/page/about/tenyear.pug +48 -0
  67. package/layout/includes/widgets/page/banner.pug +2 -2
  68. package/layout/includes/widgets/page/links/banner.pug +12 -14
  69. package/layout/includes/widgets/page/links/linksItem.pug +0 -1
  70. package/layout/includes/widgets/page/moments/angle.pug +7 -12
  71. package/layout/includes/widgets/page/moments/index.pug +7 -2
  72. package/layout/includes/widgets/post/award.pug +12 -8
  73. package/layout/includes/widgets/post/copyright.pug +16 -14
  74. package/layout/includes/widgets/post/postMeta.pug +36 -25
  75. package/layout/includes/widgets/post/postNav.pug +15 -15
  76. package/layout/includes/widgets/randomlink.pug +10 -5
  77. package/layout/includes/widgets/rightside/index.pug +9 -8
  78. package/layout/includes/widgets/third-party/ai/index.pug +12 -0
  79. package/layout/includes/widgets/third-party/comments/comment.pug +6 -1
  80. package/layout/includes/widgets/third-party/comments/twikoo.pug +5 -4
  81. package/layout/includes/widgets/third-party/comments/waline.pug +4 -5
  82. package/layout/includes/widgets/third-party/music.pug +1 -1
  83. package/layout/includes/widgets/third-party/pjax.pug +6 -1
  84. package/layout/includes/widgets/third-party/search/algolia-search.pug +4 -3
  85. package/layout/includes/widgets/third-party/search/index.pug +2 -2
  86. package/layout/includes/widgets/third-party/search/local-search.pug +3 -3
  87. package/layout/index.pug +5 -6
  88. package/layout/page.pug +34 -29
  89. package/layout/post.pug +3 -23
  90. package/layout/tag.pug +3 -3
  91. package/package.json +2 -2
  92. package/scripts/filter/checkThemeConfig.js +0 -5
  93. package/scripts/helper/cdn.js +12 -0
  94. package/scripts/helper/page.js +13 -0
  95. package/scripts/helper/related_post.js +0 -1
  96. package/scripts/tags/button.js +21 -0
  97. package/scripts/tags/card.js +9 -0
  98. package/scripts/tags/checkbox.js +51 -0
  99. package/scripts/tags/fold.js +0 -5
  100. package/scripts/tags/image.js +75 -0
  101. package/scripts/tags/inline-image.js +12 -0
  102. package/scripts/tags/label.js +10 -0
  103. package/scripts/tags/link.js +2 -0
  104. package/scripts/tags/media.js +29 -0
  105. package/scripts/tags/span.js +17 -0
  106. package/scripts/tags/timeline.js +2 -15
  107. package/scripts/tags/u.js +7 -0
  108. package/source/css/_global/animation.css +57 -0
  109. package/source/css/_global/index.styl +5 -20
  110. package/source/css/_global/var.styl +16 -1
  111. package/source/css/_layout/{base.styl → basic.styl} +24 -116
  112. package/source/css/_layout/header.styl +203 -615
  113. package/source/css/_layout/index.styl +29 -271
  114. package/source/css/_mode/index.styl +87 -94
  115. package/source/css/_page/_home/category-bar.styl +74 -0
  116. package/source/css/_page/_home/home-top.styl +541 -0
  117. package/source/css/_page/_home/index.styl +15 -0
  118. package/source/css/_page/_home/pagination.styl +176 -0
  119. package/source/css/_page/_home/recent-post.styl +204 -0
  120. package/source/css/_page/about/index.styl +1 -0
  121. package/source/css/_page/about/tenyear.styl +56 -0
  122. package/source/css/_page/about.styl +555 -626
  123. package/source/css/_page/category.styl +95 -119
  124. package/source/css/_page/douban.styl +126 -0
  125. package/source/css/_page/equipment.styl +100 -99
  126. package/source/css/_page/error.styl +130 -146
  127. package/source/css/_page/home.styl +41 -50
  128. package/source/css/_page/index.styl +42 -10
  129. package/source/css/_page/links.styl +305 -0
  130. package/source/css/_page/moment.styl +51 -51
  131. package/source/css/_page/music.styl +506 -0
  132. package/source/css/_page/rss.styl +62 -67
  133. package/source/css/_page/says.styl +375 -344
  134. package/source/css/_page/tag.styl +15 -13
  135. package/source/css/_widgets/{aside → _aside}/flip.styl +7 -5
  136. package/source/css/_widgets/{aside → _aside}/history.styl +9 -2
  137. package/source/css/_widgets/_aside/index.styl +96 -0
  138. package/source/css/_widgets/{aside → _aside}/info.styl +86 -89
  139. package/source/css/_widgets/{aside → _aside}/newPost.styl +7 -1
  140. package/source/css/_widgets/{aside → _aside}/toc.styl +28 -5
  141. package/source/css/_widgets/{comment → _comment}/index.styl +4 -12
  142. package/source/css/_widgets/{comment → _comment}/twikoo.styl +5 -2
  143. package/source/css/_widgets/{comment → _comment}/waline.styl +21 -5
  144. package/source/css/{_extra → _widgets/_extra}/console.styl +33 -10
  145. package/source/css/_widgets/_extra/fullpage.styl +46 -0
  146. package/source/css/_widgets/_extra/music.styl +218 -0
  147. package/source/css/_widgets/_extra/pace.styl +39 -0
  148. package/source/css/_widgets/_extra/rightmenu.styl +78 -0
  149. package/source/css/_widgets/_mixins/article-sort.styl +93 -0
  150. package/source/css/_widgets/_mixins/footer.styl +273 -0
  151. package/source/css/_widgets/_mixins/other.styl +34 -0
  152. package/source/css/_widgets/_mixins/sidebar.styl +230 -0
  153. package/source/css/_widgets/_post/_highlight/diff.styl +75 -0
  154. package/source/css/_widgets/_post/_highlight/index.styl +144 -0
  155. package/source/css/_widgets/_post/_highlight/theme/default.styl +12 -0
  156. package/source/css/_widgets/_post/_highlight/theme/mac.styl +25 -0
  157. package/source/css/_widgets/_post/_highlight/theme.styl +68 -0
  158. package/source/css/_widgets/_post/commentBarrage.styl +144 -0
  159. package/source/css/_widgets/_post/content.styl +152 -0
  160. package/source/css/_widgets/_post/copyright.styl +98 -0
  161. package/source/css/_widgets/_post/index.styl +20 -0
  162. package/source/css/_widgets/_post/meta.styl +420 -0
  163. package/source/css/_widgets/_post/pagination.styl +177 -0
  164. package/source/css/_widgets/_post/postAI.styl +131 -0
  165. package/source/css/{_post → _widgets/_post}/relatedPost.styl +4 -1
  166. package/source/css/_widgets/_post/tools.styl +249 -0
  167. package/source/css/{_search → _widgets/_search}/algolia-search.styl +4 -0
  168. package/source/css/{_search → _widgets/_search}/local-search.styl +15 -5
  169. package/source/css/_widgets/_tags/button.styl +60 -0
  170. package/source/css/_widgets/_tags/bvideo.styl +8 -0
  171. package/source/css/_widgets/_tags/card.styl +52 -0
  172. package/source/css/_widgets/_tags/checkbox.styl +85 -0
  173. package/source/css/_widgets/_tags/fold.styl +79 -0
  174. package/source/css/_widgets/_tags/image.styl +10 -0
  175. package/source/css/_widgets/_tags/index.styl +61 -0
  176. package/source/css/_widgets/_tags/inline-image.styl +6 -0
  177. package/source/css/_widgets/_tags/label.styl +3 -0
  178. package/source/css/_widgets/_tags/link.styl +80 -0
  179. package/source/css/_widgets/_tags/note.styl +101 -0
  180. package/source/css/_widgets/_tags/span.styl +61 -0
  181. package/source/css/_widgets/_tags/tabs.styl +105 -0
  182. package/source/css/_widgets/_tags/timeline.styl +80 -0
  183. package/source/css/_widgets/index.styl +50 -1
  184. package/source/css/index.styl +0 -25
  185. package/source/js/{commentBarrage.js → extend/comment/twikoo/commentBarrage.js} +0 -4
  186. package/source/js/extend/comment/{twikoo.js → twikoo/twikoo.js} +12 -40
  187. package/source/js/extend/comment/waline/commentBarrage.js +155 -0
  188. package/source/js/extend/comment/{waline.js → waline/waline.js} +10 -11
  189. package/source/js/extend/search/algolia-search.js +1 -5
  190. package/source/js/extend/search/local-search.js +33 -13
  191. package/source/js/main.js +144 -163
  192. package/source/js/music.js +129 -0
  193. package/source/js/utils.js +4 -7
  194. package/source/lib/cover-color.min.js +7 -0
  195. package/source/lib/rightside.min.js +1 -0
  196. package/source/lib/sco-ai.min.js +8 -0
  197. package/source/lib/snackbar.min.css +1 -1
  198. package/source/lib/txmap.min.js +1 -0
  199. package/source/lib/view-image.min.js +1 -1
  200. package/layout/includes/widgets/aside/asidePower.pug +0 -19
  201. package/layout/includes/widgets/home/rencentPost.pug +0 -26
  202. package/source/css/_extra/rightmenu.styl +0 -83
  203. package/source/css/_layout/articleSort.styl +0 -199
  204. package/source/css/_layout/footer.styl +0 -359
  205. package/source/css/_layout/sidebar.styl +0 -226
  206. package/source/css/_page/homeTop.styl +0 -1035
  207. package/source/css/_page/link.styl +0 -433
  208. package/source/css/_post/commentBarrage.styl +0 -149
  209. package/source/css/_post/externalTags.styl +0 -694
  210. package/source/css/_post/highlight.styl +0 -96
  211. package/source/css/_post/index.styl +0 -935
  212. package/source/css/_post/pagination.styl +0 -467
  213. package/source/css/_post/postContent.styl +0 -957
  214. package/source/css/_post/reward.styl +0 -217
  215. package/source/css/_widgets/aside/index.styl +0 -156
  216. package/source/css/_widgets/aside/power.styl +0 -90
  217. package/source/img/logo-horizontal_version.png +0 -0
  218. package/source/img/pwa/16.png +0 -0
  219. package/source/img/pwa/180.png +0 -0
  220. package/source/img/pwa/192.png +0 -0
  221. package/source/img/pwa/32.png +0 -0
  222. package/source/img/pwa/512.png +0 -0
  223. package/source/img/pwa/logo.png +0 -0
  224. package/source/img/pwa/siteicon/splash-1125x2436.png +0 -0
  225. package/source/img/pwa/siteicon/splash-1136x640.png +0 -0
  226. package/source/img/pwa/siteicon/splash-1170x2532.png +0 -0
  227. package/source/img/pwa/siteicon/splash-1179x2556.png +0 -0
  228. package/source/img/pwa/siteicon/splash-1242x2208.png +0 -0
  229. package/source/img/pwa/siteicon/splash-1242x2688.png +0 -0
  230. package/source/img/pwa/siteicon/splash-1248x2778.png +0 -0
  231. package/source/img/pwa/siteicon/splash-1290x2796.png +0 -0
  232. package/source/img/pwa/siteicon/splash-1334x750.png +0 -0
  233. package/source/img/pwa/siteicon/splash-1536x2048.png +0 -0
  234. package/source/img/pwa/siteicon/splash-1620x2160.png +0 -0
  235. package/source/img/pwa/siteicon/splash-1668x2224.png +0 -0
  236. package/source/img/pwa/siteicon/splash-1668x2388.png +0 -0
  237. package/source/img/pwa/siteicon/splash-1792x828.png +0 -0
  238. package/source/img/pwa/siteicon/splash-2048x1536.png +0 -0
  239. package/source/img/pwa/siteicon/splash-2048x2732.png +0 -0
  240. package/source/img/pwa/siteicon/splash-2160x1620.png +0 -0
  241. package/source/img/pwa/siteicon/splash-2208x1242.png +0 -0
  242. package/source/img/pwa/siteicon/splash-2224x1668.png +0 -0
  243. package/source/img/pwa/siteicon/splash-2388x1668.png +0 -0
  244. package/source/img/pwa/siteicon/splash-2436x1125.png +0 -0
  245. package/source/img/pwa/siteicon/splash-2532x1170.png +0 -0
  246. package/source/img/pwa/siteicon/splash-2556x1179.png +0 -0
  247. package/source/img/pwa/siteicon/splash-2688x1242.png +0 -0
  248. package/source/img/pwa/siteicon/splash-2732x2048.png +0 -0
  249. package/source/img/pwa/siteicon/splash-2778x1248.png +0 -0
  250. package/source/img/pwa/siteicon/splash-2796x1290.png +0 -0
  251. package/source/img/pwa/siteicon/splash-640x1136.png +0 -0
  252. package/source/img/pwa/siteicon/splash-750x1334.png +0 -0
  253. package/source/img/pwa/siteicon/splash-828x1792.png +0 -0
  254. package/source/img/solitude-show.jpg +0 -0
  255. package/source/js/extend/covercolor/local.js +0 -160
  256. package/source/js/rightside.js +0 -402
  257. package/source/js/txmap.js +0 -236
  258. package/source/lib/chuckle-post-ai.js +0 -1
  259. /package/source/css/_widgets/{aside → _aside}/allinfo.styl +0 -0
  260. /package/source/css/_widgets/{aside → _aside}/welcome.styl +0 -0
  261. /package/source/img/{theme/avatar.png → avatar.png} +0 -0
@@ -3,38 +3,38 @@
3
3
  .webinfo-item
4
4
  .webinfo-item-title
5
5
  i.item-icon.scoicon.sco-folder-fill
6
- .item-name 文章总数 :
6
+ .item-name= __('aside.postcount')
7
7
  .item-count= site.posts.length
8
8
  if theme.thirdparty.busuanzi
9
9
  if theme.aside.siteinfo.pv
10
10
  .webinfo-item
11
11
  .webinfo-item-title
12
12
  i.item-icon.scoicon.sco-visitor-line
13
- .item-name 总访问数 :
13
+ .item-name= __('aside.pv')
14
14
  span#busuanzi_value_site_pv
15
15
  i.scoicon.sco-loading-line
16
16
  if theme.aside.siteinfo.uv
17
17
  .webinfo-item
18
18
  .webinfo-item-title
19
19
  i.item-icon.scoicon.sco-team-fill
20
- .item-name 总访客数 :
20
+ .item-name= __('aside.uv')
21
21
  span#busuanzi_value_site_uv
22
22
  i.scoicon.sco-loading-line
23
23
  if theme.aside.siteinfo.runtimeenable
24
24
  .webinfo-item
25
25
  .webinfo-item-title
26
26
  i.item-icon.scoicon.sco-calendar-todo-fill
27
- .item-name 建站天数 :
27
+ .item-name= __('aside.runtime')
28
28
  .item-count#runtimeshow
29
29
  if theme.aside.siteinfo.updatetime
30
30
  .webinfo-item
31
31
  .webinfo-item-title
32
32
  i.item-icon.scoicon.sco-loop-left-fill
33
- .item-name 最后更新 :
33
+ .item-name= __('aside.updatetime')
34
34
  time.item-count(datetime=new Date())
35
35
  if theme.thirdparty.wordcount && theme.aside.siteinfo.wordcount
36
36
  .webinfo-item
37
37
  .webinfo-item-title
38
38
  i.item-icon.scoicon.sco-word-fill
39
- .item-name 全站字数 :
39
+ .item-name= __('aside.wordcount')
40
40
  .item-count= totalcount(site)
@@ -2,7 +2,7 @@ if theme.aside.welcome.enable
2
2
  .card-widget.card-welcome
3
3
  .item-headline
4
4
  i(class=theme.aside.welcome.icon || 'scoicon sco-map-pin-fill')
5
- span= theme.aside.welcome.title || '来访者'
5
+ span= theme.aside.welcome.title || __('aside.welcome')
6
6
  #welcome-info
7
7
 
8
8
  script(data-pjax).
@@ -11,6 +11,6 @@ div.tags-group-all
11
11
  each key in pair
12
12
  .tags-group-icon(style=`background: ${theme.hometop.banner.icon[key].color}`)
13
13
  img(src=theme.hometop.banner.icon[key].img, title=key)
14
- a#banner-hover(onclick="toRandomPost()" data-pjax-state="")
15
- span.bannerText 随便逛逛
14
+ a#banner-hover(onclick="toRandomPost()")
15
+ span.bannerText= _p('home.bannertext')
16
16
  i.scoicon.sco-arrow-2-right-line.banner-righticon
@@ -1,8 +1,8 @@
1
1
  .bbTimeList.container#bbTimeList
2
- i.bber-logo.scoicon.sco-says(onclick="pjax.loadUrl('/essay/')", style="font-size: 1rem;")
2
+ i.bber-logo.scoicon.sco-bblogo(onclick="pjax.loadUrl('/essay/')")
3
3
  .swiper-container.swiper-no-swiping.swiper-container-initialized.swiper-container-vertical.swiper-container-pointer-events#bbtalk(tabindex="-1", onclick="pjax.loadUrl('/essay/')")
4
4
  .swiper-wrapper#bber-talk
5
5
  each item, i in site.data.essay.essay_list
6
6
  if i < 10
7
- .li-style.swiper-slide= item.image ? item.content + '【图片】' : item.content
8
- i.bber-gotobb.scoicon.sco-right-btn-fill(style="font-size: 1rem", title="查看全文", onclick="pjax.loadUrl('/essay/')")
7
+ .li-style.swiper-slide= item.image ? item.content + _p('home.bbtime.image') : item.content
8
+ i.bber-gotobb.scoicon.sco-right-btn-fill(title=_p('home.bbtime.text'), onclick="pjax.loadUrl('/essay/')")
@@ -1,10 +1,10 @@
1
1
  .category-bar-items#category-bar-items
2
2
  .category-bar-item(class=is_home() ? 'select' : '', id="category-bar-home")
3
- a(href="/") 首页
3
+ a(href="/")= __('home.categoryBar.home')
4
4
  each item in site.categories.find({ parent: { $exists: false } }).data
5
5
  .category-bar-item(class=select ? (select === item.name ? 'select' : '') : '', id=item.name)
6
6
  a(href=url_for(item.path))= item.name
7
- if site.categories.length > 10
7
+ if site.categories.length > 13
8
8
  .category-bar-next#category-bar-next(onclick="sco.scrollCategoryBarToRight()")
9
9
  i.scoicon.sco-show-right-line
10
- a.category-bar-more(href="/categories/") 更多
10
+ a.category-bar-more(href="/categories/")= __('home.categoryBar.more')
@@ -1,9 +1,9 @@
1
1
  - var groupNames = ['G1', 'G2', 'G3'];
2
2
  - var styles = ['--sco-shadow-blue', '--sco-shadow-red', '--sco-shadow-green'];
3
- - var classes = ['CB1 bikan', 'remen', 'shiyong'];
3
+ - var classes = ['bikan', 'remen', 'shiyong'];
4
4
 
5
5
  each groupName, index in groupNames
6
6
  .categoryItem(style=`box-shadow: var(${styles[index]});`)
7
7
  a.categoryButton(class=classes[index], href=url_for(theme.hometop.categoryGroup[groupName].url))
8
8
  span.categoryButtonText= theme.hometop.categoryGroup[groupName].name
9
- i(class=theme.hometop.categoryGroup[groupName].icon)
9
+ i(class=theme.hometop.categoryGroup[groupName].icon)
@@ -1,9 +1,9 @@
1
- div.recent-top-post-group#recent-top-post-group
2
- div.recent-post-top#recent-post-top
3
- div#bannerGroup
4
- div#banners
1
+ .recent-top-post-group#recent-top-post-group
2
+ .recent-post-top#recent-post-top
3
+ #bannerGroup
4
+ #banners
5
5
  include ./banner.pug
6
- div.categoryGroup
6
+ .categoryGroup
7
7
  include ./categoryGroup.pug
8
- div.topGroup
9
- include ./rencentPost.pug
8
+ .topGroup
9
+ include ./topGroup.pug
@@ -1,24 +1,28 @@
1
- div(class="recent-post-item" onclick="pjax.loadUrl('/" + post.path + "')")
2
- div.post_cover.left_radius
1
+ div.recent-post-item(onclick="pjax.loadUrl('/" + post.path + "')")
2
+ div.post_cover
3
3
  a(href=url_for(post.path), title=post.title)
4
- img(src=url_for(post.cover), alt=post.title, class="post_bg")
4
+ img.post_bg(src=url_for(post.cover), alt=post.title)
5
5
  div.recent-post-info
6
6
  div.recent-post-info-top
7
7
  div.recent-post-info-top-tips
8
+ if post.sticky && is_home()
9
+ span.article-meta.sticky-warp
10
+ i.scoicon.sco-thumbtack-solid.sticky.orange
11
+ span.sticky.orange= _p('home.recent-post.sticky')
8
12
  each category in post.categories.data
9
- span(class="original")= category.name
13
+ span.original= category.name
10
14
 
11
15
  if post.prev == null && is_home()
12
- span(class="original")="最新"
16
+ span.original= _p('home.recent-post.new')
13
17
 
14
- a(class="unvisited-post" href=url_for(post.path), data-pjax-state)= "未读"
18
+ a.unvisited-post(href=url_for(post.path))= _p('home.recent-post.read')
15
19
 
16
- a(class="article-title" href=url_for(post.path), data-pjax-state, title=post.title)= post.title
20
+ a.article-title(href=url_for(post.path), title=post.title)= post.title
17
21
 
18
22
  div.article-meta-wrap
19
23
  span.article-meta.tags
20
24
  each tag in post.tags.data
21
- a(class="article-meta__tags" href=url_for(tag.path), data-pjax-state, onclick="window.event.cancelable=true")
25
+ a.article-meta__tags(href=url_for(tag.path), onclick="event.stopPropagation();")
22
26
  span.tags-punctuation=tag.name
23
27
 
24
28
  span.post-meta-date
@@ -1,22 +1,14 @@
1
1
  - var filteredPosts = site.posts.data.filter(item => item.recommend === true).slice(0,6)
2
2
  each post in filteredPosts
3
3
  .recent-post-item
4
- .post_cover.left_radius
4
+ .post_cover
5
5
  a(href=url_for(post.path), title=post.title)
6
- span.recent-post-top-text
7
- img.post_bg(alt=post.title, src=post.cover, loading="lazy")
6
+ span.recent-post-top-text= _p('home.top-group.recommend')
7
+ img.post_bg(alt=post.title, src=post.cover)
8
8
  .recent-post-info
9
9
  a.article-title(href=url_for(post.path), title=post.title)= post.title
10
10
 
11
- if theme.hometop.recommendList.url.startsWith('/') && theme.hometop.recommendList.url.endsWith('/')
12
- .todayCard#todayCard(onclick=`pjax.loadUrl('${theme.hometop.recommendList.url}')`, style="z-index: 1;")
13
- else
14
- script.
15
- function GoTodayCard() {
16
- window.open("#{theme.hometop.recommendList.url}", "_blank");
17
- }
18
- .todayCard#todayCard(onclick="GoTodayCard()", style="z-index: 1;")
19
-
11
+ mixin todayCardContent
20
12
  .todayCard-info
21
13
  .todayCard-tips= theme.hometop.recommendList.sup
22
14
  .todayCard-title= theme.hometop.recommendList.title
@@ -24,4 +16,16 @@ else
24
16
  .banner-button-group
25
17
  a.banner-button(onclick="window.event.cancelBubble=true;sco.hideTodayCard();")
26
18
  i.scoicon.sco-add-fill
27
- span.banner-button-text 更多推荐
19
+ span.banner-button-text= _p('home.top-group.recommendmore')
20
+
21
+ case theme.hometop.recommendList.url.startsWith('/')
22
+ when true
23
+ .todayCard#todayCard(onclick=`pjax.loadUrl('${theme.hometop.recommendList.url}')`)
24
+ +todayCardContent()
25
+ when false
26
+ script.
27
+ function GoTodayCard() {
28
+ window.open("#{theme.hometop.recommendList.url}", "_blank");
29
+ }
30
+ .todayCard#todayCard(onclick="GoTodayCard()")
31
+ +todayCardContent()
@@ -1,10 +1,10 @@
1
- div.back-menu-list-groups
1
+ .back-menu-list-groups
2
2
  - var menu = theme.nav && theme.nav.left && theme.nav.left.menu ? theme.nav.left.menu : {}
3
3
  each groupData, x in menu
4
- div.back-menu-list-group
5
- div.back-menu-list-title= x
6
- div.back-menu-list
4
+ .back-menu-list-group
5
+ .back-menu-list-title= x
6
+ .back-menu-list
7
7
  each data, y in groupData
8
- a.back-menu-item(href=url_for(data.url), rel="external nofollow", title=y)
9
- img.back-menu-item-icon(src=data.icon, loading="lazy", alt=x)
8
+ a.back-menu-item(href=url_for(data.url), title=y)
9
+ img.back-menu-item-icon(src=data.icon, alt=x)
10
10
  span.back-menu-item-text= y
@@ -1,9 +1,9 @@
1
- div.menus_items
1
+ .menus_items
2
2
  - var menu = theme.nav && theme.nav.menu ? theme.nav.menu : {}
3
3
  each value, x in menu
4
- div.menus_item
4
+ .menus_item
5
5
  if !value.url
6
- a.site-page(href="javascript:void(0);", rel="external nofollow")
6
+ a.site-page(href="javascript:void(0);")
7
7
  span= x
8
8
  ul.menus_item_child
9
9
  each childValue, y in value.child
@@ -12,5 +12,5 @@ div.menus_items
12
12
  i(class=childValue.icon)
13
13
  span= y
14
14
  else
15
- a.site-page.not-child(href=url_for(value.url), rel="external nofollow")
15
+ a.site-page.not-child(href=url_for(value.url))
16
16
  span= x
@@ -1,23 +1,23 @@
1
1
  if theme.nav.right.travellings
2
- div.nav-button.only-home#travellings_button
3
- a.site-page(traget="_blank", href="https://www.travellings.cn/go.html", rel="noopener noreferrer", title="开往-友链接力", width="120")
4
- i.scoicon.sco-train-line(style="font-size: 1rem;")
2
+ .nav-button.only-home#travellings_button
3
+ a.site-page(href="https://www.travellings.cn/go.html", title=_p('nav.travellings'), target="_blank")
4
+ i.scoicon.sco-train-line
5
5
  if theme.nav.right.random
6
- div.nav-button#randomPost_button
7
- a.site-page(onclick="toRandomPost()", title="随机前往一个文章")
8
- i.scoicon.sco-signal-tower-fill(style="font-size: 1rem;")
6
+ .nav-button#randomPost_button
7
+ a.site-page(onclick="toRandomPost()", title=_p('nav.randompost'), href="javascript:void(0);")
8
+ i.scoicon.sco-signal-tower-fill
9
9
  if theme.thirdparty.search.enable
10
- div.nav-button#search-button
11
- a.site-page.social-icon.search(href="javascript:void(0);", rel= "external nofollow", title="搜索")
12
- i.scoicon.sco-search-line(style="font-size: 1rem;")
10
+ .nav-button#search-button
11
+ a.site-page.social-icon.search(href="javascript:void(0);", title=_p('nav.search'))
12
+ i.scoicon.sco-search-line
13
13
  if theme.nav.right.console
14
- div.nav-button#nav-console
15
- a.console_switchbutton(onclick="sco.showConsole()", title="显示中控台", rel="external nofollow", href="javascript:void(0);")
16
- i.scoicon.sco-dashboard-fill(style="font-size: 1rem;")
17
- div.nav-button#nav-totop(onclick="sco.toTop()")
14
+ .nav-button#nav-console
15
+ a.console_switchbutton(onclick="sco.showConsole()", title=_p('nav.console'), href="javascript:void(0);")
16
+ i.scoicon.sco-dashboard-fill
17
+ .nav-button#nav-totop(onclick="sco.toTop()")
18
18
  a.totopbtn
19
19
  i.scoicon.sco-arrow-up-line
20
20
  span#percent= "0"
21
- div#toggle-menu
21
+ #toggle-menu
22
22
  a.site-page
23
23
  i.scoicon.sco-menu-line
@@ -9,4 +9,4 @@
9
9
  .author-tag-right
10
10
  each tag in authorinfo.rightTags
11
11
  span.author-tag= tag
12
- .author-title 关于我
12
+ .author-title= authorinfo.title
@@ -1,34 +1,36 @@
1
+ - award = site.data.about.award
2
+
1
3
  - var sum = 0
2
4
  if site.data.about.rewardList
3
5
  .author-content
4
6
  .author-content-item.single.reward
5
- .author-content-item-tips 致谢
6
- span.author-content-item-title 赞赏名单
7
+ .author-content-item-tips= _p('award.about.tip')
8
+ span.author-content-item-title= _p('award.about.title')
7
9
  .author-content-item-description
8
- = "感谢赞赏的人,因为你们,让我感受到写博客这件事情能够给你们创造了价值。这会让我在这条路上走得更远。"
10
+ = award.description
9
11
  .reward-list-all
10
12
  each reward in site.data.about.rewardList
11
13
  - sum += reward.money
12
14
  .reward-list-item
13
15
  .reward-list-item-name= reward.name
14
16
  .reward-list-bottom-group
15
- .reward-list-item-money(style=reward.vip ? "background: var(--sco-vip);" : "") ¥ #{reward.money}
17
+ .reward-list-item-money(style=(reward.vip ? "background: var(--sco-vip);" : "")) ¥ #{reward.money}
16
18
  time.datatime.reward-list-item-time(datetime=moment(reward.time).format())
17
19
  if theme.post.award.enable
18
20
  .post-reward
19
21
  .post-reward(onclick="AddRewardMask()")
20
- .reward-button(title="赞赏作者")
22
+ .reward-button(title=_p('award.about.tip1'))
21
23
  i.scoicon.sco-hand-heart-fill
22
- = "打赏作者"
24
+ = _p('award.about.tip1')
23
25
  .reward-main
24
26
  ul.reward-all
25
- span.reward-title 感谢你赐予我前进的力量
27
+ span.reward-title= _p('award.about.tip2')
26
28
  ul.reward-group
27
- - var rewards = [{image: theme?.post?.award?.wechat, description: '微信'}, {image: theme?.post?.award?.alipay, description: '支付宝'}]
29
+ - var rewards = [{image: theme.post.award.wechat, description: _p('award.wechat')}, {image: theme.post.award.alipay, description: _p('award.alipay')}]
28
30
  each reward in rewards
29
31
  li.reward-item
30
32
  a(href=reward.image, target="_blank")
31
33
  img.post-qr-code-img(alt=reward.description, src=reward.image)
32
34
  .post-qr-code-desc= reward.description
33
35
  .reward-list-tips
34
- p 总金额:¥ #{sum},将全部用于博客的维护
36
+ p= award.tips.replace('{sum}', sum)
@@ -2,17 +2,17 @@
2
2
 
3
3
  .author-content
4
4
  .author-content-item.myInfoAndSayHello
5
- .title1 你好,很高兴认识你👋
6
- .title2 我叫
5
+ .title1= _p('about.info.title1')
6
+ .title2= _p('about.info.title2')
7
7
  span.inline-word= contentinfo.name
8
- .title1 是一名 #{contentinfo.title}
8
+ .title1= _p('about.info.title3') + contentinfo.title
9
9
  .aboutsiteTips.author-content-item
10
- .author-content-item-tips 追求
10
+ .author-content-item-tips= _p('about.info.tip1')
11
11
  h2
12
- | 源于
12
+ = _p('about.info.tip2')
13
13
  br
14
- | 热爱而去
15
- span.inline-word 创造
14
+ = _p('about.info.tip3')
15
+ span.inline-word= _p('about.info.tip4')
16
16
  .mask
17
17
  span.first-tips(data-show='')= contentinfo.product
18
18
  span= contentinfo.design
@@ -28,6 +28,6 @@ if site.data.about.likes
28
28
  .tips= like.subtips
29
29
  if like.button
30
30
  .banner-button-group
31
- a.banner-button(href=like.button_link, target="_blank", rel="noopener nofollow")
31
+ a.banner-button(href=like.button_link)
32
32
  i.scoicon.sco-right-btn-fill
33
33
  span.banner-button-text= like.button_text
@@ -5,13 +5,13 @@
5
5
  .author-content-item.maxim
6
6
  .author-content-item-tips= motto.title
7
7
  span.maxim-title
8
- span(style="opacity: 0.6; margin-bottom:8px;")= motto.prefix
8
+ span= motto.prefix
9
9
  span= motto.content
10
10
  .author-content-item.buff
11
11
  .card-content
12
12
  .author-content-item-tips= expertise.title
13
13
  span.buff-title
14
- span(style="opacity: 0.6; margin-bottom:8px;")
14
+ span
15
15
  | #{expertise.prefix}
16
16
  span.inline-word= expertise.specialist
17
17
  span
@@ -7,31 +7,32 @@
7
7
  #statistic
8
8
  .post-tips
9
9
  | 统计信息来自
10
- a(href="https://invite.51.la/1NzKqTeb?target=V6", target="_blank", rel="noopener nofollow") 51la网站统计
10
+ a(href="https://invite.51.la/1NzKqTeb?target=V6") 51la网站统计
11
11
  if theme.about.echarts.enable
12
12
  .banner-button-group
13
- a.banner-button(onclick="pjax.loadUrl('/echart/');", data-pjax-state="")
13
+ a.banner-button(onclick="pjax.loadUrl('/echart/');")
14
14
  i.scoicon.sco-right-btn-fill
15
15
  span.banner-button-text 文章统计
16
16
  script.
17
17
  fetch("#{site.data.about.tj.url}")
18
18
  .then(res => res.text())
19
19
  .then(data => {
20
- let title = ["最近活跃", "今日人数", "今日访问", "昨日人数", "昨日访问", "本月访问", "总访问量"];
20
+ const title = ["最近活跃", "今日人数", "今日访问", "昨日人数", "昨日访问", "本月访问", "总访问量"];
21
21
  let num = data.match(/(<\/span><span>).*?(\/span><\/p>)/g);
22
22
  num = num.map(el => {
23
23
  let val = el.replace(/(<\/span><span>)/g, "");
24
- let str = val.replace(/(<\/span><\/p>)/g, "");
25
- return str;
24
+ return val.replace(/(<\/span><\/p>)/g, "");
26
25
  });
27
- let s = document.getElementById("statistic");
28
- let statistic = [];
26
+ const s = document.getElementById("statistic");
27
+ let html = '';
29
28
  for (let i = 0; i < num.length; i++) {
30
- if (i == 0 || i == num.length - 1) continue;
31
- s.innerHTML += "<div><span>" + title[i] + "</span><span id=" + title[i] + ">" + num[i] + "</span></div>";
29
+ if (i === 0 || i === num.length - 1) continue;
30
+ html += `<div><span>${title[i]}</span><span id="${title[i]}">${num[i]}</span></div>`;
32
31
  }
32
+ s.innerHTML = html;
33
33
  });
34
34
 
35
+
35
36
  if site.data.about.oneself
36
37
  style.
37
38
  :root {
@@ -9,8 +9,8 @@
9
9
  img(src=personalities.image)
10
10
  .post-tips
11
11
  | 在
12
- a(href="https://www.16personalities.com/", target="_blank", rel="noopener nofollow")= personalities.linkText
12
+ a(href="https://www.16personalities.com/")= personalities.linkText
13
13
  | 了解更多关于
14
- a(target="_blank", rel="noopener external nofollow", href=personalities.typeLink)= personalities.typeName
14
+ a(href=personalities.typeLink)= personalities.typeName
15
15
  .author-content-item.myphoto
16
16
  img.author-content-img(src=personalities.myphoto, alt="自拍")
@@ -9,18 +9,16 @@
9
9
  .skills-style-group
10
10
  .tags-group-all
11
11
  .tags-group-wrapper
12
- .tags-group-all
13
- .tags-group-wrapper
14
- each i in [1,2]
15
- - var pair = []
16
- each tag, index in skills.tags
17
- - pair.push(tag)
18
- if pair.length === 2 || index === skills.tags.length - 1
19
- .tags-group-icon-pair
20
- each item in pair
21
- .tags-group-icon(style=`background:${item.color}`)
22
- img(src=item.icon, title=item.title)
23
- - pair = []
12
+ each i in [1,2]
13
+ - var pair = []
14
+ each tag, index in skills.tags
15
+ - pair.push(tag)
16
+ if pair.length === 2 || index === skills.tags.length - 1
17
+ .tags-group-icon-pair
18
+ each item in pair
19
+ .tags-group-icon(style=`background:${item.color}`)
20
+ img(src=item.icon, title=item.title)
21
+ - pair = []
24
22
  .skills-list
25
23
  each tag in skills.tags
26
24
  .skill-info
@@ -0,0 +1,48 @@
1
+ - var tenyear = site.data.about.tenyear
2
+ if tenyear
3
+ .author-content#tenyear
4
+ .create-site-post.author-content-item.single
5
+ .author-content-item-tips=tenyear.tips
6
+ .author-content-item-title=tenyear.title
7
+ p=tenyear.text
8
+ .tenyear-timeline
9
+ .progress
10
+ .past-time
11
+ .percentage-label
12
+ .time-labels
13
+ .start-time#tenyear-start-time= tenyear.start
14
+ .end-time#tenyear-end-time= tenyear.end
15
+
16
+ script.
17
+ function parseDateString(e) {
18
+ return e.replace(/年|月/g, '-').replace(/日/g, '');
19
+ }
20
+
21
+ function tenYear() {
22
+ let progressElement = document.querySelector(".progress");
23
+ let pastTimeElement = document.querySelector(".past-time");
24
+ let percentageLabelElement = document.querySelector(".percentage-label");
25
+ let startTimeElement = document.getElementById("tenyear-start-time");
26
+ let endTimeElement = document.getElementById("tenyear-end-time");
27
+
28
+ let startTime = new Date(parseDateString(startTimeElement.textContent)).getTime();
29
+ let endTime = new Date(parseDateString(endTimeElement.textContent)).getTime();
30
+
31
+ function updateProgress() {
32
+ let currentTime = new Date().getTime();
33
+ let progress = ((currentTime - startTime) / (endTime - startTime) * 100);
34
+ let progressPercentage = progress <= 100 ? progress + "%" : "100%";
35
+
36
+ pastTimeElement.style.setProperty("--past-time-percentage", progress + "%");
37
+ progressElement.style.setProperty("--progress-percentage", progressPercentage);
38
+ if(progress > 5){
39
+ percentageLabelElement.textContent = `${progress.toFixed(0)}%`;
40
+ percentageLabelElement.style.left = `calc(${progress}% - 28px)`;
41
+ }
42
+ }
43
+
44
+ percentageLabelElement.style.visibility = "visible";
45
+ updateProgress();
46
+ }
47
+
48
+ document.getElementById("tenyear") && tenYear() && window.Pjax.on('complete', tenYear)
@@ -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"))