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
@@ -2,7 +2,7 @@ if theme.aside.history.enable
2
2
  .card-widget.card-history
3
3
  .item-headline
4
4
  i(class=theme.aside.history.icon || 'scoicon sco-clock-fill')
5
- span= theme.aside.history.title || '那年今日'
6
- #history-baidu(style="height: 100px;overflow: hidden")
5
+ span= theme.aside.history.title || _p('aside.history')
6
+ #history-baidu
7
7
  #history-container.history_swiper-container(style="width: 100%;height: 100%;margin-top: 6px")
8
- #history_container_wrapper.swiper-wrapper(style="height:20px")
8
+ #history_container_wrapper.swiper-wrapper
@@ -2,18 +2,16 @@
2
2
  .card-content
3
3
  .card-info-avatar.is-center
4
4
  .author-info__top-group
5
- .author-info__sayhi#author-info__sayhi(onclick="sco.changeSayHelloText()") 一日之计在于晨
5
+ .author-info__sayhi#author-info__sayhi(onclick="sco.changeSayHelloText()")= _p('sayhello.morning')
6
6
  .avatar-img-group
7
- img.avatar-img(alt="avatar", src=theme.aside.card.author.img)
7
+ img.avatar-img(alt=_p('aside.avatar'), src=theme.aside.card.author.img)
8
8
  .avatar-sticker
9
- svg.avatar-sticker-img(alt="avatar", aria-hidden="true")
10
- use(xlink:href=theme.aside.card.author.state)
11
- script(src=url_for(theme.aside.card.author.js))
9
+ img.avatar-sticker-img(src=theme.aside.card.author.sticker, alt=_p('aside.sticker'))
12
10
  .author-info__description_group
13
11
  .author-info__description!= theme.aside.card.content
14
12
  .author-info__description2!= theme.aside.card.content2
15
13
  .author-info__bottom-group
16
- a.author-info__bottom-group-left(href=theme.about ? "/about" : "/", data-pjax-state)
14
+ a.author-info__bottom-group-left(href=theme.about ? "/about" : "/")
17
15
  .author-info__name= config.author
18
16
  .author-info__desc!= config.subtitle
19
17
  .card-info-social-icons.is-center
@@ -1,7 +1,7 @@
1
1
  .card-widget.card-recent-post
2
2
  .item-headline
3
3
  i.scoicon.sco-map-line
4
- span 最近发布
4
+ span= _p('aside.newpost')
5
5
  .aside-list
6
6
  - let index = 1
7
7
  each post in site.posts.data.sort((a, b) => b.date < a.date ? -1 : 1)
@@ -1,6 +1,4 @@
1
1
  case item
2
- when 'power'
3
- include ./asidePower.pug
4
2
  when 'about'
5
3
  include ./asideInfoCard.pug
6
4
  when 'flip'
@@ -11,15 +9,6 @@ case item
11
9
  include ./asideHistory.pug
12
10
  when 'newestPost'
13
11
  include ./asideNewestPost.pug
14
- when 'tag'
15
- .card-widget.card-tags
16
- include ./asideTag.pug
17
- when 'archive'
18
- .card-widget.card-archives
19
- include ./asideArchive.pug
20
- when 'webInfo'
21
- .card-widget.card-webinfo
22
- include ./asideWebInfo.pug
23
12
  when 'allInfo'
24
13
  include ./asideAllInfo.pug
25
14
  default
@@ -1,9 +1,9 @@
1
1
  .card-tag-cloud
2
2
  each tag in site.tags.find({ parent: { $exists: false } }).data
3
- a(href=url_for(tag.path), style="font-size: 0.8rem;")= tag.name
3
+ a(href=url_for(tag.path))= tag.name
4
4
  sup= tag.length
5
5
  if site.tags.length > 50
6
- a#more-tags-btn(href="javascript:void(0);", rel="external nofollow", onclick="sco.openAllTags();", data-pjax-state="") 查看全部
6
+ a#more-tags-btn(href="javascript:void(0);", onclick="sco.openAllTags();")= __('aside.tagmore')
7
7
  else
8
8
  style.
9
9
  .card-tag-cloud::after {
@@ -1,5 +1,5 @@
1
1
  .card-widget#card-toc
2
2
  .item-headline
3
3
  i.scoicon.sco-menu-line
4
- span 文章目录
4
+ span= __('aside.toc')
5
5
  .toc-content#toc-content!= toc(page.content, { list_number: false })
@@ -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)