hexo-theme-shokax 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -65,8 +65,10 @@ github仓库建议通过右边的 releases 下载,步骤为:
65
65
  | hexo-theme-shoka | amehime | 本项目的父主题 |
66
66
 
67
67
  ## 贡献者
68
- | 名称 | 站点 | 描述 |
69
- |:-----------|:---------------------------|:-----------------------|
70
- | Lavender | https://www.lavenderdh.cn/ | 提供了大量shoka主题的魔改 |
71
- | AdminZhang | https://www.a9-9.top/ | 为本项目提供了大量想法并进行了DEBUG工作 |
68
+ shokaX的贡献者包括以非代码形式进行贡献的开发者(例如社区教程、想法分享、DEBUG等)和以代码形式进行贡献的开发者
72
69
 
70
+ | 名称 | 站点 |
71
+ |:-----------|:---------------------------|
72
+ | Lavender | https://www.lavenderdh.cn/ |
73
+ | AdminZhang | https://www.a9-9.top/ |
74
+ | D-Sketon | http://d-sketon.top/ |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-shokax",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "a hexo theme based on shoka",
5
5
  "main": "index.js",
6
6
  "repository": "https://github.com/zkz098/hexo-theme-shokaX",
@@ -288,27 +288,15 @@ const pjaxScript = function (element) {
288
288
  }
289
289
  parent.appendChild(script);
290
290
  };
291
- const pageScroll = (target, offset, complete) => {
291
+ const pageScroll = function (target, offset, complete) {
292
292
  const opt = {
293
- left: 0,
294
- behavior: "smooth"
295
- };
296
- if (typeof target === "number") {
297
- opt.top = target;
298
- }
299
- else {
300
- if (typeof target === 'number') {
301
- opt.top = offset || target;
302
- }
303
- else {
304
- if (offset || target) {
305
- opt.top = target.top() + document.documentElement.scrollTop - siteNavHeight;
306
- }
307
- else {
308
- opt.top = 0;
309
- }
293
+ targets: typeof offset === 'number' ? target.parentNode : document.scrollingElement,
294
+ duration: 500,
295
+ easing: 'easeInOutQuad',
296
+ scrollTop: offset || (typeof target === 'number' ? target : (target ? target.top() + document.documentElement.scrollTop - siteNavHeight : 0)),
297
+ complete: function () {
298
+ complete && complete();
310
299
  }
311
- }
312
- scrollTo(opt);
313
- complete && complete();
300
+ };
301
+ anime(opt);
314
302
  };