hexo-theme-volantis 5.7.7 → 5.7.9

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [5.7.9](https://github.com/volantis-x/hexo-theme-volantis/compare/5.7.8...5.7.9) (2023-04-26)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * 修复移动端web菜单栏无法收缩;特性:浏览器滚动条复杂样式从配置文件传入 ([#877](https://github.com/volantis-x/hexo-theme-volantis/issues/877)) ([91288f9](https://github.com/volantis-x/hexo-theme-volantis/commit/91288f916dee43baadac9750a39de6d3933a6737))
9
+
10
+ ## [5.7.8](https://github.com/volantis-x/hexo-theme-volantis/compare/5.7.7...5.7.8) (2023-04-01)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **LeancloudCounter:** 修复 leancloud 配置特定 appId 值导致 custom_api_server 不生效问题 ([#861](https://github.com/volantis-x/hexo-theme-volantis/issues/861)) ([90e470d](https://github.com/volantis-x/hexo-theme-volantis/commit/90e470d8e2e0125f468acc81820ef7addc91f723))
16
+
3
17
  ## [5.7.7](https://github.com/volantis-x/hexo-theme-volantis/compare/v5.7.6...5.7.7) (2022-11-24)
4
18
 
5
19
 
package/_config.yml CHANGED
@@ -1219,6 +1219,8 @@ custom_css:
1219
1219
  scrollbar:
1220
1220
  size: 4px
1221
1221
  border: 2px
1222
+ background: rgb(84,181,160) linear-gradient(45deg, rgba(255, 255, 255, 0.4) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.4) 75%, transparent 75%, transparent)
1223
+ hover_background: rgb(84,181,160) linear-gradient(45deg, rgba(255, 255, 255, 0.4) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.4) 75%, transparent 75%, transparent)
1222
1224
  navbar:
1223
1225
  height: 64px
1224
1226
  width: auto # auto, max
@@ -185,7 +185,7 @@
185
185
  },
186
186
 
187
187
  refreshCounter() {
188
- var api_server = this.app_id.slice(-9) !== '-MdYXbMMI' ? this.custom_api_server : `https://${ this.app_id.slice(0, 8).toLowerCase() }.api.lncldglobal.com`;
188
+ var api_server = this.custom_api_server || `https://${ this.app_id.slice(0, 8).toLowerCase() }.api.lncldglobal.com`;
189
189
  if (api_server) {
190
190
  this.fetchData(api_server);
191
191
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-volantis",
3
- "version": "5.7.7",
3
+ "version": "5.7.9",
4
4
  "description": "Elegant and powerful theme for Hexo.",
5
5
  "main": "package.json",
6
6
  "scripts": {
@@ -37,7 +37,7 @@ html
37
37
  font-size: $fontsize-root
38
38
  >
39
39
  if hexo-config('custom_css.scrollbar.size')
40
- scrollbar(convert(hexo-config('custom_css.scrollbar.size')), convert(hexo-config('custom_css.scrollbar.border')) || 0px)
40
+ scrollbar(convert(hexo-config('custom_css.scrollbar.size')), convert(hexo-config('custom_css.scrollbar.border')) || 0px, convert(hexo-config('custom_css.scrollbar.background')), convert(hexo-config('custom_css.scrollbar.hover_background')))
41
41
 
42
42
  body
43
43
  background-color: var(--color-site-body)
package/source/js/app.js CHANGED
@@ -291,23 +291,41 @@ const VolantisApp = (() => {
291
291
  volantis.dom.$(e).click(function (e) {
292
292
  e.stopPropagation();
293
293
  // 关闭已经展开的子菜单
294
- e.currentTarget.parentElement.childNodes.forEach(function (e) {
295
- if (Object.prototype.toString.call(e) == '[object HTMLLIElement]') {
296
- e.childNodes.forEach(function (e) {
297
- if (Object.prototype.toString.call(e) == '[object HTMLUListElement]') {
298
- volantis.dom.$(e).hide()
299
- }
300
- })
301
- }
302
- })
294
+ // e.currentTarget.parentElement.childNodes.forEach(function (e) {
295
+ // if (Object.prototype.toString.call(e) == '[object HTMLLIElement]') {
296
+ // e.childNodes.forEach(function (e) {
297
+ // if (Object.prototype.toString.call(e) == '[object HTMLUListElement]') {
298
+ // volantis.dom.$(e).hide()
299
+ // }
300
+ // })
301
+ // }
302
+ // })
303
303
  // 点击展开子菜单
304
+ /*
305
+ jasonhuang: 这里出现两个错误
306
+ 第一个: 本来以上代码下拉菜单再次点击又被隐藏了,下面的代码又把它打开了。当第一次点击.s-menu fa-solid fa-bars fa-fw这个元素时,下拉菜单要打开。再点的时候应该把下拉菜单关闭,不应该再执行以下代码.需要先判断
307
+ ul.menu-phone list-v navigation white-box打开没有。但是不能凭借style.display是否为none不严谨, 应该是window.getComputedStyle
308
+ 这一题,如果是用jquery,寻找e.currentTarget也就是被点击的li标签, 其中的子元素.menu-phone很简单$(e.currentTarget).children('.menu-phone')
309
+ 直接找e.currentTarget的子元素中类名为menu-phone的(找className或classList),判断他是否处于打开的状态。那这里不一定有jquery,只能原生
310
+
311
+ 其实上面那串代码用不到了,直接判断是否打开,取反就好了,应该和 下面写一起,否则也太混乱了
312
+ 第二个:volantis.dom.$(element).display这种设置样式是无效的,class,id可以这么用,但是这是样式。得volantis.dom.$(element).style.display
313
+ 我看了volantis.dom.$(element)返回的dom对象,而jquery(element)返回的是jquery对象。这是不一样的
314
+ 我看了下结构, volantis.dom.$(element)和element引用是一样的,区别是增加了show,hide,click, toggleClass等方法
315
+ */
304
316
  let array = e.currentTarget.children
305
317
  for (let index = 0; index < array.length; index++) {
306
318
  const element = array[index];
307
319
  if (volantis.dom.$(element).title === 'menu') { // 移动端菜单栏异常
308
- volantis.dom.$(element).display = "flex" // https://github.com/volantis-x/hexo-theme-volantis/issues/706
320
+ volantis.dom.$(element).style.display = "flex" // https://github.com/volantis-x/hexo-theme-volantis/issues/706
309
321
  } else {
310
- volantis.dom.$(element).show()
322
+ // 判断.menu-phone元素style.display是否为none
323
+ let is_hiding = window.getComputedStyle(element).display === 'none'
324
+ if(is_hiding) {
325
+ volantis.dom.$(element).show()
326
+ } else {
327
+ volantis.dom.$(element).hide()
328
+ }
311
329
  }
312
330
  }
313
331
  }, 0);