hexo-theme-shokax 0.0.6 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +6 -4
- package/layout/category.pug +1 -0
- package/layout/page.pug +1 -1
- package/package.json +1 -1
- package/source/js/_app/library.js +9 -21
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 | https://d-sketon.top/ |
|
package/layout/category.pug
CHANGED
package/layout/page.pug
CHANGED
@@ -27,7 +27,6 @@ block header
|
|
27
27
|
!= __('title.not_found')
|
28
28
|
else
|
29
29
|
!= page.title
|
30
|
-
!= "|"
|
31
30
|
|
32
31
|
block content
|
33
32
|
if page.type === 'categories'
|
@@ -37,6 +36,7 @@ block content
|
|
37
36
|
!= __('menu.home')
|
38
37
|
small
|
39
38
|
!= _p('counter.categories', site.categories.length)
|
39
|
+
!= _list_categories(3)
|
40
40
|
else if page.type === 'tags'
|
41
41
|
div(class="collapse wrap")
|
42
42
|
h2(class="item title")
|
package/package.json
CHANGED
@@ -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
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
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
|
-
|
313
|
-
complete && complete();
|
300
|
+
};
|
301
|
+
anime(opt);
|
314
302
|
};
|