hexo-theme-shokax 0.2.0-rc6 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_config.yml +3 -6
- package/layout/_mixin/sidebar.pug +9 -5
- package/package.json +15 -12
- package/source/js/_app/fireworks.js +3 -0
- package/source/js/_app/global.js +0 -1
- package/source/js/_app/library.js +13 -13
package/_config.yml
CHANGED
@@ -132,17 +132,14 @@ iconfont: "1832207_igi8uaupcus"
|
|
132
132
|
menu:
|
133
133
|
home: / || home
|
134
134
|
about:
|
135
|
-
default: /
|
136
|
-
aboutsite: /about/
|
137
|
-
updata: /updata/ || cloud
|
135
|
+
default: / || user
|
136
|
+
aboutsite: /about/ || user
|
138
137
|
admiration: /admiration/ || coffee
|
139
|
-
privacy: /privacy/ || list-alt
|
140
138
|
posts:
|
141
139
|
default: / || feather
|
142
140
|
archives: /archives/ || list-alt
|
143
141
|
categories: /categories/ || th
|
144
142
|
tags: /tags/ || tags
|
145
|
-
statistics: /statistics/ || clock
|
146
143
|
friends: /friends/ || heart
|
147
144
|
|
148
145
|
# https://twikoo.js.org
|
@@ -236,7 +233,7 @@ widgets:
|
|
236
233
|
|
237
234
|
footer:
|
238
235
|
# Specify the date when the site was setup. If not defined, current year will be used.
|
239
|
-
since:
|
236
|
+
since: 2022
|
240
237
|
icon:
|
241
238
|
name: sakura rotate
|
242
239
|
# Change the color of icon, using Hex Code.
|
@@ -2,12 +2,17 @@ mixin sidebarRender(display_toc)
|
|
2
2
|
- var related = _category_posts(page)
|
3
3
|
if page && page.prev
|
4
4
|
- var prevlink = page?.prev_link
|
5
|
+
if !prevlink && is_home()
|
6
|
+
if page.prev === 1
|
7
|
+
- prevlink = '/'
|
8
|
+
else
|
9
|
+
- prevlink = `/page/${page.prev}/`
|
5
10
|
if is_page() || is_post()
|
6
|
-
- prevlink = page
|
11
|
+
- prevlink = page.prev.path
|
7
12
|
if page && page.next
|
8
13
|
- var nextlink = page?.next_link
|
9
14
|
if is_page() || is_post()
|
10
|
-
- nextlink = page
|
15
|
+
- nextlink = page.next.path
|
11
16
|
div(class="inner")
|
12
17
|
div(class="panels")
|
13
18
|
div(class="inner")
|
@@ -23,9 +28,8 @@ mixin sidebarRender(display_toc)
|
|
23
28
|
!= partial('_partials/sidebar/overview.pug', {}, {cache: true})
|
24
29
|
ul(id="quick")
|
25
30
|
li(class="prev pjax")
|
26
|
-
if
|
27
|
-
|
28
|
-
!= _url(prevlink, '<i class="ic i-chevron-left"></i>', {rel: 'prev', title: __('post.prev')})
|
31
|
+
if prevlink
|
32
|
+
!= _url(prevlink, '<i class="ic i-chevron-left"></i>', {rel: 'prev', title: __('post.prev')})
|
29
33
|
li(class="up")
|
30
34
|
i(class="ic i-arrow-up")
|
31
35
|
li(class="down")
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "hexo-theme-shokax",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.1",
|
4
4
|
"description": "a hexo theme based on shoka",
|
5
5
|
"main": "index.js",
|
6
6
|
"repository": "https://github.com/zkz098/hexo-theme-shokaX",
|
@@ -12,32 +12,35 @@
|
|
12
12
|
"docs:build": "vuepress build docs"
|
13
13
|
},
|
14
14
|
"devDependencies": {
|
15
|
-
"@algolia/client-search": "^4
|
15
|
+
"@algolia/client-search": "^4",
|
16
16
|
"@types/animejs": "^3.1.7",
|
17
17
|
"@types/fancybox": "^3.5.3",
|
18
18
|
"@types/hexo": "^3.8.8",
|
19
19
|
"@types/jquery": "^3.5.16",
|
20
20
|
"@types/js-yaml": "^4.0.5",
|
21
21
|
"@types/lozad": "^1.16.1",
|
22
|
-
"@types/node": "^18.
|
22
|
+
"@types/node": "^18.15.6",
|
23
23
|
"@types/shelljs": "^0.8.11",
|
24
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
25
|
-
"@typescript-eslint/parser": "^5.
|
26
|
-
"@vuepress/client": "2.0.0-beta.
|
24
|
+
"@typescript-eslint/eslint-plugin": "^5.56.0",
|
25
|
+
"@typescript-eslint/parser": "^5.56.0",
|
26
|
+
"@vuepress/client": "2.0.0-beta.61",
|
27
27
|
"@vuepress/plugin-docsearch": "2.0.0-beta.60",
|
28
|
-
"
|
28
|
+
"algoliasearch": "^4.16.0",
|
29
|
+
"eslint": "^8.36.0",
|
29
30
|
"eslint-config-standard": "^17.0.0",
|
30
31
|
"eslint-plugin-import": "^2.27.5",
|
31
32
|
"eslint-plugin-n": "^15.6.1",
|
32
33
|
"eslint-plugin-promise": "^6.1.1",
|
33
|
-
"eslint-plugin-vue": "^9.
|
34
|
-
"
|
34
|
+
"eslint-plugin-vue": "^9.10.0",
|
35
|
+
"instantsearch.js": "^4.53.0",
|
36
|
+
"pjax": "^0.2.8",
|
37
|
+
"typescript": "^5.0.2",
|
35
38
|
"vue": "^3.2.47",
|
36
|
-
"vuepress": "2.0.0-beta.
|
37
|
-
"vuepress-plugin-sitemap2": "2.0.0-beta.
|
39
|
+
"vuepress": "2.0.0-beta.61",
|
40
|
+
"vuepress-plugin-sitemap2": "2.0.0-beta.197"
|
38
41
|
},
|
39
42
|
"dependencies": {
|
40
43
|
"js-yaml": "^4.1.0",
|
41
|
-
"sass": "^1.
|
44
|
+
"sass": "^1.60.0"
|
42
45
|
}
|
43
46
|
}
|
package/source/js/_app/global.js
CHANGED
@@ -152,7 +152,6 @@ const resizeHandle = function (event) {
|
|
152
152
|
}
|
153
153
|
oWinHeight = window.innerHeight;
|
154
154
|
oWinWidth = window.innerWidth;
|
155
|
-
// sideBar.child('.panels').changeOrGetHeight(oWinHeight + 'px');
|
156
155
|
};
|
157
156
|
const scrollHandle = function (event) {
|
158
157
|
const winHeight = window.innerHeight;
|
@@ -262,30 +262,30 @@ const transition = (target, type, complete) => {
|
|
262
262
|
});
|
263
263
|
};
|
264
264
|
const pjaxScript = function (element) {
|
265
|
-
const
|
266
|
-
const
|
267
|
-
|
265
|
+
const { text, parentNode, id, className, type, src, dataset } = element;
|
266
|
+
const code = text || element.textContent || element.innerHTML || '';
|
267
|
+
parentNode.removeChild(element);
|
268
268
|
const script = document.createElement('script');
|
269
|
-
if (
|
270
|
-
script.id =
|
269
|
+
if (id) {
|
270
|
+
script.id = id;
|
271
271
|
}
|
272
|
-
if (
|
273
|
-
script.className =
|
272
|
+
if (className) {
|
273
|
+
script.className = className;
|
274
274
|
}
|
275
|
-
if (
|
276
|
-
script.type =
|
275
|
+
if (type) {
|
276
|
+
script.type = type;
|
277
277
|
}
|
278
|
-
if (
|
279
|
-
script.src =
|
278
|
+
if (src) {
|
279
|
+
script.src = src;
|
280
280
|
script.async = false;
|
281
281
|
}
|
282
|
-
if (
|
282
|
+
if (dataset.pjax !== undefined) {
|
283
283
|
script.dataset.pjax = '';
|
284
284
|
}
|
285
285
|
if (code !== '') {
|
286
286
|
script.appendChild(document.createTextNode(code));
|
287
287
|
}
|
288
|
-
|
288
|
+
parentNode.appendChild(script);
|
289
289
|
};
|
290
290
|
const pageScroll = function (target, offset, complete) {
|
291
291
|
const opt = {
|