hexo-theme-solitude 1.11.2 → 1.11.3

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.
package/README.md CHANGED
@@ -15,6 +15,7 @@
15
15
  ![license](https://img.shields.io/github/license/valor-x/hexo-theme-solitude?color=FF5531)
16
16
  [![Stars](https://img.shields.io/github/stars/valor-x/hexo-theme-solitude)](https://github.com/valor-x/hexo-theme-solitude/stargazers)
17
17
  [![NPM all downloads](https://img.shields.io/npm/dy/hexo-theme-solitude?color=white)](https://www.npmjs.com/package/hexo-theme-solitude)
18
+ [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fvalor-x%2Fhexo-theme-solitude.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fvalor-x%2Fhexo-theme-solitude?ref=badge_shield)
18
19
 
19
20
  ![hexo version](https://img.shields.io/badge/hexo-7.0.0+-blue?logo=hexo&logoColor=white)
20
21
  ![node version](https://img.shields.io/badge/node-14.0.0-white?logo=node.js&logoColor=white)
@@ -88,3 +89,5 @@
88
89
  ## 版权
89
90
 
90
91
  [MIT](./LICENSE) License © 2023-至今 [EverFu](https://github.com/efuo)
92
+
93
+ [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fvalor-x%2Fhexo-theme-solitude.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fvalor-x%2Fhexo-theme-solitude?ref=badge_large)
@@ -4,6 +4,7 @@ random: Random
4
4
  upload: 'datetime: '
5
5
  totalk: You don't need to delete blank lines, just type in your comments.
6
6
  loading: Loading...
7
+ day: ' days'
7
8
 
8
9
  theme:
9
10
  dark: Dark
@@ -71,7 +72,7 @@ nav:
71
72
 
72
73
  award:
73
74
  thanks: Thanks
74
- tipping: Tipping
75
+ tipping: Sponsor
75
76
  title: List of appreciation
76
77
 
77
78
  search:
package/languages/en.yml CHANGED
@@ -4,6 +4,7 @@ random: Random
4
4
  upload: 'datetime: '
5
5
  totalk: You don't need to delete blank lines, just type in your comments.
6
6
  loading: Loading...
7
+ day: ' days'
7
8
 
8
9
  theme:
9
10
  dark: Dark
@@ -71,7 +72,7 @@ nav:
71
72
 
72
73
  award:
73
74
  thanks: Thanks
74
- tipping: Tipping
75
+ tipping: Sponsor
75
76
  title: List of appreciation
76
77
 
77
78
  search:
@@ -4,6 +4,7 @@ random: 随便逛逛
4
4
  upload: 发布时间:
5
5
  totalk: 无需删除空行,直接输入评论即可
6
6
  loading: 加载中...
7
+ day: ' 天'
7
8
 
8
9
  # Language: 简体中文
9
10
  theme:
@@ -4,6 +4,7 @@ random: 随便逛逛
4
4
  upload: 發佈時間:
5
5
  totalk: 無需刪除空行,直接輸入評論即可
6
6
  loading: 加載中...
7
+ day: ' 天'
7
8
 
8
9
  # Language: 繁體中文 (台灣)
9
10
  theme:
@@ -73,6 +73,7 @@
73
73
  min: _p('time.min'),
74
74
  month: _p('time.month')
75
75
  },
76
+ day: _p('day'),
76
77
  f12: _p('f12'),
77
78
  totalk: _p('totalk')
78
79
  }
@@ -27,7 +27,7 @@ include ../head/pwa.pug
27
27
 
28
28
  script.
29
29
  console.log(
30
- "%c Program: Hexo %c Theme: Solitude %c Version: v1.11.2",
30
+ "%c Program: Hexo %c Theme: Solitude %c Version: v1.11.3",
31
31
  "border-radius:5px 0 0 5px;padding: 5px 10px;color:white;background:#ff3842;",
32
32
  "padding: 5px 10px;color:white;background:#3e9f50;",
33
33
  "padding: 5px 10px;color:white;background:#0084ff;border-radius:0 5px 5px 0",
@@ -23,8 +23,8 @@ script.
23
23
  })
24
24
  const $content = comment.getRender().$content
25
25
  GLOBAL_CONFIG.lightbox && utils.lightbox($content.querySelectorAll('img:not([atk-emoticon])'))
26
- sco.owoBig({body: '.atk-grp', item: '.atk-item'})
27
26
  })
27
+ sco.owoBig({body: '.atk-grp', item: '.atk-item'})
28
28
  !{commentBarrage} && barrageArtalk(array)
29
29
  })
30
30
  const destroyArtalk = () => artalkItem.destroy()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-solitude",
3
- "version": "1.11.2",
3
+ "version": "1.11.3",
4
4
  "description": "A beautiful, powerful, and efficient Hexo theme developed by EverFu.",
5
5
  "main": "package.json",
6
6
  "scripts": {
@@ -49,7 +49,7 @@
49
49
  position relative
50
50
  overflow hidden
51
51
  margin-top .5rem
52
- padding 1rem 1.2rem
52
+ padding .5rem .7rem
53
53
 
54
54
  &:hover
55
55
  box-shadow var(--efu-shadow-border)
@@ -56,7 +56,6 @@
56
56
  margin-right .5rem
57
57
  width 40%
58
58
  height 100%
59
- min-width fit-content
60
59
 
61
60
  +maxWidth1300()
62
61
  display none
@@ -133,6 +133,10 @@
133
133
  color var(--efu-fontcolor)
134
134
  caret-color var(--efu-theme)
135
135
 
136
+ ::placeholder
137
+ color var(--efu-gray)
138
+ opacity .5
139
+
136
140
  #search-mask
137
141
  position fixed
138
142
  inset 0
package/source/js/main.js CHANGED
@@ -329,7 +329,7 @@ let sco = {
329
329
  */
330
330
  addRuntime: function () {
331
331
  let el = document.getElementById('runtimeshow')
332
- el && GLOBAL_CONFIG.runtime && (el.innerText = utils.timeDiff(new Date(GLOBAL_CONFIG.runtime), new Date()) + GLOBAL_CONFIG.lang.time.day)
332
+ el && GLOBAL_CONFIG.runtime && (el.innerText = utils.timeDiff(new Date(GLOBAL_CONFIG.runtime), new Date()) + GLOBAL_CONFIG.lang.day)
333
333
  },
334
334
  /**
335
335
  * toTalk
@@ -775,17 +775,20 @@ class tabs {
775
775
  }
776
776
 
777
777
  static clickFnOfTabs() {
778
- document.querySelectorAll('#article-container .tab > button').forEach(item => {
779
- item.addEventListener('click', e => {
780
- const $tabItem = e.target.parentNode
778
+ document.querySelectorAll('#article-container .tab > button').forEach(function (item) {
779
+ item.addEventListener('click', function (e) {
780
+ const that = this
781
+ const $tabItem = that.parentNode
781
782
  if (!$tabItem.classList.contains('active')) {
782
783
  const $tabContent = $tabItem.parentNode.nextElementSibling
783
- const $siblings = $tabItem.parentNode.querySelector('.active')
784
+ const $siblings = utils.siblings($tabItem, '.active')[0]
784
785
  $siblings && $siblings.classList.remove('active')
785
786
  $tabItem.classList.add('active')
786
- const tabId = e.target.getAttribute('data-href').replace('#', '')
787
- Array.from($tabContent.children).forEach(item => {
788
- item.id === tabId ? item.classList.add('active') : item.classList.remove('active')
787
+ const tabId = that.getAttribute('data-href').replace('#', '')
788
+ const childList = [...$tabContent.children]
789
+ childList.forEach(item => {
790
+ if (item.id === tabId) item.classList.add('active')
791
+ else item.classList.remove('active')
789
792
  })
790
793
  }
791
794
  })
@@ -793,14 +796,14 @@ class tabs {
793
796
  }
794
797
 
795
798
  static backToTop() {
796
- document.querySelectorAll('#article-container .tabs .tab-to-top').forEach(item => {
797
- item.addEventListener('click', () => {
798
- utils.scrollToDest(utils.getEleTop(item.closest('.tabs')), 300)
799
+ document.querySelectorAll('#article-container .tabs .tab-to-top').forEach(function (item) {
800
+ item.addEventListener('click', function () {
801
+ utils.scrollToDest(utils.getEleTop(item.parentElement.parentElement.parentNode), 300)
802
+
799
803
  })
800
804
  })
801
805
  }
802
806
  }
803
-
804
807
  // 页面刷新
805
808
  window.refreshFn = () => {
806
809
  const {is_home, is_page, page, is_post} = PAGE_CONFIG;
@@ -59,6 +59,14 @@
59
59
  }
60
60
  return actualTop;
61
61
  },
62
+ siblings: (ele, selector) => {
63
+ return [...ele.parentNode.children].filter((child) => {
64
+ if (selector) {
65
+ return child !== ele && child.matches(selector)
66
+ }
67
+ return child !== ele
68
+ })
69
+ },
62
70
  randomNum: (length) => {
63
71
  return Math.floor(Math.random() * length)
64
72
  },