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

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/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-beta.1",
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",
@@ -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