hexo-theme-shokax 0.5.0-dev-31f9f21 → 0.5.0-dev-e34ffd2

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/_config.yml CHANGED
@@ -387,6 +387,14 @@ vendors:
387
387
  source: cdnjs
388
388
  url: KaTeX/0.16.9/contrib/copy-tex.min.js
389
389
  sri: "sha384-ww/583aHhxWkz5DEVn6OKtNiIaLi2iBRNZXfJRiY1Ai7tnJ9UXpEsyvOITVpTl4A"
390
+ fancybox:
391
+ source: cdnjs
392
+ url: fancybox/3.5.7/jquery.fancybox.min.js
393
+ sri: "sha384-Zm+UU4tdcfAm29vg+MTbfu//q5B/lInMbMCr4T8c9rQFyOv6PlfQYpB5wItcXWe7"
394
+ justifiedGallery:
395
+ source: cdnjs
396
+ url: justifiedGallery/3.8.1/js/jquery.justifiedGallery.min.js
397
+ sri: "sha384-TOxsBplaL96/QDWPIUg+ye3v89qSE3s22XNtJMmCeZEep3cVDmXy1zEfZvVv+y2m"
390
398
  css:
391
399
  katex:
392
400
  source: cdnjs
@@ -48,6 +48,7 @@ if fontConfig
48
48
  // 临时处理
49
49
  link(rel="stylesheet" media="none" onload="this.media='all'" href="https://s4.zstatic.net/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.css")
50
50
  link(rel="stylesheet" media="none" onload="this.media='all'" href="https://s4.zstatic.net/ajax/libs/justifiedGallery/3.8.1/css/justifiedGallery.min.css")
51
+ link(rel="stylesheet" media="none" onload="this.media='all'" href="https://s4.zstatic.net/ajax/libs/KaTeX/0.16.9/katex.min.css")
51
52
  //link(rel="stylesheet" media="none" onload="this.media='all'" href="https://s4.zstatic.net/ajax/libs/KaTeX/0.16.9/katex.min.css")
52
53
  != _css('mermaid.css')
53
54
  if theme.experiments.cloudflarePatch
@@ -2,10 +2,6 @@ include ../_mixin/breadcrumb.pug
2
2
  include ../_mixin/sidebar.pug
3
3
  include ../_mixin/widgets.pug
4
4
 
5
- - ignores = []
6
- if (theme.quicklink.ignores)
7
- - ignores.push(theme.quicklink.ignores)
8
-
9
5
  - var covers = _cover_index(page, 6)
10
6
  - var enableFixedCover = theme.homeConfig?.fixedCover
11
7
  - var enablePreload = theme.experiments?.coverConfig?.enablePreload
@@ -120,12 +116,7 @@ html(lang=page.language?page.language:config.language, style=theme.grayMode ? 'f
120
116
  essay: `#{__('quiz.essay')}`,
121
117
  gap_fill: `#{__('quiz.gap_fill')}`,
122
118
  mistake: `#{__('quiz.mistake')}`
123
- },
124
- ignores: [
125
- (uri) => uri.includes('#'),
126
- (uri) => new RegExp(LOCAL.path + '$').test(uri),
127
- !{JSON.stringify(ignores)}
128
- ]
119
+ }
129
120
  };
130
121
 
131
122
  != partial('_partials/third-party/baidu-analytics.pug', {}, {cache: true})
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-shokax",
3
- "version": "0.5.0-dev-31f9f21",
3
+ "version": "0.5.0-dev-e34ffd2",
4
4
  "description": "a hexo theme based on shoka",
5
5
  "main": "index.js",
6
6
  "repository": "https://github.com/theme-shoka-x/hexo-theme-shokaX",
@@ -42,7 +42,6 @@
42
42
  "js-yaml": "^4.1.0",
43
43
  "katex": "^0.16.11",
44
44
  "mouse-firework": "^0.0.6",
45
- "quicklink": "^2.3.0",
46
45
  "theme-shokax-anime": "^0.0.7",
47
46
  "twikoo": "^1.6.39",
48
47
  "unlazy": "^0.11.3"
@@ -59,10 +59,6 @@ hexo.extend.generator.register("script", function(locals) {
59
59
  enable: theme.outime.enable,
60
60
  days: theme.outime.days
61
61
  },
62
- quicklink: {
63
- timeout: theme.quicklink.timeout,
64
- priority: theme.quicklink.priority
65
- },
66
62
  playerAPI: theme.playerAPI,
67
63
  experiments: {
68
64
  copyrightLength: theme.experiments.copyrightLength
@@ -109,11 +109,6 @@ interface configType {
109
109
  region: string
110
110
  }
111
111
  walinePageView: boolean
112
- quicklink: {
113
- ignores: any
114
- timeout: number
115
- priority: boolean
116
- }
117
112
  playerAPI: string
118
113
  experiments: {
119
114
  copyrightLength: number;
@@ -1,9 +1,7 @@
1
1
  import { cardActive } from '../page/common'
2
2
  import { resizeHandle } from '../globals/handles'
3
3
  import {
4
- CONFIG,
5
4
  setLocalHash, setLocalUrl, setOriginTitle,
6
- toolPlayer
7
5
  } from '../globals/globalVars'
8
6
  import { positionInit } from '../globals/tools'
9
7
  import { menuActive, sideBarTab, sidebarTOC } from '../components/sidebar'
@@ -16,7 +14,7 @@ export const siteRefresh = async (reload) => {
16
14
  setLocalUrl(window.location.href)
17
15
 
18
16
  // @ts-ignore
19
- await import('katex/dist/katex.min.css')
17
+ // await import('katex/dist/katex.min.css')
20
18
  await import('katex/dist/contrib/copy-tex.mjs')
21
19
 
22
20
  // 懒加载背景图
@@ -95,10 +93,15 @@ export const siteRefresh = async (reload) => {
95
93
  tabFormat()
96
94
  }
97
95
 
98
- if (__shokax_player__) {
99
- toolPlayer.player.load(LOCAL.audio || CONFIG.audio || {})
96
+ // if (__shokax_player__) {
97
+ // toolPlayer.player.load(LOCAL.audio || CONFIG.audio || {})
98
+ // }
99
+ if (sessionStorage.getItem('loaded') === 'true') {
100
+ Loader.hide(30)
101
+ } else {
102
+ sessionStorage.setItem('loaded', 'true')
103
+ Loader.hide(500)
100
104
  }
101
- Loader.hide(100)
102
105
 
103
106
  setTimeout(() => {
104
107
  positionInit()
@@ -14,11 +14,6 @@ const siteInit = async () => {
14
14
  initVue()
15
15
  domInit()
16
16
 
17
- CONFIG.quicklink.ignores = LOCAL.ignores
18
- import('quicklink').then(({listen}) => {
19
- listen(CONFIG.quicklink)
20
- })
21
-
22
17
  autoDarkmode()
23
18
 
24
19
  if (__shokax_VL__) {
@@ -70,18 +65,11 @@ const siteInit = async () => {
70
65
  passive: true
71
66
  })
72
67
 
73
- // window.addEventListener('pjax:send', pjaxReload, {
74
- // passive: true
75
- // })
76
-
77
- // window.addEventListener('pjax:success', siteRefresh, {
78
- // passive: true
79
- // }) // 默认会传入一个event参数
80
-
81
- window.addEventListener('beforeunload', () => {
68
+ window.addEventListener('visibilitychange', () => {
82
69
  pagePosition()
83
70
  })
84
71
  await siteRefresh(1)
72
+ // TODO 修复内页跳转后重复出现加载动画的问题
85
73
  }
86
74
 
87
75
  cloudflareInit()