hexo-theme-shokax 0.4.0-alpha.4 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -1,6 +1,5 @@
1
1
  # 📣 公告
2
- [关于ShokaX markdown扩展特性的讨论](https://github.com/theme-shoka-x/hexo-theme-shokaX/discussions/177) \
3
- [关于删除部分评论系统的讨论](https://github.com/theme-shoka-x/hexo-theme-shokaX/discussions/175)
2
+ [关于 ShokaX 部署平台和 Astro 迁移的调查](https://github.com/theme-shoka-x/hexo-theme-shokaX/discussions/229)
4
3
 
5
4
  # hexo-theme-shokaX
6
5
  ![LICENSE]( https://img.shields.io/github/license/theme-shoka-x/hexo-theme-shokaX)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-shokax",
3
- "version": "0.4.0-alpha.4",
3
+ "version": "0.4.0",
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",
@@ -19,17 +19,17 @@
19
19
  "@types/quicklink": "^2.3.4",
20
20
  "@typescript-eslint/eslint-plugin": "^6.20.0",
21
21
  "@typescript-eslint/parser": "^6.20.0",
22
- "@waline/client": "3.0.0-alpha.11",
23
22
  "eslint": "^8.56.0",
24
23
  "eslint-config-standard": "~17",
25
24
  "eslint-plugin-import": "^2.29.1",
26
25
  "eslint-plugin-n": "^16.6.2",
27
26
  "eslint-plugin-promise": "^6.1.1",
28
27
  "eslint-plugin-vue": "^9.20.1",
29
- "typescript": "^5.3.3",
30
- "vue": "^3.4.15"
28
+ "typescript": "^5.3.3"
31
29
  },
32
30
  "dependencies": {
31
+ "@waline/client": "3.0.0-alpha.11",
32
+ "vue": "^3.4.15",
33
33
  "@algolia/client-search": "^4.22.1",
34
34
  "algoliasearch": "4.22.1",
35
35
  "esbuild": "^0.20.0",
@@ -44,7 +44,11 @@
44
44
  "theme-shokax-anime": "^0.0.6",
45
45
  "theme-shokax-pjax": "^0.0.3",
46
46
  "twikoo": "^1.6.31",
47
- "unlazy": "^0.10.4"
47
+ "unlazy": "^0.10.4",
48
+ "hexo-lightning-minify": "latest",
49
+ "hexo-algoliasearch": "latest",
50
+ "hexo-feed": "latest",
51
+ "hexo-renderer-pug": "latest"
48
52
  },
49
53
  "engines": {
50
54
  "node": ">=18.0.0"
@@ -100,7 +100,7 @@ hexo.extend.generator.register('script', function (locals) {
100
100
  target: ['es2022'],
101
101
  minify: true,
102
102
  legalComments: 'linked',
103
- mainFields: ['module', 'main'],
103
+ mainFields: ['module', 'browser', 'main'],
104
104
  splitting: true,
105
105
  define: {
106
106
  __UNLAZY_LOGGING__: 'false',
@@ -44,12 +44,17 @@
44
44
  overflow: hidden;
45
45
 
46
46
  .inner {
47
+ margin-top: 2.5rem;
47
48
  overflow-x: hidden;
48
49
  overflow-y: auto;
49
50
  -webkit-overflow-scrolling: touch;
50
51
  width: auto;
51
52
  height: 100%;
52
53
 
54
+ +tablet-mobile() {
55
+ margin-top: 0;
56
+ }
57
+
53
58
  &::-webkit-scrollbar {
54
59
  display: none;
55
60
  }
@@ -3,9 +3,6 @@ import { init, pageviewCount, RecentComments } from '@waline/client'
3
3
 
4
4
  import { createApp } from 'vue'
5
5
 
6
- // await import('@waline/client/style')
7
- // fixme 处理样式引入问题
8
-
9
6
  export const walineComment = function () {
10
7
  init({
11
8
  el: '#comments',
@@ -16,6 +16,7 @@ import { pagePosition, positionInit } from '../globals/tools'
16
16
  import { menuActive, sideBarTab, sidebarTOC } from '../components/sidebar'
17
17
  import { Loader, isOutime } from '../globals/thirdparty'
18
18
  import { tabFormat } from '../page/tab'
19
+ import { lazyLoad } from 'unlazy'
19
20
 
20
21
  export const pjaxReload = () => {
21
22
  pagePosition()
@@ -41,7 +42,6 @@ export const siteRefresh = (reload) => {
41
42
  vendorCss('mermaid')
42
43
 
43
44
  // 懒加载背景图
44
- console.log('lazyBg')
45
45
  const lazyBg = new IntersectionObserver(function (entries, observer) {
46
46
  entries.forEach(entry => {
47
47
  if (entry.isIntersecting) {
@@ -102,6 +102,8 @@ export const siteRefresh = (reload) => {
102
102
  comment.observe($dom('#copyright'))
103
103
  }
104
104
 
105
+ lazyLoad()
106
+
105
107
  if (__shokax_waline__) {
106
108
  import('../components/comments').then(async ({ walinePageview, walineRecentComments }) => {
107
109
  await walineRecentComments()
@@ -121,7 +123,7 @@ export const siteRefresh = (reload) => {
121
123
  if (__shokax_player__) {
122
124
  toolPlayer.player.load(LOCAL.audio || CONFIG.audio || {})
123
125
  }
124
- Loader.hide()
126
+ Loader.hide(500)
125
127
 
126
128
  setTimeout(() => {
127
129
  positionInit()
@@ -129,7 +131,7 @@ export const siteRefresh = (reload) => {
129
131
 
130
132
  cardActive()
131
133
 
132
- if (__shokax_outime__) {
134
+ if (__shokax_outime__ && LOCAL.ispost) {
133
135
  isOutime()
134
136
  }
135
137
  }
@@ -7,7 +7,6 @@ import { resizeHandle, scrollHandle, visibilityListener } from '../globals/handl
7
7
  import { pagePosition } from '../globals/tools'
8
8
  import Pjax from 'theme-shokax-pjax'
9
9
  import { initVue } from '../library/vue'
10
- import { lazyLoad } from 'unlazy'
11
10
  import { $dom } from '../library/dom'
12
11
  import { createChild } from '../library/proto'
13
12
  import { transition } from '../library/anime'
@@ -72,7 +71,6 @@ const siteInit = () => {
72
71
  firework.default(CONFIG.fireworks)
73
72
  })
74
73
  }
75
- lazyLoad()
76
74
 
77
75
  window.addEventListener('scroll', scrollHandle, {
78
76
  passive: true