Skip to content

Commit

Permalink
chore: 0.4.3
Browse files Browse the repository at this point in the history
fix: page 无 comment
  • Loading branch information
zkz098 committed Jun 24, 2024
1 parent 9c0e875 commit dc46e60
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 76 deletions.
30 changes: 0 additions & 30 deletions .eslintrc.cjs

This file was deleted.

55 changes: 55 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
export default [
{
files: ['*.ts', '*.tsx', '*.vue'],
languageOptions: {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2022
}
},
plugins: {
'@typescript-eslint': await import('@typescript-eslint/eslint-plugin'),
'vue': await import('eslint-plugin-vue')
},
rules: {
camelcase: 'off',
'n/no-callback-literal': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'prefer-const': 'off'
}
},
{
files: ['*.js', '*.jsx'],
languageOptions: {
ecmaVersion: 2022
},
env: {
browser: true,
commonjs: true,
es6: true,
node: true
},
extends: [
'standard'
],
rules: {
camelcase: 'off',
'n/no-callback-literal': 'off',
'prefer-const': 'off'
}
},
{
files: ['*.vue'],
languageOptions: {
parserOptions: {
ecmaVersion: 2022
}
},
extends: [
'plugin:vue/vue3-recommended'
]
}
];
51 changes: 32 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
{
"name": "hexo-theme-shokax",
"version": "0.4.2",
"version": "0.4.3",
"description": "a hexo theme based on shoka",
"main": "index.js",
"repository": "https://github.com/theme-shoka-x/hexo-theme-shokaX",
"author": "zkz098",
"license": "AGPL-3.0-or-later",
"packageManager": "pnpm@8.14.1",
"packageManager": "pnpm@9.4.0",
"scripts": {
"test": "tsc --build --verbose",
"build": "cd ./scripts && tsc --build --verbose"
},
"devDependencies": {
"@types/fancybox": "^3.5.6",
"@types/jquery": "^3.5.29",
"@types/fancybox": "^3.5.7",
"@types/jquery": "^3.5.30",
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.11.10",
"@types/node": "^20.14.8",
"@types/quicklink": "^2.3.4",
"@typescript-eslint/eslint-plugin": "^7.0.1",
"@typescript-eslint/parser": "^7.0.2",
"@typescript-eslint/eslint-plugin": "^7.13.1",
"@typescript-eslint/parser": "^7.13.1",
"eslint": "^9.5.0",
"eslint-config-standard": "~17",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^17.9.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-vue": "^9.20.1",
"typescript": "^5.3.3"
"eslint-plugin-promise": "^6.2.0",
"eslint-plugin-vue": "^9.26.0",
"typescript": "^5.5.2"
},
"dependencies": {
"@waline/client": "^3.1.2",
"vue": "^3.4.15",
"@algolia/client-search": "^4.22.1",
"@waline/client": "^3.2.2",
"vue": "^3.4.30",
"@algolia/client-search": "^4.23.3",
"algoliasearch": "4.23.3",
"esbuild": "^0.21.5",
"hexo": "7.2.0",
"hexo-fs": "^4.1.1",
"hexo-fs": "^4.1.3",
"hexo-pagination": "^3.0.0",
"hexo-util": "^3.2.0",
"instantsearch.js": "^4.64.2",
"hexo-util": "^3.3.0",
"instantsearch.js": "^4.72.1",
"js-yaml": "^4.1.0",
"mouse-firework": "^0.0.5",
"quicklink": "^2.3.0",
"theme-shokax-anime": "^0.0.6",
"theme-shokax-pjax": "^0.0.3",
"twikoo": "^1.6.31",
"unlazy": "^0.11.1",
"twikoo": "^1.6.36",
"unlazy": "^0.11.3",
"hexo-lightning-minify": "latest",
"hexo-algoliasearch": "latest",
"hexo-feed": "latest",
Expand All @@ -53,5 +53,18 @@
"engines": {
"node": ">=18.0.0"
},
"engineStrict": true
"engineStrict": true,
"pnpm": {
"overrides": {
"array-includes": "npm:@nolyfill/array-includes@latest",
"array.prototype.findlastindex": "npm:@nolyfill/array.prototype.findlastindex@latest",
"array.prototype.flat": "npm:@nolyfill/array.prototype.flat@latest",
"array.prototype.flatmap": "npm:@nolyfill/array.prototype.flatmap@latest",
"hasown": "npm:@nolyfill/hasown@latest",
"is-regex": "npm:@nolyfill/is-regex@latest",
"object.fromentries": "npm:@nolyfill/object.fromentries@latest",
"object.groupby": "npm:@nolyfill/object.groupby@latest",
"object.values": "npm:@nolyfill/object.values@latest"
}
}
}
4 changes: 2 additions & 2 deletions scripts/plugin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ hexo.on('generateBefore', () => {

hexo.on('generateAfter', () => {
// 检查版本更新
fetch('https://registry.npmmirror.com/hexo-theme-shokax').then((res) => {
fetch('https://api.shokax.top/version/hexo').then((res) => {
res.json().then((resp) => {
try {
const latest = resp['dist-tags'].latest
const latest = resp['version']
const current = version.split('.')
let isOutdated = false
for (let i = 0; i < Math.max(latest.length, current.length); i++) {
Expand Down
48 changes: 23 additions & 25 deletions source/js/_app/pjax/refresh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,35 +72,33 @@ export const siteRefresh = (reload) => {
sideBarTab()
sidebarTOC()

if (LOCAL.ispost) {
import('../page/post').then(({ postBeauty }) => {
postBeauty()
})
import('../page/post').then(({ postBeauty }) => {
postBeauty()
})

const comment = new IntersectionObserver((entries) => {
entries.forEach((entry) => {
if (entry.isIntersecting) {
if (__shokax_waline__) {
import('../components/comments').then(({ walinePageview, walineComment }) => {
walinePageview()
walineComment()
})
}
if (__shokax_twikoo__) {
import('../components/tcomments').then(({ twikooComment }) => {
twikooComment()
})
}
comment.disconnect()
const comment = new IntersectionObserver((entries) => {
entries.forEach((entry) => {
if (entry.isIntersecting) {
if (__shokax_waline__) {
import('../components/comments').then(({ walinePageview, walineComment }) => {
walinePageview()
walineComment()
})
}
})
}, {
root: null,
threshold: 0.2
if (__shokax_twikoo__) {
import('../components/tcomments').then(({ twikooComment }) => {
twikooComment()
})
}
comment.disconnect()
}
})
}, {
root: null,
threshold: 0.2
})

comment.observe($dom('#copyright'))
}
comment.observe($dom('#copyright'))

lazyLoad()

Expand Down
1 change: 1 addition & 0 deletions source/js/_app/pjax/siteInit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const siteInit = () => {
})

// Handle and trigger popup window
// search 只有一个,不需要 each
$dom.each('.search', (element) => {
element.addEventListener('click', () => {
document.body.style.overflow = 'hidden'
Expand Down

0 comments on commit dc46e60

Please sign in to comment.