hexo-theme-shokax 0.3.2 → 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,7 +1,12 @@
|
|
1
1
|
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
6
|
exports.setSiteSearch = exports.setToolBtn = exports.setShowContents = exports.setGoToComment = exports.setBackToTop = exports.setToolPlayer = exports.setOriginTitle = exports.setPjax = exports.setLocalUrl = exports.setLocalHash = exports.setTitleTime = exports.setDiffY = exports.setOWinWidth = exports.setOWinHeight = exports.setHeaderHight = exports.setHeaderHightInner = exports.setSiteNavHeight = exports.pjax = exports.LOCAL_URL = exports.LOCAL_HASH = exports.oWinWidth = exports.oWinHeight = exports.headerHight = exports.headerHightInner = exports.siteNavHeight = exports.siteSearch = exports.showContents = exports.goToComment = exports.backToTop = exports.toolPlayer = exports.toolBtn = exports.siteBrand = exports.sideBar = exports.quickBtn = exports.menuToggle = exports.siteHeader = exports.siteNav = exports.loadCat = exports.Container = exports.HTML = exports.BODY = exports.titleTime = exports.originTitle = exports.diffY = exports.scrollAction = exports.statics = void 0;
|
4
7
|
const dom_1 = require("../library/dom");
|
8
|
+
const proto_1 = __importDefault(require("../library/proto"));
|
9
|
+
(0, proto_1.default)();
|
5
10
|
exports.statics = CONFIG.statics.indexOf('//') > 0 ? CONFIG.statics : CONFIG.root;
|
6
11
|
exports.scrollAction = { x: 0, y: 0 };
|
7
12
|
exports.diffY = 0;
|
@@ -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;
|
@@ -1,16 +1,11 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
3
|
const sidebar_1 = require("../components/sidebar");
|
7
4
|
const globalVars_1 = require("../globals/globalVars");
|
8
5
|
const thirdparty_1 = require("../globals/thirdparty");
|
9
6
|
const dom_1 = require("../library/dom");
|
10
7
|
const player_1 = require("../player");
|
11
|
-
const proto_1 = __importDefault(require("../library/proto"));
|
12
8
|
function domInit() {
|
13
|
-
(0, proto_1.default)();
|
14
9
|
dom_1.$dom.each('.overview .menu > .item', (el) => {
|
15
10
|
globalVars_1.siteNav.child('.menu').appendChild(el.cloneNode(true));
|
16
11
|
});
|
@@ -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',
|