hexo-theme-volantis 5.5.0 → 5.7.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/CHANGELOG.md +44 -0
- package/_config.yml +19 -19
- package/layout/_meta/counter.ejs +11 -1
- package/layout/_partial/scripts/index.ejs +1 -1
- package/layout/_plugins/analytics/script.ejs +9 -1
- package/layout/_plugins/comments/artalk/script.ejs +6 -6
- package/layout/_plugins/comments/disqus/script.ejs +1 -0
- package/layout/_plugins/rightmenus/layout.ejs +1 -1
- package/layout/_widget/webinfo.ejs +4 -4
- package/package.json +1 -1
- package/scripts/events/lib/check-environment.js +3 -3
- package/scripts/tags/pandown.js +33 -0
- package/source/js/plugins/rightMenus.js +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [5.7.1](https://github.com/volantis-x/hexo-theme-volantis/compare/v5.7.0...v5.7.1) (2022-07-26)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* drop node 14 ([694046b](https://github.com/volantis-x/hexo-theme-volantis/commit/694046b934be663001226fedd4fb6b2535ec9d59))
|
|
9
|
+
|
|
10
|
+
## [5.7.0](https://github.com/volantis-x/hexo-theme-volantis/compare/v5.6.0...v5.7.0) (2022-07-15)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* add LingQue.Monitor ([f6f166e](https://github.com/volantis-x/hexo-theme-volantis/commit/f6f166e0e2834bc3c765383b4c21643df9bf7dc6))
|
|
16
|
+
* **tag:** add pandown ([#785](https://github.com/volantis-x/hexo-theme-volantis/issues/785)) ([efc1966](https://github.com/volantis-x/hexo-theme-volantis/commit/efc1966f1b976a0c59ef5b08da41838bda0e7a83))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* **artalk:** imageUploader ([#782](https://github.com/volantis-x/hexo-theme-volantis/issues/782)) ([c573d0c](https://github.com/volantis-x/hexo-theme-volantis/commit/c573d0c59b3dda882d88475ce44635647c64e4eb))
|
|
22
|
+
|
|
23
|
+
## [5.6.0](https://github.com/volantis-x/hexo-theme-volantis/compare/v5.5.0...v5.6.0) (2022-06-30)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### ⚠ BREAKING CHANGES
|
|
27
|
+
|
|
28
|
+
* **artalk:** imgUploader -> imageUploader
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* **comment:** disqus ([6656237](https://github.com/volantis-x/hexo-theme-volantis/commit/665623793b7610f2d9be8c1338c23e82f1b98159))
|
|
33
|
+
* **highlightjs:** cdn npm ([2caa1fb](https://github.com/volantis-x/hexo-theme-volantis/commit/2caa1fb1e630381ed9ea019038a4d8580d17703c))
|
|
34
|
+
* **meta:** counter ([7470b7a](https://github.com/volantis-x/hexo-theme-volantis/commit/7470b7abcfbc545e5552363c85b9562e42e75541))
|
|
35
|
+
* **rightmenu:** [#779](https://github.com/volantis-x/hexo-theme-volantis/issues/779) ([9023ce5](https://github.com/volantis-x/hexo-theme-volantis/commit/9023ce573d8ad0595990dafb13553817d749fee8))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Code Refactoring
|
|
39
|
+
|
|
40
|
+
* **artalk:** imgUploader -> imageUploader ([8cde195](https://github.com/volantis-x/hexo-theme-volantis/commit/8cde195b30c2111338ac2bcec45bcaf145867ccf))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Miscellaneous Chores
|
|
44
|
+
|
|
45
|
+
* release 5.6.0 ([cd60196](https://github.com/volantis-x/hexo-theme-volantis/commit/cd60196d4dc730d9d8d238ad1958f868b103ebfb))
|
|
46
|
+
|
|
3
47
|
## [5.5.0](https://github.com/volantis-x/hexo-theme-volantis/compare/v5.4.0...v5.5.0) (2022-06-18)
|
|
4
48
|
|
|
5
49
|
|
package/_config.yml
CHANGED
|
@@ -46,7 +46,7 @@ cdn:
|
|
|
46
46
|
# CDN 前缀,为空使用默认值,链接最后不加 "/",
|
|
47
47
|
# 例如: https://cdn.jsdelivr.net/gh/volantis-x/volantis-x.github.io@gh-page 填写最后编译生成的源码CDN地址前缀,此路径下应该含有/js与/css目录,
|
|
48
48
|
# 该配置默认值是:"https://unpkg.com/hexo-theme-volantis@"+ theme.info.theme_version +"/source"
|
|
49
|
-
prefix: #https://
|
|
49
|
+
prefix: #https://unpkg.com/hexo-theme-volantis/source
|
|
50
50
|
# 以下配置可以覆盖 cdn.prefix,配置项的值可以为空,但是要使用CDN必须依据路径填写配置项的键
|
|
51
51
|
set:
|
|
52
52
|
js:
|
|
@@ -64,13 +64,13 @@ volantis_static_cdn: https://unpkg.com/volantis-static@0.0.1654736714924/
|
|
|
64
64
|
# 全局页面字符串替换 A => B (可用于临时修改错字等)
|
|
65
65
|
replace:
|
|
66
66
|
- https://cdn.jsdelivr.net/npm/ => https://unpkg.com/
|
|
67
|
-
- https://cdn.jsdelivr.net/gh/ => https://
|
|
68
|
-
|
|
67
|
+
- https://cdn.jsdelivr.net/gh/ => https://gcore.jsdelivr.net/gh/
|
|
68
|
+
|
|
69
69
|
|
|
70
70
|
# dns-prefetch preconnect x-dns-prefetch-control
|
|
71
71
|
dns_prefetch:
|
|
72
72
|
- https://unpkg.com
|
|
73
|
-
|
|
73
|
+
|
|
74
74
|
|
|
75
75
|
# 平滑滚动效果
|
|
76
76
|
scroll_smooth: true
|
|
@@ -113,7 +113,7 @@ cover:
|
|
|
113
113
|
home: true
|
|
114
114
|
archive: true
|
|
115
115
|
others: false # can be written in front-matter 'cover: true'
|
|
116
|
-
background: https://
|
|
116
|
+
background: https://gcore.jsdelivr.net/gh/MHG-LAB/cron@gh-pages/bing/bing.jpg
|
|
117
117
|
# background: https://bing.ioliu.cn/v1/rand?w=1920&h=1200
|
|
118
118
|
logo: # https://cdn.jsdelivr.net/gh/volantis-x/cdn-org/blog/Logo-Cover@3x.png
|
|
119
119
|
title: 'Volantis'
|
|
@@ -201,17 +201,17 @@ article:
|
|
|
201
201
|
icon: fa-solid fa-bookmark
|
|
202
202
|
max_count: 5
|
|
203
203
|
# 设为空则不使用文章头图
|
|
204
|
-
placeholder_img: https://
|
|
204
|
+
placeholder_img: https://gcore.jsdelivr.net/gh/MHG-LAB/cron@gh-pages/bing/bing.jpg
|
|
205
205
|
# ----------------
|
|
206
206
|
# 版权声明组件 (for layout: post)
|
|
207
207
|
copyright:
|
|
208
|
-
enable:
|
|
208
|
+
enable: false
|
|
209
209
|
permalink: '本文永久链接是:'
|
|
210
210
|
content:
|
|
211
211
|
- '博客内容遵循 署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0) 协议'
|
|
212
212
|
- permalink
|
|
213
213
|
# 自定义版权组件:精细到文章的版权声明
|
|
214
|
-
custom:
|
|
214
|
+
custom: false # 开启后替代上方内容的版权显示
|
|
215
215
|
customData:
|
|
216
216
|
default: type1 # 默认授权声明
|
|
217
217
|
#############################
|
|
@@ -324,7 +324,7 @@ comments:
|
|
|
324
324
|
placeholder: # 评论占位
|
|
325
325
|
# artalk 有三类图片:1.上传至服务端 2.上传至服务端后利用upgit上传至图床 3.前端上传至图床(本配置为此类)
|
|
326
326
|
# 配置此项时将覆盖服务端上传能力
|
|
327
|
-
|
|
327
|
+
imageUploader:
|
|
328
328
|
# 以兰空图床为例,下列填写内容为:
|
|
329
329
|
# url: 'https://xxxxxx/api/v1/upload'
|
|
330
330
|
# token: 'Bearer xxxxxxxxxxxxxx'
|
|
@@ -575,21 +575,21 @@ sidebar:
|
|
|
575
575
|
text: '文章数目:'
|
|
576
576
|
unit: '篇'
|
|
577
577
|
runtime:
|
|
578
|
-
enable:
|
|
578
|
+
enable: false
|
|
579
579
|
data: '2020/01/01' # 填写建站日期
|
|
580
580
|
text: '已运行时间:'
|
|
581
581
|
unit: '天'
|
|
582
582
|
wordcount:
|
|
583
|
-
enable:
|
|
583
|
+
enable: false
|
|
584
584
|
text: '本站总字数:' # 需要启用 wordcount
|
|
585
585
|
unit: '字'
|
|
586
586
|
visitcounter:
|
|
587
587
|
siteuv:
|
|
588
|
-
enable:
|
|
588
|
+
enable: false
|
|
589
589
|
text: '本站访客数:'
|
|
590
590
|
unit: '人'
|
|
591
591
|
sitepv:
|
|
592
|
-
enable:
|
|
592
|
+
enable: false
|
|
593
593
|
text: '本站总访问量:'
|
|
594
594
|
unit: '次'
|
|
595
595
|
lastupd:
|
|
@@ -713,9 +713,9 @@ plugins:
|
|
|
713
713
|
copy_code: true
|
|
714
714
|
# 如果开启以下配置, hexo.config.highlight.enable 需要设置为 false ; hexo.config.highlight.enable 设置为 true, 则以下配置无效
|
|
715
715
|
# # 不再支持 v11.1.0 以下版本
|
|
716
|
-
# js: https://
|
|
717
|
-
# css: https://
|
|
718
|
-
# # # more: https://www.jsdelivr.com/package/npm/
|
|
716
|
+
# js: https://unpkg.com/@highlightjs/cdn-assets@11.5.1/highlight.min.js # Please set hexo.config.highlight.enable = false !!!
|
|
717
|
+
# css: https://unpkg.com/@highlightjs/cdn-assets@11.5.1/styles/default.min.css
|
|
718
|
+
# # # more: https://www.jsdelivr.com/package/npm/@highlightjs/cdn-assets?path=styles
|
|
719
719
|
|
|
720
720
|
# prismjs
|
|
721
721
|
# https://prismjs.com/
|
|
@@ -950,7 +950,7 @@ plugins:
|
|
|
950
950
|
|
|
951
951
|
### 自定义右键 新
|
|
952
952
|
rightmenus:
|
|
953
|
-
enable:
|
|
953
|
+
enable: false
|
|
954
954
|
# 右键菜单项及加载顺序
|
|
955
955
|
# 内容示例:plugins.[组名], menus.[组名], hr(分割线,推荐去线留白), music(音乐控制器)
|
|
956
956
|
order:
|
|
@@ -986,9 +986,9 @@ rightmenus:
|
|
|
986
986
|
# 图标前缀 fa-solid, fa-regular, fa-light, fa-thin, fa-duotone, fa-brands
|
|
987
987
|
iconPrefix: fa-solid
|
|
988
988
|
# 例外,在 articlePage 组显示时(文章页)时依旧显示含 link 属性的菜单项
|
|
989
|
-
articleShowLink:
|
|
989
|
+
articleShowLink: true
|
|
990
990
|
# 当设定全局音乐播放器时,是否一直显示音乐控制菜单。false:仅当音乐播放时启用
|
|
991
|
-
musicAlwaysShow:
|
|
991
|
+
musicAlwaysShow: true
|
|
992
992
|
# 右键内置组,预置实现
|
|
993
993
|
plugins:
|
|
994
994
|
# 导航组件
|
package/layout/_meta/counter.ejs
CHANGED
|
@@ -12,9 +12,19 @@
|
|
|
12
12
|
|
|
13
13
|
if(commentPath) path = commentPath;
|
|
14
14
|
path = path.replaceAll('/index.html', '/').replaceAll('.html', '')
|
|
15
|
+
|
|
16
|
+
let checkComment = false;
|
|
17
|
+
if (theme.analytics && theme.analytics.leancloud && theme.analytics.leancloud.app_id
|
|
18
|
+
|| theme.analytics.busuanzi
|
|
19
|
+
|| theme.comments.service=='waline' && theme.comments.waline.pageview
|
|
20
|
+
|| theme.comments.service=='twikoo'
|
|
21
|
+
|| theme.comments.service=='discuss'
|
|
22
|
+
|| theme.comments.service=='artalk') {
|
|
23
|
+
checkComment = !checkComment;
|
|
24
|
+
}
|
|
15
25
|
%>
|
|
16
26
|
|
|
17
|
-
<% if (!!page.comments) { %>
|
|
27
|
+
<% if (!!page.comments && checkComment) { %>
|
|
18
28
|
<div class="new-meta-item browse">
|
|
19
29
|
<a class='notlink'>
|
|
20
30
|
<p>
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
<%- partial('../../_plugins/analytics/LCCounter') %>
|
|
112
112
|
<% } %>
|
|
113
113
|
|
|
114
|
-
<% if (config.google_analytics_key || config.baidu_analytics_key || config.tencent_aegis_id || config.v6_51_la) { %>
|
|
114
|
+
<% if (config.google_analytics_key || config.baidu_analytics_key || config.tencent_aegis_id || config.v6_51_la || config.perf_51_la) { %>
|
|
115
115
|
<%- partial('../../_plugins/analytics/script') %>
|
|
116
116
|
<% } %>
|
|
117
117
|
|
|
@@ -71,4 +71,12 @@ volantis.pjax.push(()=>{_hmt.push(['_trackPageview', document.location.pathname]
|
|
|
71
71
|
})
|
|
72
72
|
</script>
|
|
73
73
|
<% } %>
|
|
74
|
-
|
|
74
|
+
|
|
75
|
+
<% if (config.perf_51_la) { %>
|
|
76
|
+
<script src="https://sdk.51.la/perf/js-sdk-perf.min.js" crossorigin="anonymous"></script>
|
|
77
|
+
<script>
|
|
78
|
+
volantis.js("https://sdk.51.la/perf/js-sdk-perf.min.js").then(() => {
|
|
79
|
+
new LingQue.Monitor().init({id:"<%= config.perf_51_la %>",sendSuspicious:true});
|
|
80
|
+
})
|
|
81
|
+
</script>
|
|
82
|
+
<% } %>
|
|
@@ -27,26 +27,26 @@
|
|
|
27
27
|
darkMode: volantis.dark.mode === "dark",
|
|
28
28
|
pvEl: '#artalk_visitors',
|
|
29
29
|
|
|
30
|
-
<% if(!!theme.comments.artalk.
|
|
30
|
+
<% if(!!theme.comments.artalk.imageUploader?.api){ %>
|
|
31
31
|
imgUploader: function(file) {
|
|
32
32
|
let headers = new Headers();
|
|
33
33
|
headers.set('Accept', 'application/json');
|
|
34
|
-
<% if(!!theme.comments.artalk.
|
|
35
|
-
headers.set('Authorization', '<%= theme.comments.artalk.
|
|
34
|
+
<% if(!!theme.comments.artalk.imageUploader?.token) { %>
|
|
35
|
+
headers.set('Authorization', '<%= theme.comments.artalk.imageUploader?.token %>')
|
|
36
36
|
<% } %>
|
|
37
37
|
let formData = new FormData();
|
|
38
38
|
formData.append('file', file);
|
|
39
|
-
return fetch('<%= theme.comments.artalk.
|
|
39
|
+
return fetch('<%= theme.comments.artalk.imageUploader?.api %>',{
|
|
40
40
|
method: 'POST',
|
|
41
41
|
body: formData,
|
|
42
42
|
headers: headers
|
|
43
43
|
}).then((resp) => resp.json())
|
|
44
|
-
.then((resp) => resp.<%= theme.comments.artalk.
|
|
44
|
+
.then((resp) => resp.<%= theme.comments.artalk.imageUploader?.resp %>)
|
|
45
45
|
},
|
|
46
46
|
<% } %>
|
|
47
47
|
}));
|
|
48
48
|
|
|
49
|
-
Artalk.
|
|
49
|
+
Artalk.use(ctx => {
|
|
50
50
|
ctx.on('list-loaded', () => {
|
|
51
51
|
if (typeof VolantisFancyBox === "undefined"){
|
|
52
52
|
const checkFancyBox = setInterval(() => {
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
|
|
72
72
|
// 点击了加载
|
|
73
73
|
function needLoadDisqus() {
|
|
74
|
+
if(!document.querySelectorAll("#layoutHelper-comments")[0])return;
|
|
74
75
|
checkDisqus();
|
|
75
76
|
volantis.dom.$(document.getElementById("load-btns")).hide();
|
|
76
77
|
volantis.dom.$(document.getElementById("loading-comments")).show();
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
<% rightMenu.rederFunction = item => { %>
|
|
83
83
|
<% if (!!item && !!item['event'] && item['group'] !== 'navigation') { %>
|
|
84
84
|
<% if (rightMenu.defaultEvent.some(value => { return value === item['event'] })) { %>
|
|
85
|
-
|
|
85
|
+
//RightMenusFunction['<%- item.id %>'] = (fun) => {fun()}
|
|
86
86
|
<% } else if (item['group'] === 'seletctText') { %>
|
|
87
87
|
RightMenusFunction['<%- item.id %>'] = (__text__) => {<%- item.event %>}
|
|
88
88
|
<% } else if (item['group'] === 'elementCheck' || item['group'] === 'elementImage') { %>
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
</div>
|
|
26
26
|
<% } %>
|
|
27
27
|
|
|
28
|
-
<% if (item.type.visitcounter.siteuv.enable && (!!theme.analytics.
|
|
28
|
+
<% if (item.type.visitcounter.siteuv.enable && (!!theme.analytics.busuanzi || !!theme.analytics.leancloud.app_id)) { %>
|
|
29
29
|
<div class="webinfo-item">
|
|
30
30
|
<div><%= item.type.visitcounter.siteuv.text %></div>
|
|
31
|
-
<% if (!!theme.analytics.
|
|
31
|
+
<% if (!!theme.analytics.busuanzi) {%>
|
|
32
32
|
<div><span id="busuanzi_value_site_uv"><i class="fa-solid fa-fan fa-spin fa-fw" aria-hidden="true"></i></span> <%= item.type.visitcounter.siteuv.unit %></div>
|
|
33
33
|
<% } else { %>
|
|
34
34
|
<div><span id="lc-uv"><span id='number'><i class="fa-solid fa-loader fa-spin fa-fw" aria-hidden="true"></i></span></span> <%= item.type.visitcounter.siteuv.unit %></div>
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
</div>
|
|
37
37
|
<% } %>
|
|
38
38
|
|
|
39
|
-
<% if (item.type.visitcounter.sitepv.enable && (!!theme.analytics.
|
|
39
|
+
<% if (item.type.visitcounter.sitepv.enable && (!!theme.analytics.busuanzi || !!theme.analytics.leancloud.app_id)) { %>
|
|
40
40
|
<div class="webinfo-item">
|
|
41
41
|
<div><%= item.type.visitcounter.sitepv.text %></div>
|
|
42
|
-
<% if (!!theme.analytics.
|
|
42
|
+
<% if (!!theme.analytics.busuanzi) {%>
|
|
43
43
|
<div><span id="busuanzi_value_site_pv"><i class="fa-solid fa-fan fa-spin fa-fw" aria-hidden="true"></i></span> <%= item.type.visitcounter.sitepv.unit %></div>
|
|
44
44
|
<% } else { %>
|
|
45
45
|
<div><span id="lc-sv"><span id='number'><i class="fa-solid fa-loader fa-spin fa-fw" aria-hidden="true"></i></span></span> <%= item.type.visitcounter.sitepv.unit %></div>
|
package/package.json
CHANGED
|
@@ -12,9 +12,9 @@ module.exports =(hexo) => {
|
|
|
12
12
|
CheckError(hexo,`node.js: ${err}`);
|
|
13
13
|
}
|
|
14
14
|
let nodeVersion = stdout.match(/v(\d*)/)[1];
|
|
15
|
-
if (nodeVersion<
|
|
15
|
+
if (nodeVersion<16) {
|
|
16
16
|
hexo.log.info(`node.js 版本:${stdout}`);
|
|
17
|
-
CheckError(hexo,`node.js 版本过低,请升级至
|
|
17
|
+
CheckError(hexo,`node.js 版本过低,请升级至 v16.x 及以上版本!`);
|
|
18
18
|
}else{
|
|
19
19
|
exec('hexo -v', (err, stdout, stderr) => {
|
|
20
20
|
if (err) {
|
|
@@ -69,4 +69,4 @@ function CheckConfError(hexo,msg) {
|
|
|
69
69
|
${msg}
|
|
70
70
|
============================================================`);
|
|
71
71
|
throw new Error('配置文件检查失败!| Configuration check failed!');
|
|
72
|
-
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// {% pandown type, url, pwd, fname %}
|
|
4
|
+
hexo.extend.tag.register('pandown', function(args) {
|
|
5
|
+
if(/::/g.test(args)){
|
|
6
|
+
args = args.join(' ').split('::');
|
|
7
|
+
}
|
|
8
|
+
else{
|
|
9
|
+
args = args.join(' ').split(',');
|
|
10
|
+
}
|
|
11
|
+
let type = '';
|
|
12
|
+
let url = '';
|
|
13
|
+
let pwd = '';
|
|
14
|
+
let fname = '';
|
|
15
|
+
if (args.length < 4) {
|
|
16
|
+
return;
|
|
17
|
+
} else if (args[0].trim() === 'yun') {
|
|
18
|
+
return '<p>对不起,pandown-tags不支持自定义</p><br><p>Sorry, pandown-tags does not support customization</p>'
|
|
19
|
+
} else {
|
|
20
|
+
type = args[0].trim();
|
|
21
|
+
url = args[1].trim();
|
|
22
|
+
pwd = args[2].trim();
|
|
23
|
+
fname = args[3].trim();
|
|
24
|
+
}
|
|
25
|
+
let result = '';
|
|
26
|
+
// js
|
|
27
|
+
result += '<div class="tag pandown-tags"><script type="text/javascript" src="https://unpkg.com/pandown"></script>';
|
|
28
|
+
//pandown
|
|
29
|
+
result += '<pandown type="'+type+'" url="'+url+'" pwd="'+pwd+'" fname="'+fname+'"></pandown>'
|
|
30
|
+
//调用
|
|
31
|
+
result += '<script>pandown()</script></div>'
|
|
32
|
+
return result;
|
|
33
|
+
});
|
|
@@ -563,21 +563,20 @@ RightMenus.fun = (() => {
|
|
|
563
563
|
|
|
564
564
|
fn.readMode = () => {
|
|
565
565
|
if (typeof ScrollReveal === 'function') ScrollReveal().clean('#comments');
|
|
566
|
-
DOMController.
|
|
567
|
-
|
|
568
|
-
'
|
|
569
|
-
'
|
|
570
|
-
|
|
571
|
-
]);
|
|
572
|
-
DOMController.
|
|
573
|
-
['
|
|
574
|
-
['#
|
|
575
|
-
['
|
|
576
|
-
[
|
|
577
|
-
[
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
]);
|
|
566
|
+
DOMController.fadeToggleList([
|
|
567
|
+
document.querySelector('#l_header'), document.querySelector('footer'),
|
|
568
|
+
document.querySelector('#s-top'), document.querySelector('.article-meta#bottom'),
|
|
569
|
+
document.querySelector('.prev-next'), document.querySelector('#l_side'),
|
|
570
|
+
document.querySelector('#comments')
|
|
571
|
+
]);
|
|
572
|
+
DOMController.toggleClassList([
|
|
573
|
+
[document.querySelector('#l_main'), 'common_read'], [document.querySelector('#l_main'), 'common_read_main'],
|
|
574
|
+
[document.querySelector('#l_body'), 'common_read'], [document.querySelector('#safearea'), 'common_read'],
|
|
575
|
+
[document.querySelector('#pjax-container'), 'common_read'], [document.querySelector('#read_bkg'), 'common_read_hide'],
|
|
576
|
+
[document.querySelector('h1'), 'common_read_h1'], [document.querySelector('#post'), 'post_read'],
|
|
577
|
+
[document.querySelector('#l_cover'), 'read_cover'], [document.querySelector('.widget.toc-wrapper'), 'post_read']
|
|
578
|
+
]);
|
|
579
|
+
DOMController.setStyle('.copyright.license', 'margin', '15px 0');
|
|
581
580
|
volantis.isReadModel = volantis.isReadModel === undefined ? true : !volantis.isReadModel;
|
|
582
581
|
if (volantis.isReadModel) {
|
|
583
582
|
if (RightMenus.messageRightMenu) VolantisApp.message('系统提示', '阅读模式已开启,您可以点击屏幕空白处退出。', {
|
|
@@ -595,7 +594,8 @@ RightMenus.fun = (() => {
|
|
|
595
594
|
} else {
|
|
596
595
|
document.querySelector('#l_body').removeEventListener('click', fn.readMode);
|
|
597
596
|
document.querySelector('#post').removeEventListener('click', fn.readMode);
|
|
598
|
-
|
|
597
|
+
DOMController.setStyle('.prev-next', 'display', 'flex');
|
|
598
|
+
DOMController.setStyle('.copyright.license', 'margin', '15px -40px');
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
601
|
|