hexo-theme-solitude 2.0.4 → 2.0.6

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 (57) hide show
  1. package/.editorconfig +9 -0
  2. package/README.md +2 -2
  3. package/README_zh-Hans.md +1 -1
  4. package/README_zh-Hant.md +2 -2
  5. package/_config.yml +17 -16
  6. package/languages/default.yml +8 -3
  7. package/languages/en.yml +8 -3
  8. package/languages/zh-CN.yml +8 -3
  9. package/languages/zh-TW.yml +8 -3
  10. package/layout/includes/inject/body.pug +4 -4
  11. package/layout/includes/inject/head.pug +2 -2
  12. package/layout/includes/loading.pug +14 -2
  13. package/layout/includes/page/says.pug +5 -5
  14. package/layout/includes/widgets/home/bbTimeList.pug +3 -3
  15. package/package.json +8 -5
  16. package/scripts/event/merge_config.js +4 -4
  17. package/scripts/event/welcome.js +2 -2
  18. package/scripts/helper/stylus.js +1 -1
  19. package/scripts/tags/mermaid.js +1 -1
  20. package/scripts/tags/tabs.js +11 -15
  21. package/source/css/_comments/twikoo.styl +7 -58
  22. package/source/css/_global/index.styl +1 -1
  23. package/source/css/_layout/header.styl +3 -2
  24. package/source/css/_page/_home/home-top.styl +1 -2
  25. package/source/css/_page/links.styl +102 -100
  26. package/source/css/_page/other.styl +6 -1
  27. package/source/css/_page/says.styl +3 -2
  28. package/source/css/_post/copyright.styl +7 -2
  29. package/source/css/_tags/mermaid.styl +1 -1
  30. package/source/css/_tags/tabs.styl +1 -1
  31. package/source/js/main.js +2 -2
  32. package/source/js/third_party/waterfall.min.js +5 -1
  33. package/scripts/tags/btns.js +0 -35
  34. package/scripts/tags/button.js +0 -21
  35. package/scripts/tags/bvideo.js +0 -7
  36. package/scripts/tags/checkbox.js +0 -51
  37. package/scripts/tags/fold.js +0 -13
  38. package/scripts/tags/image.js +0 -75
  39. package/scripts/tags/inline-image.js +0 -12
  40. package/scripts/tags/label.js +0 -10
  41. package/scripts/tags/link.js +0 -50
  42. package/scripts/tags/media.js +0 -29
  43. package/scripts/tags/note.js +0 -13
  44. package/scripts/tags/span.js +0 -17
  45. package/scripts/tags/timeline.js +0 -22
  46. package/source/css/_tags/btns.styl +0 -212
  47. package/source/css/_tags/button.styl +0 -40
  48. package/source/css/_tags/checkbox.styl +0 -204
  49. package/source/css/_tags/fold.styl +0 -65
  50. package/source/css/_tags/image.styl +0 -4
  51. package/source/css/_tags/index.styl +0 -63
  52. package/source/css/_tags/label.styl +0 -4
  53. package/source/css/_tags/link.styl +0 -59
  54. package/source/css/_tags/media.styl +0 -57
  55. package/source/css/_tags/note.styl +0 -104
  56. package/source/css/_tags/span.styl +0 -34
  57. package/source/css/_tags/timeline.styl +0 -82
package/.editorconfig ADDED
@@ -0,0 +1,9 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+ trim_trailing_whitespace = true
8
+ indent_style = space
9
+ indent_size = 2
package/README.md CHANGED
@@ -64,7 +64,7 @@ Check out the [Documentation](https://solitude.js.org/) for more information.
64
64
 
65
65
  <div align="center">
66
66
 
67
- [![buy me a coffee](https://img.shields.io/badge/buy%20me%20a%20coffee-support-FFDD00?logo=buy-me-a-coffee&logoColor=white&style=for-the-badge)](https://ko-fi.com/everfu)
67
+ [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/W7W1YSMOK)
68
68
 
69
69
  </div>
70
70
 
@@ -81,4 +81,4 @@ Check out the [Documentation](https://solitude.js.org/) for more information.
81
81
 
82
82
  ## License
83
83
 
84
- [MIT](./LICENSE) License &copy; 2023-PRESENT [Ever Fu](https://github.com/everfu)
84
+ [MIT](./LICENSE) License &copy; 2023-PRESENT [Ever Fu](https://github.com/everfu)
package/README_zh-Hans.md CHANGED
@@ -65,7 +65,7 @@
65
65
 
66
66
  <div align="center">
67
67
 
68
- [![buy me a coffee](https://img.shields.io/badge/请我喝杯咖啡-支持一下-3399FF?logo=buy-me-a-coffee&logoColor=white&style=for-the-badge)](https://ko-fi.com/everfu)
68
+ [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/W7W1YSMOK)
69
69
 
70
70
  </div>
71
71
 
package/README_zh-Hant.md CHANGED
@@ -62,7 +62,7 @@
62
62
 
63
63
  <div align="center">
64
64
 
65
- [![buy me a coffee](https://img.shields.io/badge/請我喝杯咖啡-支援一下-3399FF?logo=buy-me-a-coffee&logoColor=white&style=for-the-badge)](https://ko-fi.com/everfu)
65
+ [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/W7W1YSMOK)
66
66
 
67
67
  </div>
68
68
 
@@ -79,4 +79,4 @@
79
79
 
80
80
  ## 版權
81
81
 
82
- [MIT](./LICENSE) License &copy; 2023-至今 [Efu](https://github.com/everfu)
82
+ [MIT](./LICENSE) License &copy; 2023-至今 [Efu](https://github.com/everfu)
package/_config.yml CHANGED
@@ -47,7 +47,7 @@ nav:
47
47
  # icon: fas fa-train # Icon
48
48
  # onclick: # Click event
49
49
  # id: travellings_button # id
50
- # --------------------------- end ---------------------------
50
+ # --------------------------- end ---------------------------
51
51
 
52
52
  # --------------------------- start ---------------------------
53
53
  hometop:
@@ -75,9 +75,9 @@ hometop:
75
75
  # img: https://i.postimg.cc/nhgjwjCS/git.png
76
76
  # color: "#df5b40"
77
77
  group:
78
- # Fire: /tags/Fire/ || fas fa-fire || linear-gradient(to right, #f65, #ffbf37)
79
- # Course: /tags/Course/ || fas fa-book || linear-gradient(to right, #358bff, #15c6ff)
80
- # Curation: /tags/Curation/ || fas fa-star || linear-gradient(to right, #18e7ae, #1eebeb)
78
+ # Fire: /tags/Fire/ || fas fa-fire || linear-gradient(to right,#f65,#ffbf37)
79
+ # Course: /tags/Course/ || fas fa-book || linear-gradient(to right,#358bff,#15c6ff)
80
+ # Curation: /tags/Curation/ || fas fa-star || linear-gradient(to right,#18e7ae,#1eebeb)
81
81
  recommendList:
82
82
  sup: Top
83
83
  title: Solitude Documentation
@@ -108,13 +108,13 @@ aside:
108
108
  author:
109
109
  img: /img/avatar.avif # url (avatar)
110
110
  sticker: # url (sticker), 24x24
111
- url: /about/ # Click name to jump to address
111
+ url: /about/ # Click name to jump to address
112
112
  background: # https://s3.qjqq.cn/47/663af296b85f4.webp!color # Background image(Invalid if style is 0)
113
113
  content: Here is my personal blog # Introduction (Invalid if style is 1)
114
114
  content2: I believe you can find knowledge and tutorials here that will be useful to you. # Introduction (Invalid if style is 1)
115
115
  sayhello: # Style 2 is invalid
116
- morning: ✨ Good morning. It's a new day
117
- noon: It's time for a midday break
116
+ morning: ✨ Good morning. It's a new day
117
+ noon: It's time for a midday break
118
118
  afternoon: Tea time. 🍵
119
119
  night: early bedtime
120
120
  goodnight: Good night 😴
@@ -175,7 +175,7 @@ aside:
175
175
  pv: true # PV
176
176
  uv: true # UV
177
177
  updatetime: true # Last update date
178
- runtimeenable: true # Website creation time
178
+ runtimeenable: true # Website creation time
179
179
  runtime: "2023-04-20 00:00:00" # Format: yyyy-MM-dd hh-mm-ss
180
180
  # --------------------------- end ---------------------------
181
181
  # --------------------------- end ---------------------------
@@ -338,6 +338,7 @@ errorpage:
338
338
  says:
339
339
  enable: false
340
340
  home_mini: false
341
+ page: '/essay/'
341
342
  style: 1
342
343
  strip: 30
343
344
  # --------------------------- end ---------------------------
@@ -364,8 +365,8 @@ envelope:
364
365
  # --------------------------- end ---------------------------
365
366
 
366
367
  # --------------------------- start ---------------------------
367
- # This part of the content uses metingjs,
368
- # can only use NetEase Cloud Music, QQ Music and other music platforms supported by the mainland China region,
368
+ # This part of the content uses metingjs,
369
+ # can only use NetEase Cloud Music, QQ Music and other music platforms supported by the mainland China region,
369
370
  # the subsequent consideration of the use of JSON files to store music information and customize the implementation of the third-party API does not depend on the.
370
371
  # Music Page
371
372
  meting_api: "https://meting.qjqq.cn/?server=:server&type=:type&id=:id&auth=:auth&r=:r" # Custom API
@@ -385,7 +386,7 @@ capsule:
385
386
  # --------------------------- end ---------------------------
386
387
 
387
388
  # --------------------------- start ---------------------------
388
- # Quick Menu
389
+ # Quick Menu
389
390
  # Open with shift + ?
390
391
  keyboard:
391
392
  enable: false
@@ -527,7 +528,7 @@ comment:
527
528
  lazyload: false # Lazy load
528
529
  count: false # Whether to use the comment count
529
530
  pv: false # Whether to use the page view count
530
- avatar: https://cravatar.cn # Avatar
531
+ avatar: https://gravatar.com/avatar # Avatar
531
532
  hot_tip: # Hot comment tips
532
533
  enable: false
533
534
  count: 3 # Display when more than 3 comments
@@ -550,8 +551,8 @@ valine:
550
551
  style: true # Use custom styles when turned on
551
552
  option: # options list
552
553
  artalk:
553
- server: # server url
554
- site: # site name
554
+ server: # server url
555
+ site: # site name
555
556
  option: # options
556
557
  giscus:
557
558
  repo: # GitHub repository name
@@ -613,7 +614,7 @@ extends:
613
614
  # PWA
614
615
  pwa:
615
616
  enable: false
616
- manifest: /manifest.json # manifest.json
617
+ manifest: /manifest.json # manifest.json
617
618
  theme_color: "#006a73" # Theme color
618
619
  mask_icon: /img/pwa/favicon.png # Mask icon
619
620
  apple_touch_icon: /img/pwa/favicon.png # Apple touch icon
@@ -728,4 +729,4 @@ CDN:
728
729
  # swiper_js:
729
730
  # busuanzi_js:
730
731
  # snackbar_js:
731
- # --------------------------- end ---------------------------
732
+ # --------------------------- end ---------------------------
@@ -76,7 +76,7 @@ post:
76
76
  nav:
77
77
  next: Next
78
78
  prev: Previous
79
-
79
+
80
80
 
81
81
  nav:
82
82
  site_name_title: Back to home
@@ -110,7 +110,7 @@ aside:
110
110
  toc: Table of contents
111
111
  tagmore: View all
112
112
  avatar: Avatar
113
- hello: Long time no see,
113
+ hello: 'Long time no see, '
114
114
  back: Welcome back again,
115
115
  sticker: Mood sticker
116
116
  newpost: New posts
@@ -226,4 +226,9 @@ about:
226
226
 
227
227
  message:
228
228
  close: Hide message
229
- open: Show message
229
+ open: Show message
230
+
231
+ essay:
232
+ tip0: '- All expanded -'
233
+ tip1: '- Recent Exhibitions #{count} Short Articles -'
234
+ link: 'Link'
package/languages/en.yml CHANGED
@@ -76,7 +76,7 @@ post:
76
76
  nav:
77
77
  next: Next
78
78
  prev: Previous
79
-
79
+
80
80
 
81
81
  nav:
82
82
  site_name_title: Back to home
@@ -110,7 +110,7 @@ aside:
110
110
  toc: Table of contents
111
111
  tagmore: View all
112
112
  avatar: Avatar
113
- hello: Long time no see,
113
+ hello: 'Long time no see, '
114
114
  back: Welcome back again,
115
115
  sticker: Mood sticker
116
116
  newpost: New posts
@@ -226,4 +226,9 @@ about:
226
226
 
227
227
  message:
228
228
  close: Hide message
229
- open: Show message
229
+ open: Show message
230
+
231
+ essay:
232
+ tip0: '- All expanded -'
233
+ tip1: '- Recent Exhibitions #{count} Short Articles -'
234
+ link: 'Link'
@@ -163,9 +163,9 @@ link:
163
163
  banner:
164
164
  toComment: 申请友链
165
165
  random: 随机访问
166
- random: 点击前往按钮进入随机一个友链,不保证跳转网站的安全性和可用性。本次随机到的是本站友链:⌈ ${name} ⌋
166
+ random: 点击前往按钮进入随机一个友链,不保证跳转网站的安全性和可用性。本次随机到的是本站友链:⌈ ${name} ⌋
167
167
  to: 前往
168
-
168
+
169
169
  keyboard:
170
170
  title: 博客快捷键
171
171
 
@@ -226,4 +226,9 @@ about:
226
226
 
227
227
  message:
228
228
  close: 隐藏弹幕
229
- open: 显示弹幕
229
+ open: 显示弹幕
230
+
231
+ essay:
232
+ tip0: '- 已展开所有短文 -'
233
+ tip1: '- 只展示最近 #{count} 条短文 -'
234
+ link: '链接'
@@ -162,7 +162,7 @@ music:
162
162
  link:
163
163
  banner:
164
164
  toComment: 申請友鏈
165
- random: 點擊前往按鈕進入隨機一個友鏈,不保證跳轉網站的安全性和可用性。本次隨機到的是本站友鏈:⌈ ${name} ⌋
165
+ random: 點擊前往按鈕進入隨機一個友鏈,不保證跳轉網站的安全性和可用性。本次隨機到的是本站友鏈:⌈ ${name} ⌋
166
166
  to: 前往
167
167
  keyboard:
168
168
  title: 博客快捷鍵
@@ -223,5 +223,10 @@ about:
223
223
  tip2: 瞭解更多關於
224
224
 
225
225
  message:
226
- close: 隱藏彈幕
227
- open: 顯示彈幕
226
+ close: 隱藏彈幕
227
+ open: 顯示彈幕
228
+
229
+ essay:
230
+ tip0: '- 已展開所有短文 -'
231
+ tip1: '- 只展示最近 #{count} 條短文 -'
232
+ link: '連接'
@@ -16,12 +16,12 @@ div
16
16
  script(src=url_for(theme.cdn.waterfall))
17
17
  script(src=url_for(theme.cdn.pjax))
18
18
 
19
- if theme.mermaid
20
- script(src=url_for(theme.cdn.mermaid_js))
21
-
22
19
  if theme.post.share.enable && theme.post.share.list && theme.post.share.list.includes('qrcode')
23
20
  script(src=url_for(theme.cdn.qrcode))
24
21
 
22
+ if theme.mermaid
23
+ script(src=url_for(theme.cdn.mermaid_js))
24
+
25
25
  if theme.display_mode.universe
26
26
  script(src=url_for(theme.cdn.universe_js))
27
27
  script.
@@ -115,4 +115,4 @@ if theme.footer.randomlink
115
115
  include ../body/mode
116
116
 
117
117
  // google adsense
118
- include ../body/gadsense
118
+ include ../body/gadsense
@@ -5,7 +5,7 @@ link(rel="canonical" href=urlNoIndex())
5
5
  link(rel="stylesheet", href=url_for(theme.cdn.fontawesome))
6
6
 
7
7
  // aplayer
8
- if theme.capsule.enable || theme.music.enable
8
+ if theme.capsule.enable || theme.music.enable || theme.says.enable
9
9
  link(rel="stylesheet", href=url_for(theme.cdn.aplayer_css))
10
10
 
11
11
  // swiper
@@ -47,4 +47,4 @@ if theme.extends.head
47
47
  each item in theme.extends.head
48
48
  != item
49
49
 
50
- !=fragment_cache('injectHeadJs', function(){return inject_head_js()})
50
+ !=fragment_cache('injectHeadJs', function(){return inject_head_js()})
@@ -4,22 +4,34 @@ div(id="loading-box" onclick="preloader.endLoading();" style="zoom:1")
4
4
 
5
5
  script.
6
6
  const preloader = {
7
+ isLoaded: false,
7
8
  endLoading: () => {
8
- document.getElementById('loading-box').classList.toggle('loaded');
9
+ if (!preloader.isLoaded) {
10
+ document.getElementById('loading-box').classList.add('loaded');
11
+ preloader.isLoaded = true;
12
+ }
9
13
  },
10
14
  initLoading: () => {
11
15
  document.getElementById('loading-box').classList.remove('loaded');
16
+ preloader.isLoaded = false;
12
17
  },
13
18
  removePaceDone: () => {
14
19
  document.getElementById('body').classList = 'pace-done';
15
20
  }
16
21
  }
22
+
17
23
  window.addEventListener('load', () => {
18
24
  preloader.endLoading();
19
25
  });
26
+
20
27
  window.addEventListener('pjax:send', () => {
21
28
  preloader.initLoading();
22
29
  });
30
+
23
31
  document.addEventListener('pjax:complete', () => {
24
32
  preloader.endLoading();
25
- });
33
+ });
34
+
35
+ setTimeout(() => {
36
+ preloader.endLoading();
37
+ }, 5000);
@@ -41,18 +41,18 @@ if theme.says.enable
41
41
  i.solitude.fa-solid.fa-calendar-days
42
42
  time.datetime(datetime=moment(item.date).format())
43
43
  if item.location
44
- .bber-info-location
44
+ .bber-info-location
45
45
  i.solitude.fa-solid.fa-map
46
- | #{item.location}
46
+ = item.location
47
47
  if item.link
48
48
  a.bber-content-link(href=url_for(item.link) target="_blank")
49
49
  i.solitude.fa-solid.fa-link
50
- | 链接
50
+ = _p('essay.link')
51
51
  if item.content
52
52
  a.bber-reply(onclick=`sco.toTalk('${item.content}')`)
53
53
  i.solitude.fa-solid.fa-comment
54
54
  #bber-tips
55
55
  if theme.says.strip === -1
56
- | - 已展开所有短文 -
56
+ = _p('essay.tip0')
57
57
  else
58
- | - 只展示最近 #{theme.says.strip} 条短文 -
58
+ = _p('essay.tip1').replace('{count}', theme.says.strip)
@@ -1,6 +1,6 @@
1
1
  .bbTimeList.container#bbTimeList(class=is_home_first_page() ? '' : 'more-page')
2
- i.bber-logo.solitude.fa-solid.fa-newspaper(onclick=`pjax.loadUrl('/essay/')`)
3
- .swiper-container.swiper-no-swiping.swiper-container-initialized.swiper-container-vertical.swiper-container-pointer-events#bbtalk(tabindex="-1" onclick=`pjax.loadUrl('/essay/')`)
2
+ i.bber-logo.solitude.fa-solid.fa-newspaper(onclick=`pjax.loadUrl('${url_for(theme.says.page)}')`)
3
+ .swiper-container.swiper-no-swiping.swiper-container-initialized.swiper-container-vertical.swiper-container-pointer-events#bbtalk(tabindex="-1" onclick=`pjax.loadUrl('${url_for(theme.says.page)}')`)
4
4
  .swiper-wrapper#bber-talk
5
5
  each item, i in site.data.essay.essay_list.slice(0, 10)
6
6
  .li-style.swiper-slide
@@ -13,4 +13,4 @@
13
13
  i.solitude.fa-solid.fa-video
14
14
  else if item.link
15
15
  i.solitude.fa-solid.fa-link
16
- i.bber-gotobb.solitude.fa-solid.fa-circle-chevron-right(title=_p('home.bbtime.text') onclick=`pjax.loadUrl('/essay/')`)
16
+ i.bber-gotobb.solitude.fa-solid.fa-circle-chevron-right(title=_p('home.bbtime.text') onclick=`pjax.loadUrl('${url_for(theme.says.page)}')`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-solitude",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "description": "A beautiful, powerful, and efficient Hexo theme developed by EverFu.",
5
5
  "main": "package.json",
6
6
  "scripts": {
@@ -19,8 +19,8 @@
19
19
  "url": "https://github.com/everfu/hexo-theme-solitude"
20
20
  },
21
21
  "dependencies": {
22
- "hexo-renderer-stylus": "^3.0.0",
23
- "hexo-renderer-pug": "^3.0.0"
22
+ "hexo-renderer-pug": "^3.0.0",
23
+ "hexo-renderer-stylus": "^3.0.0"
24
24
  },
25
25
  "bugs": {
26
26
  "url": "https://github.com/everfu/hexo-theme-solitude/issues",
@@ -28,5 +28,8 @@
28
28
  },
29
29
  "homepage": "https://everfu.github.io/Solitude/",
30
30
  "author": "Hexo-Theme-Solitude<o@everfu.org>",
31
- "license": "MIT"
32
- }
31
+ "license": "MIT",
32
+ "devDependencies": {
33
+ "@types/node": "^22.0.0"
34
+ }
35
+ }
@@ -158,10 +158,10 @@ hexo.extend.filter.register('before_generate', () => {
158
158
  },
159
159
  footer: {
160
160
  enable: true,
161
- desc: "来自 Efu 的文章",
161
+ desc: "The article from Solitude",
162
162
  button: {
163
163
  enable: true,
164
- name: '返回首页',
164
+ name: 'Learn More',
165
165
  url: '/'
166
166
  }
167
167
  }
@@ -310,7 +310,7 @@ hexo.extend.filter.register('before_generate', () => {
310
310
  commentBarrage: false,
311
311
  lazyload: false,
312
312
  count: false,
313
- avatar: 'https://cravatar.cn',
313
+ avatar: 'https://gravatar.com/avatar',
314
314
  hot_tip: {
315
315
  enable: true,
316
316
  count: 3
@@ -425,4 +425,4 @@ hexo.extend.filter.register('before_generate', () => {
425
425
  }
426
426
  }
427
427
  hexo.theme.config = Object.assign(defaultConfig, hexo.theme.config)
428
- }, 1)
428
+ }, 1)
@@ -1,7 +1,7 @@
1
1
  hexo.on('ready', () => {
2
2
  const {version} = require('../../package.json')
3
3
  hexo.log.info(`
4
- ===================================================================
4
+ =====================[ Hexo Theme - Solitude ]=====================
5
5
  ##### #### # ##### ###### # # ###### ######
6
6
  # # # # # # # # # # #
7
7
  ##### # # # # # # # # # ######
@@ -11,4 +11,4 @@ hexo.on('ready', () => {
11
11
  ===================================================================
12
12
  GitHub: https://github.com/everfu/hexo-theme-solitude
13
13
  `)
14
- })
14
+ })
@@ -22,4 +22,4 @@ hexo.extend.filter.register('stylus:renderer', function (style) {
22
22
  style.define('$prismjs_enable', prismjsEnable)
23
23
  style.define('$prismjs_line_number', prismjsLineNumber)
24
24
  style.define('$language', config.language)
25
- });
25
+ });
@@ -6,4 +6,4 @@ function postMermaid(args, content) {
6
6
  return `<div class="mermaid">${escapeHTML(content)}</div>`;
7
7
  }
8
8
 
9
- hexo.extend.tag.register('mermaid', postMermaid, {ends: true});
9
+ hexo.extend.tag.register('mermaid', postMermaid, {ends: true});
@@ -5,20 +5,18 @@
5
5
 
6
6
  'use strict'
7
7
 
8
- function postTabs (args, content) {
8
+ function postTabs ([name, active], content) {
9
9
  const tabBlock = /<!--\s*tab (.*?)\s*-->\n([\w\W\s\S]*?)<!--\s*endtab\s*-->/g
10
10
 
11
- args = args.join(' ').split(',')
12
- const tabName = args[0]
13
- const tabActive = Number(args[1]) || 0
14
-
15
11
  const matches = []
16
12
  let match
17
13
  let tabId = 0
18
14
  let tabNav = ''
19
15
  let tabContent = ''
20
16
 
21
- !tabName && hexo.log.warn('Tabs block must have unique name!')
17
+ if (typeof active === 'undefined') {
18
+ active = 0
19
+ }
22
20
 
23
21
  while ((match = tabBlock.exec(content)) !== null) {
24
22
  matches.push(match[1])
@@ -33,29 +31,27 @@ function postTabs (args, content) {
33
31
  let tabHref = ''
34
32
 
35
33
  postContent = hexo.render.renderSync({ text: postContent, engine: 'markdown' }).trim()
34
+ tabHref = (name + ' ' + tabId).toLowerCase().split(' ').join('-');
36
35
 
37
- tabId += 1
38
- tabHref = (tabName + ' ' + tabId).toLowerCase().split(' ').join('-');
39
-
40
- ((tabCaption.length === 0) && (tabIcon.length === 0)) && (tabCaption = tabName + ' ' + tabId)
36
+ ((tabCaption.length === 0) && (tabIcon.length === 0)) && (tabCaption = name + ' ' + tabId)
41
37
 
42
38
  const isOnlyicon = tabIcon.length > 0 && tabCaption.length === 0 ? ' style="text-align: center;"' : ''
43
39
  const icon = tabIcon.trim()
44
40
  tabIcon.length > 0 && (tabIcon = `<i ${isOnlyicon} class="tab solitude ${icon}"></i>`)
45
41
 
46
- const toTop = '<button type="button" class="tab-to-top" aria-label="scroll to top"><i class="solitude st-arrow-up-line"></i></button>'
47
-
48
- const isActive = (tabActive > 0 && tabActive === tabId) || (tabActive === 0 && tabId === 1) ? ' active' : ''
42
+ const toTop = '<button type="button" class="tab-to-top" aria-label="scroll to top"><i class="solitude fas fa-arrow-up"></i></button>'
43
+ const isActive = active === tabId ? ' active' : ''
49
44
  tabNav += `<li class="tab${isActive}"><button type="button" data-href="#${tabHref}">${tabIcon + tabCaption.trim()}</button></li>`
50
45
  tabContent += `<div class="tab-item-content${isActive}" id="${tabHref}">${postContent + toTop}</div>`
46
+ tabId += 1
51
47
  }
52
48
 
53
49
  tabNav = `<ul class="nav-tabs">${tabNav}</ul>`
54
50
  tabContent = `<div class="tab-contents">${tabContent}</div>`
55
51
 
56
- return `<div class="tabs" id="${tabName.toLowerCase().split(' ').join('-')}">${tabNav + tabContent}</div>`
52
+ return `<div class="tabs" id="${name.toLowerCase().split(' ').join('-')}">${tabNav + tabContent}</div>`
57
53
  }
58
54
 
59
55
  hexo.extend.tag.register('tabs', postTabs, { ends: true })
60
56
  hexo.extend.tag.register('subtabs', postTabs, { ends: true })
61
- hexo.extend.tag.register('subsubtabs', postTabs, { ends: true })
57
+ hexo.extend.tag.register('subsubtabs', postTabs, { ends: true })
@@ -1,9 +1,11 @@
1
1
  #twikoo
2
2
  .tk-submit
3
3
  margin-top 0
4
+
4
5
  .tk-admin-config-group-title
5
6
  margin-top 0
6
7
  line-height normal
8
+
7
9
  .tk-row
8
10
  .tk-col
9
11
  flex-direction column-reverse !important
@@ -227,8 +229,8 @@
227
229
 
228
230
  .tk-comments-container
229
231
  > .tk-comment
230
- margin-top 0!important
231
- margin-bottom 0.5rem!important
232
+ margin-top 0 !important
233
+ margin-bottom 0.5rem !important
232
234
  background var(--efu-card-bg)
233
235
  transition .3s
234
236
  border-radius 12px
@@ -335,53 +337,15 @@ img.tk-avatar-img
335
337
  .el-input--small
336
338
  .el-input__inner
337
339
  padding 8px
340
+
338
341
  .el-input__inner, .el-textarea__inner
339
- border-radius 12px
342
+ border-radius 12px
340
343
 
341
344
  .el-input.el-input--small.el-input-group.el-input-group--prepend
342
345
  border-radius 12px
343
346
  background var(--efu-secondbg)
344
347
  border var(--style-border-always)
345
348
 
346
- .el-input.el-input--small.el-input-group.el-input-group--prepend:nth-child(1):before
347
- content '输入QQ号会自动获取昵称和头像'
348
-
349
- .el-input.el-input--small.el-input-group.el-input-group--prepend:nth-child(2):before
350
- content '收到回复将会发送到你的邮箱'
351
-
352
- .el-input.el-input--small.el-input-group.el-input-group--prepend:nth-child(3):before
353
- content '可以通过昵称访问你的网站'
354
-
355
- .el-input.el-input--small.el-input-group.el-input-group--prepend:focus-within::before
356
- display block
357
- animation commonTipsIn .3s
358
-
359
- .el-input.el-input--small.el-input-group.el-input-group--prepend:focus-within::after
360
- display block
361
- animation commonTriangleIn .3s
362
-
363
- .el-input.el-input--small.el-input-group.el-input-group--prepend::before
364
- display none
365
- position absolute
366
- top -60px
367
- white-space nowrap
368
- border-radius 10px
369
- left 50%
370
- transform translate(-50%)
371
- padding 14px 18px
372
- background #444
373
- color #fff
374
- z-index 100
375
-
376
- .el-input.el-input--small.el-input-group.el-input-group--prepend::after
377
- display none
378
- content ''
379
- position absolute
380
- border 12px solid transparent
381
- border-top-color #444
382
- left 50%
383
- transform translate(-50%, -46px)
384
-
385
349
  .el-input-group__append, .el-input-group__prepend
386
350
  background-color var(--efu-card-bg) !important
387
351
  color var(--efu-fontcolor) !important
@@ -449,6 +413,7 @@ button.el-button.tk-cancel.el-button--default.el-button--small
449
413
  &.OwO-open
450
414
  .OwO-body
451
415
  animation .3s ease .1s 1 normal both running donate_effcet
416
+
452
417
  .OwO-body
453
418
  z-index 102
454
419
  width 500px
@@ -479,10 +444,6 @@ button.el-button.tk-cancel.el-button--default.el-button--small
479
444
  box-shadow var(--efu-shadow-lightblack) !important
480
445
  border-radius 8px
481
446
 
482
- #twikoo > div.tk-comments > div.tk-submit > div.tk-row.actions > div > div.tk-action-icon.OwO.OwO-open > div.OwO-body > div > ul > li > span
483
- line-height 48px
484
- font-size 28px
485
-
486
447
  .OwO-packages
487
448
  background var(--efu-background)
488
449
  padding-left 8px !important
@@ -502,15 +463,3 @@ button.el-button.tk-cancel.el-button--default.el-button--small
502
463
  .OwO-packages
503
464
  li
504
465
  line-height 45px !important
505
-
506
- .tk-replies
507
- .tk-content
508
- margin-top 0 !important
509
-
510
- .el-input-group--prepend
511
- .el-input__inner, .el-input-group__append
512
- border-left-width 0 !important
513
-
514
- .el-textarea .el-input__count
515
- color var(--efu-secondtext) !important
516
- user-select none
@@ -358,7 +358,7 @@ b, strong
358
358
  position relative
359
359
 
360
360
  i.solitude
361
- font-size 16px
361
+ font-size 20px
362
362
  line-height 1
363
363
  font-synthesis style
364
364