hexo-theme-shokax 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
package/UsageRestrictions.md
CHANGED
@@ -18,4 +18,6 @@
|
|
18
18
|
- 发出警告通知并要求立即纠正违规行为;(根据`AGPLv3 八`)
|
19
19
|
- 暂停或终止您对 ShokaX 及其子项目的使用权限并取消GPLv3授予您的权利;(根据`AGPLv3 八`)
|
20
20
|
- 取消您获取 ShokaX 社区支持和进行协作的权利;(社区管理)
|
21
|
-
- 追究法律责任,包括要求赔偿因违规行为给 ShokaX 项目组造成的损失。(依照相关法律而定)
|
21
|
+
- 追究法律责任,包括要求赔偿因违规行为给 ShokaX 项目组造成的损失。(依照相关法律而定)
|
22
|
+
|
23
|
+
当发生纠纷时,全部由甲方(即zkz098)所在地负责,适用中华人民共和国法律。
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "hexo-theme-shokax",
|
3
|
-
"version": "0.3.
|
3
|
+
"version": "0.3.4",
|
4
4
|
"description": "a hexo theme based on shoka",
|
5
5
|
"main": "index.js",
|
6
6
|
"repository": "https://github.com/theme-shoka-x/hexo-theme-shokaX",
|
@@ -38,7 +38,7 @@
|
|
38
38
|
"jsdom": "^22.1.0"
|
39
39
|
},
|
40
40
|
"dependencies": {
|
41
|
-
"esbuild": "^0.
|
41
|
+
"esbuild": "^0.19.2",
|
42
42
|
"js-yaml": "^4.1.0",
|
43
43
|
"lozad": "^1.16.0",
|
44
44
|
"theme-shokax-anime": "^0.0.4",
|
@@ -1,52 +1,56 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.initVue = void 0;
|
3
4
|
const storage_1 = require("./storage");
|
4
5
|
const anime_1 = require("./anime");
|
5
6
|
const dom_1 = require("./dom");
|
6
7
|
const globalVars_1 = require("../globals/globalVars");
|
7
8
|
const themeColor_1 = require("../globals/themeColor");
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
const hideNeko = () => {
|
21
|
-
(0, anime_1.transition)(neko, {
|
22
|
-
delay: 2500,
|
23
|
-
opacity: 0
|
24
|
-
}, () => {
|
25
|
-
globalVars_1.BODY.removeChild(neko);
|
9
|
+
function initVue() {
|
10
|
+
Vue.createApp({
|
11
|
+
data() {
|
12
|
+
return {};
|
13
|
+
},
|
14
|
+
methods: {
|
15
|
+
changeThemeByBtn() {
|
16
|
+
let c;
|
17
|
+
const btn = (0, dom_1.$dom)('.theme').child('.ic');
|
18
|
+
const neko = globalVars_1.BODY.createChild('div', {
|
19
|
+
id: 'neko',
|
20
|
+
innerHTML: '<div class="planet"><div class="sun"></div><div class="moon"></div></div><div class="body"><div class="face"><section class="eyes left"><span class="pupil"></span></section><section class="eyes right"><span class="pupil"></span></section><span class="nose"></span></div></div>'
|
26
21
|
});
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
};
|
35
|
-
}
|
36
|
-
else {
|
37
|
-
neko.addClass('dark');
|
38
|
-
c = () => {
|
39
|
-
neko.removeClass('dark');
|
40
|
-
(0, themeColor_1.changeTheme)();
|
41
|
-
storage_1.$storage.set('theme', 'light');
|
42
|
-
hideNeko();
|
22
|
+
const hideNeko = () => {
|
23
|
+
(0, anime_1.transition)(neko, {
|
24
|
+
delay: 2500,
|
25
|
+
opacity: 0
|
26
|
+
}, () => {
|
27
|
+
globalVars_1.BODY.removeChild(neko);
|
28
|
+
});
|
43
29
|
};
|
30
|
+
if (btn.hasClass('i-sun')) {
|
31
|
+
c = () => {
|
32
|
+
neko.addClass('dark');
|
33
|
+
(0, themeColor_1.changeTheme)('dark');
|
34
|
+
storage_1.$storage.set('theme', 'dark');
|
35
|
+
hideNeko();
|
36
|
+
};
|
37
|
+
}
|
38
|
+
else {
|
39
|
+
neko.addClass('dark');
|
40
|
+
c = () => {
|
41
|
+
neko.removeClass('dark');
|
42
|
+
(0, themeColor_1.changeTheme)();
|
43
|
+
storage_1.$storage.set('theme', 'light');
|
44
|
+
hideNeko();
|
45
|
+
};
|
46
|
+
}
|
47
|
+
(0, anime_1.transition)(neko, 1, () => {
|
48
|
+
setTimeout(c, 210);
|
49
|
+
}, () => {
|
50
|
+
neko.display('block');
|
51
|
+
});
|
44
52
|
}
|
45
|
-
(0, anime_1.transition)(neko, 1, () => {
|
46
|
-
setTimeout(c, 210);
|
47
|
-
}, () => {
|
48
|
-
neko.display('block');
|
49
|
-
});
|
50
53
|
}
|
51
|
-
}
|
52
|
-
}
|
54
|
+
}).mount('#rightNav');
|
55
|
+
}
|
56
|
+
exports.initVue = initVue;
|
@@ -13,9 +13,11 @@ const handles_1 = require("../globals/handles");
|
|
13
13
|
const tools_1 = require("../globals/tools");
|
14
14
|
const fireworks_1 = require("../fireworks");
|
15
15
|
const theme_shokax_pjax_1 = __importDefault(require("theme-shokax-pjax"));
|
16
|
+
const vue_1 = require("../library/vue");
|
16
17
|
const siteInit = () => {
|
17
18
|
(0, scriptPjax_1.cloudflareInit)();
|
18
19
|
(0, domInit_1.default)();
|
20
|
+
(0, vue_1.initVue)();
|
19
21
|
(0, globalVars_1.setPjax)(new theme_shokax_pjax_1.default({
|
20
22
|
selectors: [
|
21
23
|
'head title',
|