hexo-theme-shokax
Advanced tools
Comparing version 0.3.6 to 0.3.7
{ | ||
"name": "hexo-theme-shokax", | ||
"version": "0.3.6", | ||
"version": "0.3.7", | ||
"description": "a hexo theme based on shoka", | ||
@@ -10,34 +10,34 @@ "main": "index.js", | ||
"scripts": { | ||
"test": "mocha test --coverage", | ||
"test": "mocha test", | ||
"build": "pnpm install && tsc" | ||
}, | ||
"devDependencies": { | ||
"@types/chai": "^4.3.5", | ||
"@types/fancybox": "^3.5.3", | ||
"@types/hexo": "^3.8.8", | ||
"@types/jquery": "^3.5.17", | ||
"@types/js-yaml": "^4.0.5", | ||
"@types/lozad": "^1.16.1", | ||
"@types/mocha": "^10.0.1", | ||
"@types/node": "^20.5.6", | ||
"@typescript-eslint/eslint-plugin": "^6.4.1", | ||
"@typescript-eslint/parser": "^6.4.1", | ||
"chai": "^4.3.8", | ||
"eslint": "^8.47.0", | ||
"eslint-config-standard": "*", | ||
"@types/chai": "^4.3.11", | ||
"@types/fancybox": "^3.5.6", | ||
"@types/hexo": "^3.8.12", | ||
"@types/jquery": "^3.5.29", | ||
"@types/js-yaml": "^4.0.9", | ||
"@types/lozad": "^1.16.4", | ||
"@types/mocha": "^10.0.6", | ||
"@types/node": "^20.10.0", | ||
"@typescript-eslint/eslint-plugin": "^6.12.0", | ||
"@typescript-eslint/parser": "^6.12.0", | ||
"chai": "^4.3.10", | ||
"eslint": "^8.54.0", | ||
"eslint-config-standard": "~17", | ||
"eslint-plugin-chai-friendly": "^0.7.2", | ||
"eslint-plugin-import": "^2.28.1", | ||
"eslint-plugin-n": "^16.0.2", | ||
"eslint-plugin-import": "^2.29.0", | ||
"eslint-plugin-n": "^16.3.1", | ||
"eslint-plugin-promise": "^6.1.1", | ||
"eslint-plugin-vue": "^9.17.0", | ||
"eslint-plugin-vue": "^9.18.1", | ||
"hexo-fs": "^4.1.1", | ||
"hexo-util": "^3.1.0", | ||
"instantsearch.js": "^4.56.9", | ||
"instantsearch.js": "^4.60.0", | ||
"mocha": "^10.2.0", | ||
"typescript": "^5.2.2", | ||
"vue": "^3.3.4", | ||
"typescript": "^5.3.2", | ||
"vue": "^3.3.9", | ||
"jsdom": "^22.1.0" | ||
}, | ||
"dependencies": { | ||
"esbuild": "^0.19.2", | ||
"esbuild": "^0.19.7", | ||
"js-yaml": "^4.1.0", | ||
@@ -44,0 +44,0 @@ "lozad": "^1.16.0", |
@@ -40,7 +40,2 @@ # 📣 Announcement | ||
For the GitHub repository, it is recommended to download from the releases on the right side, with the following steps: | ||
- Click on the Latest version in Releases | ||
- Download `Source code(zip)` from Assets | ||
- Unzip to use as a theme | ||
## 📚 Sub-projects | ||
@@ -47,0 +42,0 @@ - [ShokaX docs](https://github.com/theme-shoka-x/shokaX-docs) ShokaX Theme Documentation (work in progress, contributions welcome!) |
@@ -1,4 +0,1 @@ | ||
# 📣 公告 | ||
* [ShokaX 正在寻找社区维护者](https://github.com/theme-shoka-x/hexo-theme-shokaX/discussions/137) | ||
# hexo-theme-shokaX | ||
@@ -47,7 +44,2 @@ ![LICENSE]( https://img.shields.io/github/license/theme-shoka-x/hexo-theme-shokaX) | ||
github仓库建议通过右边的 releases 下载,步骤为: | ||
- 点击 Releases 的 Latest 版本 | ||
- 下载 Assets 中的 `Source code(zip)` | ||
- 解压即可作为主题使用 | ||
## 📚子项目 | ||
@@ -54,0 +46,0 @@ - [ShokaX docs](https://github.com/theme-shoka-x/shokaX-docs) ShokaX 主题文档 (正在编写中,欢迎加入!) |
@@ -37,4 +37,10 @@ 'use strict'; | ||
else { | ||
hexo.theme.config.image_list = js_yaml_1.default.load(node_fs_1.default.readFileSync(path_1.default.join(__dirname, '../../_images.yml'))); | ||
hexo.theme.config.image_list = js_yaml_1.default.load(node_fs_1.default.readFileSync(path_1.default.join(__dirname, '../../_images.yml'), { encoding: 'utf-8' })); | ||
} | ||
if (node_fs_1.default.existsSync(path_1.default.join(__dirname, '../../_images_index.yml'))) { | ||
hexo.theme.config.index_images = js_yaml_1.default.load(node_fs_1.default.readFileSync(path_1.default.join(__dirname, '../../_images_index.yml'), { encoding: 'utf-8' })); | ||
} | ||
else { | ||
hexo.theme.config.index_images = []; | ||
} | ||
}); |
@@ -30,3 +30,2 @@ "use strict"; | ||
css: { | ||
valine: theme.css + '/comment.css', | ||
katex: theme.vendors.css.katex, | ||
@@ -50,5 +49,5 @@ mermaid: theme.css + '/mermaid.css', | ||
audio: undefined, | ||
fireworks: (theme.fireworks && theme.fireworks.enable) ? | ||
(theme.fireworks.color || ['rgba(255,182,185,.9)', 'rgba(250,227,217,.9)', 'rgba(187,222,214,.9)', 'rgba(138,198,209,.9)']) : | ||
undefined | ||
fireworks: (theme.fireworks && theme.fireworks.enable) | ||
? (theme.fireworks.color || ['rgba(255,182,185,.9)', 'rgba(250,227,217,.9)', 'rgba(187,222,214,.9)', 'rgba(138,198,209,.9)']) | ||
: undefined | ||
}; | ||
@@ -55,0 +54,0 @@ if (config?.algolia) { |
@@ -112,2 +112,14 @@ 'use strict'; | ||
}); | ||
hexo.extend.helper.register('_cover_index', function (item) { | ||
const { index_images, image_list, image_server } = hexo.theme.config; | ||
if (item.cover) { | ||
return this._image_url(item.cover, item.path); | ||
} | ||
else if (item.photos && item.photos.length > 0) { | ||
return this._image_url(item.photos[0], item.path); | ||
} | ||
else { | ||
return randomBG(1, image_server, index_images.length === 0 ? image_list : index_images); | ||
} | ||
}); | ||
hexo.extend.helper.register('_permapath', function (str) { | ||
@@ -114,0 +126,0 @@ const { permalink } = hexo.config; |
@@ -85,3 +85,3 @@ "use strict"; | ||
const opt = { | ||
targets: typeof offset === 'number' ? target.parentNode : document.scrollingElement, | ||
targets: typeof offset === 'number' && typeof target !== 'number' ? target.parentNode : document.scrollingElement, | ||
duration: 500, | ||
@@ -88,0 +88,0 @@ easing: 'easeInOutQuad', |
@@ -6,3 +6,2 @@ "use strict"; | ||
const globalVars_1 = require("../globals/globalVars"); | ||
const loadFile_1 = require("../library/loadFile"); | ||
function loadComments() { | ||
@@ -19,3 +18,2 @@ const element = (0, dom_1.$dom)('#comments'); | ||
const entry = entries[0]; | ||
(0, loadFile_1.vendorCss)('valine'); | ||
if (entry.isIntersecting || entry.intersectionRatio > 0) { | ||
@@ -22,0 +20,0 @@ (0, anime_1.transition)((0, dom_1.$dom)('#comments'), 'bounceUpIn'); |
@@ -23,2 +23,5 @@ # 使用限制 | ||
当发生纠纷时,全部由甲方(即zkz098)所在地负责,适用中华人民共和国法律。 | ||
当发生纠纷时,全部由甲方(即zkz098)所在地负责,适用中华人民共和国法律。 | ||
此文件及其后续更新适用于所有版本的 ShokaX,无论其发行版内携带哪种版本的此文件或不携带此文件,均以 Github main分支储存的最新版为准。 | ||
如果本文件内容与 Github main 分支最新版有冲突的,本文件冲突部分无效,按照 Github main 分支最新版执行 |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5797
575766
86
Updatedesbuild@^0.19.7