hexo-theme-shokax 0.4.11 → 0.4.12

Sign up to get free protection for your applications and to get access to all the features.
package/_config.yml CHANGED
@@ -184,7 +184,6 @@ menu:
184
184
  # https://twikoo.js.org
185
185
  twikoo:
186
186
  enable: false
187
- link: "https://cdn.staticfile.org/twikoo/1.6.30/twikoo.all.min.js"
188
187
  mode: vercel # vercel或tencent
189
188
  envId: "https://example.com" # twikoo环境ID,vercel填地址
190
189
  region:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-shokax",
3
- "version": "0.4.11",
3
+ "version": "0.4.12",
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",
@@ -16,20 +16,20 @@
16
16
  "@types/jquery": "^3.5.30",
17
17
  "@types/js-yaml": "^4.0.9",
18
18
  "@types/katex": "^0.16.7",
19
- "@types/node": "^20.14.11",
19
+ "@types/node": "^22.5.5",
20
20
  "@types/quicklink": "^2.3.4",
21
- "@typescript-eslint/eslint-plugin": "^7.16.1",
22
- "@typescript-eslint/parser": "^7.16.1",
23
- "eslint": "^9.7.0",
21
+ "@typescript-eslint/eslint-plugin": "^8.6.0",
22
+ "@typescript-eslint/parser": "^8.6.0",
23
+ "eslint": "^9.11.0",
24
24
  "eslint-config-standard": "~17",
25
- "eslint-plugin-vue": "^9.27.0",
26
- "typescript": "^5.5.3"
25
+ "eslint-plugin-vue": "^9.28.0",
26
+ "typescript": "^5.6.2"
27
27
  },
28
28
  "dependencies": {
29
- "@algolia/client-search": "^4.24.0",
30
- "@waline/client": "^3.3.0",
31
- "algoliasearch": "4.24.0",
32
- "esbuild": "^0.23.0",
29
+ "@algolia/client-search": "^5.5.3",
30
+ "@waline/client": "^3.3.2",
31
+ "algoliasearch": "5.5.3",
32
+ "esbuild": "^0.23.1",
33
33
  "hexo": "^7.3.0",
34
34
  "hexo-algoliasearch": "^2.0.1",
35
35
  "hexo-feed": "^1.1.2",
@@ -37,16 +37,16 @@
37
37
  "hexo-pagination": "^4.0.0",
38
38
  "hexo-renderer-pug": "^3.0.0",
39
39
  "hexo-util": "^3.3.0",
40
- "instantsearch.js": "^4.73.2",
40
+ "instantsearch.js": "^4.74.1",
41
41
  "js-yaml": "^4.1.0",
42
42
  "katex": "^0.16.11",
43
43
  "mouse-firework": "^0.0.6",
44
44
  "quicklink": "^2.3.0",
45
45
  "theme-shokax-anime": "^0.0.7",
46
46
  "theme-shokax-pjax": "^0.0.3",
47
- "twikoo": "^1.6.38",
47
+ "twikoo": "^1.6.39",
48
48
  "unlazy": "^0.11.3",
49
- "vue": "^3.4.32"
49
+ "vue": "^3.5.7"
50
50
  },
51
51
  "engines": {
52
52
  "node": ">=18.0.0"
@@ -124,7 +124,7 @@ export const sidebarTOC = () => {
124
124
  while (!parent.matches('.contents')) {
125
125
  if (parent.matches('li')) {
126
126
  parent.addClass('active')
127
- const t = document.querySelector(decodeURIComponent(parent.querySelector('a.toc-link').getAttribute('href')))
127
+ const t = document.getElementById(decodeURIComponent(parent.querySelector('a.toc-link').getAttribute('href').replace('#', '')))
128
128
  if (t) {
129
129
  t.addClass('active')
130
130
  }
@@ -147,13 +147,13 @@ export const sidebarTOC = () => {
147
147
 
148
148
  sections = sections.map((element, index) => {
149
149
  const link = element.querySelector('a.toc-link')
150
- const anchor = document.querySelector(decodeURI(link.getAttribute('href')))
150
+ const anchor = document.getElementById(decodeURI(link.getAttribute('href').replace('#', '')))
151
151
  if (!anchor) return null
152
152
  const alink = anchor.querySelector('a.anchor')
153
153
 
154
154
  const anchorScroll = (event:MouseEvent) => {
155
155
  event.preventDefault()
156
- const target = document.querySelector(decodeURI((event.currentTarget as HTMLElement).getAttribute('href')))
156
+ const target = document.getElementById(decodeURI((event.currentTarget as HTMLElement).getAttribute('href').replace('#', '')))
157
157
 
158
158
  activeLock = index
159
159
  pageScroll((target as HTMLElement), null, () => {
@@ -476,7 +476,7 @@ export const mediaPlayer = (t, config?) => {
476
476
  fetch () {
477
477
  return new Promise<boolean>((resolve, reject) => {
478
478
  if (playlist.data.length > 0) {
479
- resolve(true)
479
+ resolve(false)
480
480
  } else {
481
481
  if (this.options.rawList) {
482
482
  const promises = []