hexo-theme-shokax 0.1.3 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- package/_config.yml +9 -6
- package/languages/zh-CN.yml +0 -1
- package/layout/_partials/layout.pug +2 -2
- package/package.json +1 -1
- package/scripts/generaters/script.js +2 -1
- package/scripts/helpers/engine.js +2 -0
- package/scripts/helpers/symbols_count_time.js +1 -1
- package/source/js/_app/page.js +3 -1
package/_config.yml
CHANGED
@@ -23,23 +23,26 @@ pwa:
|
|
23
23
|
experiments:
|
24
24
|
noPlayer: false # 禁用音乐播放器
|
25
25
|
gradient: false # 使用CSS渐变作为文章封面
|
26
|
-
|
26
|
+
fixedCover: "" # 主页面cover(为空则使用bing随机图片)
|
27
27
|
debug: false # 使用debug模式启动
|
28
28
|
disableThemeComment: false # 禁用主题评论系统(一般用于关闭评论或让插件接管评论系统)
|
29
|
+
usingRelative: false # _image.yml 使用相对路径
|
29
30
|
|
30
31
|
playerAPI: "https://api.injahow.cn" # 结尾不带/,只填写域名
|
31
32
|
# 如果条件允许,请参考 https://github.com/injahow/meting-api 自建API
|
32
|
-
#
|
33
|
+
# 使用vercel自行部署,请参考: https://github.com/xizeyoupan/Meting-API
|
34
|
+
|
35
|
+
disableVL: false # 禁用可见度监听
|
33
36
|
|
34
37
|
icon:
|
35
38
|
favicon: "/favicon.ico"
|
36
39
|
apple_touch_icon: "/apple-touch-icon.png"
|
37
40
|
|
38
41
|
seo:
|
39
|
-
bing:
|
40
|
-
google:
|
41
|
-
yandex:
|
42
|
-
baidu:
|
42
|
+
bing:
|
43
|
+
google:
|
44
|
+
yandex:
|
45
|
+
baidu:
|
43
46
|
|
44
47
|
visitor:
|
45
48
|
clarity: false
|
package/languages/zh-CN.yml
CHANGED
@@ -31,9 +31,9 @@ html(lang=page.language?page.language:config.language, style=theme.grayMode ? 'f
|
|
31
31
|
|
32
32
|
!= partial('_partials/header.pug', {}, {cache: true})
|
33
33
|
div(id="imgs" class="pjax")
|
34
|
-
if theme.experiments.gradient
|
34
|
+
if theme.experiments.gradient || theme.experiments.fixedCover
|
35
35
|
//- cover不可用时用Bing随机图片代替
|
36
|
-
- var coverImage = theme
|
36
|
+
- var coverImage = theme.experiments.fixedCover || "https://7ed.net/bing/api"
|
37
37
|
img(src=coverImage)
|
38
38
|
else
|
39
39
|
- var covers = _cover(page, 6)
|
package/package.json
CHANGED
@@ -43,7 +43,8 @@ hexo.extend.generator.register('script', function (locals) {
|
|
43
43
|
timeout: theme.quicklink.timeout,
|
44
44
|
priority: theme.quicklink.priority
|
45
45
|
},
|
46
|
-
playerAPI: theme.playerAPI
|
46
|
+
playerAPI: theme.playerAPI,
|
47
|
+
disableVL: theme.disableVL
|
47
48
|
}
|
48
49
|
|
49
50
|
if (config?.algolia) {
|
@@ -26,6 +26,8 @@ const randomBG = function (count = 1, image_server = null, image_list = []) {
|
|
26
26
|
const parseImage = function (img, size) {
|
27
27
|
if (img.startsWith('//') || img.startsWith('http')) {
|
28
28
|
return img
|
29
|
+
} else if (hexo.theme.config.experiments?.usingRelative) { // support relative url
|
30
|
+
return img
|
29
31
|
} else {
|
30
32
|
console.warn("sinaimg blocked all request from outside website,so don't use this format")
|
31
33
|
return `https://tva${randomServer}.sinaimg.cn/` + size + '/' + img
|
package/source/js/_app/page.js
CHANGED
@@ -606,7 +606,9 @@ const siteInit = function () {
|
|
606
606
|
CONFIG.quicklink.ignores = LOCAL.ignores;
|
607
607
|
quicklink.listen(CONFIG.quicklink);
|
608
608
|
autoDarkmode();
|
609
|
-
|
609
|
+
if (!CONFIG.disableVL) {
|
610
|
+
visibilityListener();
|
611
|
+
}
|
610
612
|
themeColorListener();
|
611
613
|
algoliaSearch(pjax);
|
612
614
|
window.addEventListener('scroll', scrollHandle);
|