hexo-theme-shokax
Advanced tools
Comparing version 0.0.3 to 0.0.4-alpha
@@ -28,2 +28,6 @@ # Contributing for hexo-theme-shokaX | ||
有关issues的说明: | ||
1. 如果您愿意开发某 issues 的提议功能或修复 bug,建议在对应 issue 下评论说明一下,避免闭门造车和重复造轮子的惨剧 | ||
2. 您应该在对应 PR 提交时绑定对应 issue,以便进行统计 | ||
## Github PR | ||
@@ -30,0 +34,0 @@ 此处为在使用 Github PR 提交时应注意的事: |
{ | ||
"name": "hexo-theme-shokax", | ||
"version": "0.0.3", | ||
"version": "0.0.4-alpha", | ||
"description": "a hexo theme based on shoka", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -12,6 +12,7 @@ # hexo-theme-shokaX | ||
二次开发与常见问题请看wiki \ | ||
`0.0.2-alpha2`开始,`lantern`和`qweather`已迁移为插件 \ | ||
插件系统已完工,食用方法见[awesome-shokaX](https://github.com/zkz098/awesome-shokaX) | ||
`0.0.2-alpha2`开始,`lantern`和`qweather`已迁移为插件 | ||
## 和shoka的区别 | ||
shokaX的社区资源导航和插件仓库为[awesome-shokaX](https://github.com/zkz098/awesome-shokaX) | ||
## 💬 和shoka的区别 | ||
原先shoka使用了javascript+Native+nunjucks的技术 \ | ||
@@ -22,3 +23,19 @@ 而shokaX则使用了typescript+Vue 3+Pug的技术搭配 \ | ||
## 如何安装? | ||
## ✨ 功能清单 | ||
| 功能名称 | 实现状态 | 功能名称 | 实现状态 | | ||
|:--------:|:----:|:------------:|:----:| | ||
| PWA支持 | ✅ | JSD拆分 | ✅ | | ||
| 注入API | ✅ | 社区插件系统 | ✅ | | ||
| 自定义字体 | ✅* | 自定义样式 | ✅* | | ||
| 多种评论系统支持 | ✅ | 用户行为分析支持 | ✅ | | ||
| 底部备案号 | ✅ | 自定义页尾 | ✅* | | ||
| CSS渐变封面 | ✅ | typescript支持 | ✅^ | | ||
备注: | ||
- *: 需要使用注入API实现 | ||
- ^: 仅page js部分,hexo script未实现 | ||
## 🔧 如何安装? | ||
建议使用[ShokaX-CLI](https://github.com/zkz098/shokaX-CLI) ,执行下列命令即可: | ||
@@ -32,2 +49,11 @@ ```bash | ||
releases及npm的版本号区别如下: | ||
- x.x.x-alpha版本是早期测试版,部分未经测试环境测试,不能保证正常运行 | ||
- x.x.x-beta(目前还没有)是测试版,可以保证正常生成,但可能存在bug | ||
- x.x.x是相对稳定的版本,基本上不存在严重BUG | ||
github仓库建议通过右边的 releases 下载,步骤为: | ||
- 点击 Releases 的 Latest 版本 | ||
- 下载 Assets 中的 `Source code(zip)` | ||
- 解压即可作为主题使用 | ||
# 许可证 | ||
@@ -34,0 +60,0 @@ 许可证: BSD-3-Clause \ |
@@ -46,8 +46,3 @@ const statics = CONFIG.statics.indexOf('//') > 0 ? CONFIG.statics : CONFIG.root; | ||
else { | ||
if (window.matchMedia('(prefers-color-scheme:dark)').matches) { | ||
changeTheme('dark'); | ||
} | ||
else { | ||
changeTheme(); | ||
} | ||
changeTheme(); | ||
} | ||
@@ -54,0 +49,0 @@ } |
@@ -152,3 +152,3 @@ const getDocHeight = () => $dom('main > .inner').offsetHeight; | ||
script.onload = function (_, isAbort) { | ||
if (isAbort || !script.readyState || /loaded|complete/.test(script.readyState)) { | ||
if (isAbort || !script.readyState) { | ||
console.log("abort!"); | ||
@@ -292,3 +292,3 @@ script.onload = null; | ||
}; | ||
const pageScroll = function (target, offset, complete) { | ||
const pageScrollOld = function (target, offset, complete) { | ||
const opt = { | ||
@@ -305,1 +305,25 @@ targets: typeof offset === 'number' ? target.parentNode : document.scrollingElement, | ||
}; | ||
const pageScroll = (target, offset, complete) => { | ||
const opt = { | ||
left: 0, | ||
behavior: "smooth" | ||
}; | ||
if (typeof target === "number") { | ||
opt.top = target; | ||
} | ||
else { | ||
if (typeof target === 'number') { | ||
opt.top = offset || target; | ||
} | ||
else { | ||
if (offset || target) { | ||
opt.top = target.top() + document.documentElement.scrollTop - siteNavHeight; | ||
} | ||
else { | ||
opt.top = 0; | ||
} | ||
} | ||
} | ||
scrollTo(opt); | ||
complete && complete(); | ||
}; |
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
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
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
513756
5157
73