hexo-theme-solitude 3.0.20 → 4.0.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 (143) hide show
  1. package/.github/FUNDING.yml +3 -3
  2. package/README.md +11 -1
  3. package/README_en-US.md +11 -1
  4. package/_config.yml +16 -7
  5. package/languages/default.yml +56 -36
  6. package/languages/en.yml +90 -69
  7. package/languages/es.yml +94 -73
  8. package/languages/zh-CN.yml +56 -34
  9. package/languages/zh-TW.yml +80 -57
  10. package/layout/archive.pug +60 -14
  11. package/layout/category.pug +13 -11
  12. package/layout/includes/body/gadsense.pug +2 -2
  13. package/layout/includes/console.pug +71 -72
  14. package/layout/includes/footer.pug +38 -24
  15. package/layout/includes/head/config.pug +83 -39
  16. package/layout/includes/head/mode.pug +7 -7
  17. package/layout/includes/head/page_config.pug +20 -11
  18. package/layout/includes/inject/body.pug +18 -40
  19. package/layout/includes/keyboard.pug +3 -3
  20. package/layout/includes/loading.pug +1 -37
  21. package/layout/includes/mixins/articleSort.pug +3 -3
  22. package/layout/includes/mixins/common.pug +8 -4
  23. package/layout/includes/mixins/pace.pug +1 -1
  24. package/layout/includes/mixins/pagination.pug +3 -3
  25. package/layout/includes/nav.pug +5 -4
  26. package/layout/includes/page/about.pug +9 -8
  27. package/layout/includes/page/brevity.pug +2 -2
  28. package/layout/includes/page/links.pug +23 -11
  29. package/layout/includes/page/music.pug +0 -5
  30. package/layout/includes/rightmenu.pug +20 -20
  31. package/layout/includes/sidebar.pug +2 -2
  32. package/layout/includes/widgets/aside/asideInfoCard.pug +2 -2
  33. package/layout/includes/widgets/aside/asideTag.pug +2 -2
  34. package/layout/includes/widgets/home/bbTimeList.pug +3 -3
  35. package/layout/includes/widgets/home/categoryBar.pug +30 -15
  36. package/layout/includes/widgets/home/hometop.pug +113 -8
  37. package/layout/includes/widgets/home/postList.pug +1 -2
  38. package/layout/includes/widgets/home/topGroup.pug +3 -7
  39. package/layout/includes/widgets/nav/group.pug +4 -2
  40. package/layout/includes/widgets/nav/menu.pug +6 -4
  41. package/layout/includes/widgets/nav/right.pug +7 -6
  42. package/layout/includes/widgets/page/about/award.pug +67 -38
  43. package/layout/includes/widgets/page/about/hobbies.pug +12 -3
  44. package/layout/includes/widgets/page/banner.pug +1 -1
  45. package/layout/includes/widgets/page/kit/content.pug +2 -2
  46. package/layout/includes/widgets/page/links/banner.pug +30 -19
  47. package/layout/includes/widgets/page/message/artalk.pug +3 -3
  48. package/layout/includes/widgets/page/message/content.pug +3 -3
  49. package/layout/includes/widgets/page/message/twikoo.pug +3 -3
  50. package/layout/includes/widgets/page/message/valine.pug +4 -4
  51. package/layout/includes/widgets/page/message/waline.pug +3 -3
  52. package/layout/includes/widgets/page/recentcomment/artalk.pug +5 -9
  53. package/layout/includes/widgets/page/recentcomment/twikoo.pug +5 -9
  54. package/layout/includes/widgets/page/recentcomment/valine.pug +6 -10
  55. package/layout/includes/widgets/page/recentcomment/waline.pug +5 -9
  56. package/layout/includes/widgets/post/award.pug +1 -28
  57. package/layout/includes/widgets/post/copyright.pug +10 -10
  58. package/layout/includes/widgets/post/postInfo.pug +10 -11
  59. package/layout/includes/widgets/post/postMeta.pug +3 -2
  60. package/layout/includes/widgets/rightside/hide.pug +5 -5
  61. package/layout/includes/widgets/rightside/show.pug +7 -7
  62. package/layout/includes/widgets/third-party/comments/artalk.pug +9 -9
  63. package/layout/includes/widgets/third-party/comments/giscus.pug +2 -2
  64. package/layout/includes/widgets/third-party/comments/twikoo.pug +5 -5
  65. package/layout/includes/widgets/third-party/comments/valine.pug +6 -6
  66. package/layout/includes/widgets/third-party/comments/waline.pug +6 -6
  67. package/layout/includes/widgets/third-party/hot/index.pug +1 -1
  68. package/layout/includes/widgets/third-party/hot/twikoo.pug +1 -1
  69. package/layout/includes/widgets/third-party/music.pug +9 -5
  70. package/layout/includes/widgets/third-party/news-comment/artalk.pug +6 -6
  71. package/layout/includes/widgets/third-party/news-comment/twikoo.pug +7 -7
  72. package/layout/includes/widgets/third-party/news-comment/valine.pug +8 -8
  73. package/layout/includes/widgets/third-party/news-comment/waline.pug +7 -7
  74. package/layout/includes/widgets/third-party/pjax.pug +16 -10
  75. package/layout/includes/widgets/third-party/search/algolia-search.pug +2 -2
  76. package/layout/includes/widgets/third-party/search/docsearch.pug +3 -3
  77. package/layout/includes/widgets/third-party/search/index.pug +1 -3
  78. package/layout/includes/widgets/third-party/search/local-search.pug +9 -9
  79. package/layout/index.pug +10 -8
  80. package/package.json +8 -7
  81. package/plugins.yml +22 -21
  82. package/scripts/event/cdn.js +11 -6
  83. package/scripts/event/friend_links.js +30 -0
  84. package/scripts/event/merge_config.js +15 -7
  85. package/scripts/filter/comment.js +2 -2
  86. package/scripts/filter/default.js +1 -1
  87. package/scripts/helper/inject_head_js.js +79 -33
  88. package/scripts/helper/related_post.js +16 -21
  89. package/scripts/tags/chart.js +1 -1
  90. package/scripts/tags/typeit.js +1 -1
  91. package/source/css/_components/capsule.styl +259 -168
  92. package/source/css/_components/rightside.styl +98 -242
  93. package/source/css/_global/animation.styl +1 -10
  94. package/source/css/_global/index.styl +27 -1
  95. package/source/css/_layout/aside.styl +7 -1
  96. package/source/css/_layout/console.styl +144 -163
  97. package/source/css/_layout/header.styl +238 -47
  98. package/source/css/_layout/pagination.styl +176 -132
  99. package/source/css/_layout/rightmenu.styl +11 -2
  100. package/source/css/_layout/sidebar.styl +39 -17
  101. package/source/css/_mode/index.styl +7 -1
  102. package/source/css/_page/_about/about.styl +18 -2
  103. package/source/css/_page/_about/buff.styl +1 -1
  104. package/source/css/_page/_about/contentinfo.styl +2 -1
  105. package/source/css/_page/_about/game.styl +57 -1
  106. package/source/css/_page/_about/like.styl +7 -2
  107. package/source/css/_page/_about/maxim.styl +1 -1
  108. package/source/css/_page/_about/reward.styl +226 -108
  109. package/source/css/_page/_about/skills.styl +5 -3
  110. package/source/css/_page/_home/category-bar.styl +162 -88
  111. package/source/css/_page/_home/home-top.styl +309 -263
  112. package/source/css/_page/_home/home.styl +34 -7
  113. package/source/css/_page/archive.styl +412 -0
  114. package/source/css/_page/category.styl +27 -1
  115. package/source/css/_page/index.styl +2 -0
  116. package/source/css/_page/links.styl +190 -0
  117. package/source/css/_page/other.styl +37 -0
  118. package/source/css/_post/index.styl +2 -1
  119. package/source/css/_post/meta.styl +245 -217
  120. package/source/css/_search/local-search.styl +158 -82
  121. package/source/css/var.styl +2 -2
  122. package/source/js/archive-page.js +191 -0
  123. package/source/js/core/actions.js +48 -0
  124. package/source/js/core/api.js +32 -0
  125. package/source/js/core/config.js +13 -0
  126. package/source/js/core/lifecycle.js +52 -0
  127. package/source/js/core/preloader.js +34 -0
  128. package/source/js/core/resources.js +65 -0
  129. package/source/js/covercolor/api.js +13 -103
  130. package/source/js/covercolor/ave.js +14 -77
  131. package/source/js/covercolor/local.js +22 -116
  132. package/source/js/covercolor/shared.js +102 -0
  133. package/source/js/friend_links.js +502 -0
  134. package/source/js/main.js +793 -177
  135. package/source/js/music.js +24 -14
  136. package/source/js/post_ai.js +13 -2
  137. package/source/js/right_menu.js +44 -24
  138. package/source/js/search/algolia.js +29 -21
  139. package/source/js/search/local.js +231 -266
  140. package/source/js/tw_cn.js +37 -12
  141. package/source/js/utils.js +37 -25
  142. package/layout/includes/widgets/randomlink.pug +0 -43
  143. package/scripts/filter/randomPosts.js +0 -16
@@ -1,14 +1,14 @@
1
- framework_by: 框架:
1
+ framework_by: 架構:
2
2
  theme_by: 主題:
3
3
 
4
4
  more: 更多
5
- star: 喜歡這篇的人也看了
5
+ star: 喜歡這篇文章的人也看了
6
6
  random: 隨便逛逛
7
- upload: 發佈時間:
7
+ upload: 發布時間:
8
8
  totalk: 無需刪除空行,直接輸入評論即可
9
- loading: 加載中...
9
+ loading: 載入中…
10
10
  day: " 天"
11
- hot-tip: 多人互動
11
+ hot-tip: 熱門互動
12
12
 
13
13
  # Language: 繁體中文 (台灣)
14
14
  theme:
@@ -21,7 +21,7 @@ copy:
21
21
 
22
22
  copy_copyright:
23
23
  author: 作者
24
- link: 鏈結
24
+ link: 連結
25
25
  source: 來源
26
26
  info: 著作權歸作者所有。商業轉載請聯繫作者獲得授權,非商業轉載請註明出處。
27
27
 
@@ -38,18 +38,27 @@ page:
38
38
  tags: 全部標籤
39
39
  categories: 全部分類
40
40
  archives: 文章
41
- 404: 頁面沒有找到
41
+ 404: 找不到頁面
42
42
 
43
43
  nav:
44
- site_name_title: 返回博客主頁
44
+ site_name_title: 返回部落格首頁
45
45
  backtop: 返回頂部
46
- travellings: 開往-友鏈接力
46
+ travellings: 開往 - 友鏈接力
47
47
  search: 搜尋
48
48
  randompost: 隨機一篇文章
49
49
  console: 主控台
50
50
 
51
+ tooltip:
52
+ home: 查看所有推薦文章
53
+ archives: 查看所有文章
54
+ category: "查看 ${name} 分類下的文章"
55
+ categories: 查看所有分類
56
+ category_next: 捲動分類列
57
+
51
58
  home:
52
59
  home: 推薦
60
+ bbtime:
61
+ text: 查看全部短文
53
62
  sticky: 置頂
54
63
  new: 最新
55
64
  read: 未讀
@@ -60,19 +69,19 @@ home:
60
69
  post:
61
70
  reprint: 轉載或翻譯
62
71
  original: 原創
63
- cc: 該文章為${cc}文章,注意版權協議
72
+ cc: 本文採用 ${cc} 授權條款
64
73
  posted: 發布於
65
74
  updated: 最後更新於
66
75
  wordcount: 文章字數
67
- minread: 閱讀耗時
68
- ip: 作者IP歸屬地為
69
- pv: 文章熱度
76
+ minread: 閱讀時間
77
+ ip: 作者 IP 所在地
78
+ pv: 瀏覽量
70
79
  min: 分
71
80
  comment: 評論數
72
81
  copyright:
73
82
  reprint: 本文是轉載或翻譯文章,版權歸原作者所有。轉載本文請聯繫原作者。
74
83
  original: 本文是原創文章,採用
75
- original_end: 協議,完整轉載請註明來自
84
+ original_end: 授權條款,完整轉載請註明來自
76
85
  share:
77
86
  qq: 分享到QQ
78
87
  weibo: 分享到微博
@@ -80,8 +89,8 @@ post:
80
89
  twitter: 分享到Twitter
81
90
  linkedin: 分享到LinkedIn
82
91
  facebook: 分享到Facebook
83
- link: 複製文章鏈接
84
- qrcode: 使用手機掃碼閱讀這篇文章
92
+ link: 複製文章連結
93
+ qrcode: 手機掃碼閱讀
85
94
  whatsapp: 分享到WhatsApp
86
95
  ai:
87
96
  title: 文章摘要
@@ -97,40 +106,42 @@ award:
97
106
  search:
98
107
  empty: 找不到你查詢的內容:${query}
99
108
  hit: 找到 ${hits} 條結果,用時 ${time} 毫秒
100
- placeholder: 輸入關鍵詞快速查找
101
- count: 共 <b>${count}<b> 條結果。
102
- load: 加載中...
109
+ placeholder: 輸入關鍵字搜尋
110
+ count: 共 <b>${count}</b> 筆結果。
111
+ load: 搜尋中…
112
+ close: 關閉搜尋
113
+ suggestions: 熱門搜尋
103
114
 
104
115
  head:
105
- noscript: 開啟JavaScript才能訪問本站哦~
116
+ noscript: 啟用 JavaScript 後才能瀏覽本站
106
117
 
107
118
  aside:
108
119
  postcount: "文章數:"
109
120
  pv: "瀏覽量:"
110
121
  uv: "訪客數:"
111
- runtime: "運行時間:"
122
+ runtime: "建站天數:"
112
123
  updatetime: "最後更新:"
113
124
  wordcount: "字數統計:"
114
125
  toc: 文章目錄
115
126
  tagmore: 查看全部
116
127
  avatar: 頭像
117
128
  hello: 好久不見,
118
- back: 歡迎再次回來,
129
+ back: 歡迎回來,
119
130
  sticker: 心情貼紙
120
- newpost: 最近發佈
131
+ newpost: 最近發布
121
132
  newcomment: 最近評論
122
133
  card:
123
- posts: "累計文章數:"
124
- tags: "標籤總數:"
125
- categories: "分類總數:"
134
+ posts: "累計文章數:"
135
+ tags: "標籤總數:"
136
+ categories: "分類總數:"
126
137
 
127
138
  console:
128
139
  comment_tip: 互動
129
- comment_title: 評論
140
+ comment_title: 最新評論
130
141
  tag_tip: 標籤
131
- tag_title: 尋找感興趣的領域
142
+ tag_title: 探索感興趣的內容
132
143
  switch_darkmode: 晝夜切換
133
- switch_hideAside: 側邊欄顯示控制
144
+ switch_hideAside: 側邊欄顯示
134
145
  switch_keyboard: 鍵盤快捷鍵
135
146
  switch_music: 音樂開關
136
147
  archive_unit: 篇
@@ -138,15 +149,15 @@ console:
138
149
  recent_comment_more: 最近評論
139
150
  newest_comment:
140
151
  image: 圖片
141
- link: 鏈結
142
- code: 代碼
152
+ link: 連結
153
+ code: 程式碼
143
154
  emoji: 表情
144
- empty: 暫無評論...
155
+ empty: 尚無評論…
145
156
 
146
157
  sidebar:
147
158
  function: 功能
148
159
  darkmode: 顯示模式
149
- siteinfo: 網站信息
160
+ siteinfo: 網站資訊
150
161
 
151
162
  footer:
152
163
  description: 來自${title}的文章
@@ -156,9 +167,9 @@ footer:
156
167
  theme: 主題
157
168
 
158
169
  cookies:
159
- title: 協議提醒助手
160
- tip: 查看本站為你的個人隱私做出的努力
161
- privacy: 本站如何保護你的隱私
170
+ title: 隱私權提醒
171
+ tip: 查看本站如何保護你的個人隱私
172
+ privacy: 本站如何保護你的隱私權
162
173
 
163
174
  music:
164
175
  hit: 音樂已暫停
@@ -167,15 +178,25 @@ music:
167
178
  button: 返回首頁
168
179
 
169
180
  link:
181
+ loading: 正在載入友鏈…
182
+ error: 友鏈載入失敗,請稍後重試。
183
+ retry: 重新載入
184
+ default_sort: 預設排序
185
+ random_sort: 隨機排序
186
+ sort_label: 切換排序方式
187
+ scroll_left: 向左捲動
188
+ scroll_right: 向右捲動
170
189
  banner:
171
190
  toComment: 申請友鏈
172
- random: 點擊前往按鈕進入隨機一個友鏈,不保證跳轉網站的安全性和可用性。本次隨機到的是本站友鏈:⌈ ${name} ⌋
173
- to: 前往
191
+ random: 隨機造訪
192
+ random: 隨機造訪一個友鏈;不保證目的網站的安全性與可用性。本次選中:⌈ ${name} ⌋
193
+ to: 前往
194
+
174
195
  keyboard:
175
- title: 博客快捷鍵
196
+ title: 部落格快捷鍵
176
197
 
177
198
  newest_comment:
178
- error: 無法獲取評論,請確認相關配置是否正確。
199
+ error: 無法取得評論,請檢查相關設定。
179
200
  zero: 沒有評論
180
201
 
181
202
  comment:
@@ -184,37 +205,39 @@ comment:
184
205
  commentBarrage:
185
206
  title: 熱評
186
207
 
187
- f12: 開發者模式已打開,請遵循GPL協定。
208
+ f12: 開發者模式已開啟,請遵守 GPL 授權條款。
188
209
 
189
210
  right_menu:
190
- copy: 複製選中文本
191
- paste: 貼上文本
192
- comment: 引用到評論
193
- new: 新窗口打開
194
- link: 複製鏈結位址
211
+ copy: 複製選取文字
212
+ paste: 貼上文字
213
+ comment: 引用至評論
214
+ new: 在新視窗開啟
215
+ link: 複製連結位址
195
216
  img: 複製此圖片
196
217
  downloadImg: 下載此圖片
197
- search: 站內搜索
218
+ search: 站內搜尋
198
219
  dark: 淺色模式
199
220
  light: 深色模式
200
221
  chs_to_cht: 轉為繁體
201
- cht_to_chs: 转为简体
222
+ cht_to_chs: 轉為簡體
223
+ converted_to_cht: 已切換為繁體中文
224
+ converted_to_chs: 已切換為簡體中文
202
225
  img_error: 此圖片無法複製與下載
203
- ctrl_original_menu: 按住Ctrl+右鍵可打開瀏覽器右鍵選單
226
+ ctrl_original_menu: 按住 Ctrl 並按一下右鍵,可開啟瀏覽器右鍵選單
204
227
  barrage:
205
228
  open: 顯示熱評
206
229
  close: 關閉熱評
207
230
  music:
208
231
  start: 播放音樂
209
232
  stop: 暫停音樂
210
- back: 切換到上一首
211
- forward: 切換到下一首
233
+ back: 上一首
234
+ forward: 下一首
212
235
  copyMusicName: 複製歌名
213
236
 
214
237
  pagination:
215
238
  prev: 上一頁
216
239
  next: 下一頁
217
- to: 跳轉到指定頁面
240
+ to: 前往指定頁面
218
241
 
219
242
  about:
220
243
  other:
@@ -223,9 +246,9 @@ about:
223
246
  info_title1: 生於
224
247
  info_title2: 現在職業
225
248
  tj:
226
- tip: 數據
227
- title: 訪問統計
228
- post_tip: 統計信息來自
249
+ tip: 資料
250
+ title: 瀏覽統計
251
+ post_tip: "統計資料來源:"
229
252
  personalities:
230
253
  tip1: 在
231
254
  tip2: 瞭解更多關於
@@ -237,11 +260,11 @@ message:
237
260
  essay:
238
261
  tip0: "- 已展開所有短文 -"
239
262
  tip1: "- 只展示最近 #{count} 條短文 -"
240
- link: "鏈結"
263
+ link: "連結"
241
264
 
242
265
  rightside:
243
266
  show:
244
- gear: 擴展
267
+ gear: 工具
245
268
  toc: 目錄
246
269
  comment: 評論
247
270
  top: 返回頂部
@@ -1,19 +1,65 @@
1
1
  extends includes/layout.pug
2
2
 
3
3
  block content
4
- main.layout#content-inner
4
+ case theme.page.archives
5
+ when 0
6
+ -
7
+ const archivePosts = site.posts.find({ parent: { $exists: false } }).sort('-date').data
8
+ const fallbackCovers = theme.page.default.cover || theme.post.default.cover || ['/img/default.avif']
9
+ const fallbackCover = fallbackCovers.length ? fallbackCovers[0] : '/img/default.avif'
10
+ const archiveData = archivePosts.map(post => {
11
+ const categories = post.categories && post.categories.data ? post.categories.data : []
12
+ return {
13
+ title: post.title,
14
+ url: url_for(post.path),
15
+ cover: url_for(post.cover || fallbackCover),
16
+ primaryCategory: categories.length ? categories[0].name : '未分类',
17
+ dateLabel: post.date.format('YYYY年M月D日'),
18
+ year: String(post.date.year())
19
+ }
20
+ })
21
+ const archiveJson = JSON.stringify(archiveData).replace(/</g, '\\u003c')
22
+ const archivePageSize = Math.max(Number(config.per_page) || 10, 1)
23
+ const initialArchiveYear = page.year ? String(page.year) : 'all'
24
+ const initialArchivePage = Math.max(Number(page.current) || 1, 1)
25
+
26
+ main.layout.layout--archive#content-inner
27
+ .home-category-bar.category-in-bar
28
+ #category-bar
29
+ include ./includes/widgets/home/categoryBar
30
+
31
+ .archive-layout-row
32
+ #page
33
+ .archive-page-shell#archives-page(
34
+ data-per-page=archivePageSize
35
+ data-initial-year=initialArchiveYear
36
+ data-initial-page=initialArchivePage
37
+ )
38
+ .archive-page-section.archive-page-section-toolbar
39
+ .archive-page-toolbar
40
+ .archive-page-years(role='tablist' aria-label='年份筛选')
41
+ button.archive-year-button.is-active(type='button' data-year='all' aria-pressed='true') 全部
42
+ #archives-year-filter-list
43
+
44
+ .archive-page-section.archive-page-section-list
45
+ .archive-page-list#archives-page-list
46
+ .archive-page-state 文章列表加载中...
47
+
48
+ .archive-page-section.archive-page-section-pagination
49
+ nav#pagination(aria-label='归档分页')
50
+ .pagination
51
+
52
+ template#archive-page-data!= archiveJson
53
+
54
+ include includes/widgets/aside/aside
55
+
56
+ when 1
57
+ main.layout#content-inner
5
58
  #archive
6
- .article-sort-title #{__('page.archives')}<sup>#{site.posts.find({parent: {$exists: false}}).length}</sup>
7
- case theme.page.archives
8
- when 0
9
- .article-sort
10
- include includes/mixins/articleSort
11
- include includes/mixins/pagination
12
- when 1
13
- .recent-posts#recent-posts
14
- each post,index in page.posts.find({ parent: { $exists: false } }).data
15
- include includes/widgets/home/postList
16
- include includes/mixins/pagination
17
- if theme.comment.hot_tip.enable
18
- include ./includes/widgets/third-party/hot/index.pug
59
+ .recent-posts#recent-posts
60
+ each post,index in page.posts.find({ parent: { $exists: false } }).data
61
+ include includes/widgets/home/postList
62
+ include includes/mixins/pagination
63
+ if theme.comment.hot_tip.enable
64
+ include ./includes/widgets/third-party/hot/index.pug
19
65
  include includes/widgets/aside/aside
@@ -1,14 +1,16 @@
1
1
  extends includes/layout.pug
2
2
 
3
3
  block content
4
- main.layout#content-inner
5
- #category
6
- #category-bar
7
- include includes/widgets/home/categoryBar
8
- .recent-posts#recent-posts
9
- each post,index in page.posts.find({ parent: { $exists: false } }).data
10
- include includes/widgets/home/postList
11
- include includes/mixins/pagination
12
- if theme.comment.hot_tip.enable
13
- include ./includes/widgets/third-party/hot/index.pug
14
- include includes/widgets/aside/aside
4
+ main.layout.layout--category#content-inner
5
+ .home-category-bar.category-in-bar
6
+ #category-bar
7
+ include includes/widgets/home/categoryBar
8
+ .home-layout-row
9
+ #category
10
+ .recent-posts#recent-posts
11
+ each post,index in page.posts.find({ parent: { $exists: false } }).data
12
+ include includes/widgets/home/postList
13
+ include includes/mixins/pagination
14
+ if theme.comment.hot_tip.enable
15
+ include ./includes/widgets/third-party/hot/index.pug
16
+ include includes/widgets/aside/aside
@@ -1,9 +1,9 @@
1
1
  if theme.google_adsense && theme.google_adsense.enable
2
- script(async src=theme.google_adsense.js onerror="document.querySelectorAll('.google-ads-warp').forEach(i => i.style.display='none')")
2
+ script(async src=theme.google_adsense.js data-solitude-hide-ads="true")
3
3
 
4
4
  if theme.google_adsense.auto_ads
5
5
  script.
6
6
  (adsbygoogle = window.adsbygoogle || []).push({
7
7
  google_ad_client: '!{theme.google_adsense.client}',
8
8
  enable_page_level_ads: !{theme.google_adsense.enable_page_level_ads},
9
- });
9
+ });
@@ -4,80 +4,79 @@
4
4
  - const { use } = theme.comment
5
5
 
6
6
  div#console
7
- div.close-btn(onclick="sco.hideConsole()")
8
- i.solitude.fas.fa-xmark
9
- div.console-card-group
10
- if use && recentComment.enable
11
- div.console-card-group-left
12
- div.console-card#card-newest-comments(onclick="sco.hideConsole()")
13
- div.card-content
14
- div.author-content-item-tips= _p('console.comment_tip')
15
- div.author-content-item-title
16
- | #{_p('console.comment_title')}
17
- if theme.recent_comments.enable
18
- a.recent-comment-more(href=url_for(theme.recent_comments.page) title=_p('console.recent_comment_more'))
19
- i.solitude.fas.fa-circle-chevron-right
20
- .console_recentcomments
21
- - var sel = '.console-card .console_recentcomments'
22
- case use[0]
23
- when 'Twikoo'
24
- - var str_name = 'twikoo-recent-comments-console'
25
- include ./widgets/page/recentcomment/twikoo
26
- when 'Valine'
27
- - var str_name = 'valine-recent-comments-console'
28
- include ./widgets/page/recentcomment/valine
29
- when 'Waline'
30
- - var str_name = 'waline-recent-comments-console'
31
- include ./widgets/page/recentcomment/waline
32
- when 'Artalk'
33
- - var str_name = 'artalk-recent-comments-console'
34
- include ./widgets/page/recentcomment/artalk
35
- if card.tags || card.archive
36
- div.console-card-group-right
37
- if card.tags
38
- div.console-card.tags(onclick="sco.hideConsole()")
7
+ div.console-content
8
+ div.console-card-group(data-solitude-action="onConsoleCardGroupClick" data-solitude-event="true")
9
+ if use && recentComment.enable
10
+ div.console-card-group-left
11
+ div.console-card#card-newest-comments(data-solitude-action="hideConsole")
39
12
  div.card-content
40
- div.author-content-item-tips= _p('console.tag_tip')
41
- div.author-content-item-title= _p('console.tag_title')
42
- div.card-tag-cloud
43
- each tag in site.tags.find({ parent: { $exists: false } }).data
44
- a(href=url_for(tag.path))= tag.name
45
- sup= tag.length
46
- if card.archive
47
- div.console-card.history(onclick="sco.hideConsole()")
48
- - var archives = getArchiveLength(card.archive ? card.archive : 'year')
49
- ul.card-archive-list
50
- each value, key in archives
13
+ div.author-content-item-tips= _p('console.comment_tip')
14
+ div.author-content-item-title
15
+ | #{_p('console.comment_title')}
16
+ if theme.recent_comments.enable
17
+ a.recent-comment-more(href=url_for(theme.recent_comments.page) title=_p('console.recent_comment_more') heotip=_p('console.recent_comment_more'))
18
+ i.solitude.fas.fa-circle-chevron-right
19
+ .console_recentcomments
20
+ - var sel = '.console-card .console_recentcomments'
21
+ case use[0]
22
+ when 'Twikoo'
23
+ - var str_name = 'twikoo-recent-comments-console'
24
+ include ./widgets/page/recentcomment/twikoo
25
+ when 'Valine'
26
+ - var str_name = 'valine-recent-comments-console'
27
+ include ./widgets/page/recentcomment/valine
28
+ when 'Waline'
29
+ - var str_name = 'waline-recent-comments-console'
30
+ include ./widgets/page/recentcomment/waline
31
+ when 'Artalk'
32
+ - var str_name = 'artalk-recent-comments-console'
33
+ include ./widgets/page/recentcomment/artalk
34
+ if card.tags || card.archive
35
+ div.console-card-group-right
36
+ if card.tags
37
+ div.console-card.tags(data-solitude-action="hideConsole")
38
+ div.card-content
39
+ div.author-content-item-tips= _p('console.tag_tip')
40
+ div.author-content-item-title= _p('console.tag_title')
41
+ div.card-tag-cloud
42
+ each tag in site.tags.find({ parent: { $exists: false } }).data
43
+ a(href=url_for(tag.path))= tag.name
44
+ sup= tag.length
45
+ if card.archive
46
+ div.console-card.history(data-solitude-action="hideConsole")
47
+ - var archives = getArchiveLength(card.archive ? card.archive : 'year')
48
+ ul.card-archive-list
49
+ each value, key in archives
50
+ li.item
51
+ a(href=`/archives/${key}/`)
52
+ span.date= key
53
+ .count-group
54
+ span.count= value
55
+ span.unit= __('console.archive_unit')
51
56
  li.item
52
- a(href=`/archives/${key}/`)
53
- span.date= key
57
+ a(href='/archives/')
58
+ span.date= __('console.archive_all')
54
59
  .count-group
55
- span.count= value
60
+ span.count= site.posts.length
56
61
  span.unit= __('console.archive_unit')
57
- li.item
58
- a(href='/archives/')
59
- span.date= __('console.archive_all')
60
- .count-group
61
- span.count= site.posts.length
62
- span.unit= __('console.archive_unit')
63
62
 
64
- div.button-group
65
- div.console-btn-item
66
- span.darkmode_switchbutton(onclick="sco.switchDarkMode()", title=_p('console.switch_darkmode'))
67
- i.solitude.fas.fa-circle-half-stroke
68
- div.console-btn-item#consoleHideAside
69
- span.asideSwitch(onclick="sco.switchHideAside()", title=_p('console.switch_hideAside'))
70
- i.solitude.fas.fa-arrows-left-right-to-line
71
- if theme.keyboard.enable
72
- div.console-btn-item#consoleKeyboard(onclick="sco.switchKeyboard()")
73
- span.keyboardSwitch(title=_p('console.switch_keyboard'))
74
- i.solitude.fas.fa-keyboard
75
- if theme.capsule.enable
76
- div.console-btn-item#consoleMusic(onclick="sco.musicToggle()")
77
- span.music-switch(title=_p('console.switch_music'))
78
- i.solitude.fas.fa-compact-disc
79
- if theme.comment.use && theme.comment.commentBarrage
80
- div.console-btn-item.on#consoleCommentBarrage(onclick="sco.switchCommentBarrage()")
81
- span.commentBarrage
82
- i.solitude.fas.fa-comment
83
- div.console-mask(onclick="sco.hideConsole()")
63
+ div.button-group
64
+ div.console-btn-item
65
+ span.darkmode_switchbutton(data-solitude-action="toggleTheme" title=_p('console.switch_darkmode') heotip=_p('console.switch_darkmode'))
66
+ i.solitude.fas.fa-circle-half-stroke
67
+ div.console-btn-item#consoleHideAside
68
+ span.asideSwitch(data-solitude-action="switchHideAside" title=_p('console.switch_hideAside') heotip=_p('console.switch_hideAside'))
69
+ i.solitude.fas.fa-arrows-left-right-to-line
70
+ if theme.keyboard.enable
71
+ div.console-btn-item#consoleKeyboard(data-solitude-action="switchKeyboard")
72
+ span.keyboardSwitch(title=_p('console.switch_keyboard'), heotip=_p('console.switch_keyboard'))
73
+ i.solitude.fas.fa-keyboard
74
+ if theme.capsule.enable
75
+ div.console-btn-item#consoleMusic(data-solitude-action="musicToggle")
76
+ span.music-switch(title=_p('console.switch_music'), heotip=_p('console.switch_music'))
77
+ i.solitude.fas.fa-compact-disc
78
+ if theme.comment.use && theme.comment.commentBarrage
79
+ div.console-btn-item.on#consoleCommentBarrage(data-solitude-action="switchCommentBarrage")
80
+ span.commentBarrage(title=_p('commentBarrage.title') heotip=_p('commentBarrage.title'))
81
+ i.solitude.fas.fa-comment
82
+ div.console-mask(data-solitude-action="hideConsole")