hexo-theme-shokax 0.5.0-dev-d82f54b → 0.5.0-dev-7ae8444

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-shokax",
3
- "version": "0.5.0-dev-d82f54b",
3
+ "version": "0.5.0-dev-7ae8444",
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",
@@ -24,6 +24,7 @@ export const siteRefresh = async (reload) => {
24
24
 
25
25
  // @ts-ignore
26
26
  // await import('katex/dist/katex.min.css')
27
+ await import('nyx-player/style')
27
28
  await import('katex/dist/contrib/copy-tex.mjs')
28
29
 
29
30
  // 懒加载背景图
@@ -8,6 +8,7 @@ import {pagePosition} from '../globals/tools'
8
8
  import {initVue} from '../library/vue'
9
9
  import {createChild} from '../library/proto'
10
10
  import {transition} from '../library/anime'
11
+ import { initAudioPlayer } from '../player'
11
12
 
12
13
  const siteInit = async () => {
13
14
  initVue()
@@ -69,6 +70,7 @@ const siteInit = async () => {
69
70
  }
70
71
 
71
72
  cloudflareInit()
73
+ await initAudioPlayer()
72
74
 
73
75
  if (__shokax_antiFakeWebsite__) {
74
76
  if (window.location.origin !== CONFIG.hostname && window.location.origin !== "http://localhost:4000") {
@@ -1,12 +1,14 @@
1
1
  import { initPlayer } from 'nyx-player'
2
2
  import { CONFIG } from './globals/globalVars'
3
3
 
4
- const urls = []
5
- CONFIG.audio.forEach((item) => {
6
- urls.push({
7
- name: item.title,
8
- url: item.list[0]
4
+ export const initAudioPlayer = async function () {
5
+ const urls = []
6
+ CONFIG.audio.forEach((item) => {
7
+ urls.push({
8
+ name: item.title,
9
+ url: item.list[0]
10
+ })
9
11
  })
10
- })
11
-
12
- initPlayer("#player","#showBtn", [])
12
+ console.log(urls)
13
+ initPlayer("#player","#showBtn", [])
14
+ }