hexo-theme-volantis 5.5.0 → 5.6.0
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 +24 -0
- package/_config.yml +13 -13
- package/layout/_meta/counter.ejs +11 -1
- package/layout/_plugins/comments/artalk/script.ejs +2 -2
- 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/source/js/plugins/rightMenus.js +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [5.6.0](https://github.com/volantis-x/hexo-theme-volantis/compare/v5.5.0...v5.6.0) (2022-06-30)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* **artalk:** imgUploader -> imageUploader
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* **comment:** disqus ([6656237](https://github.com/volantis-x/hexo-theme-volantis/commit/665623793b7610f2d9be8c1338c23e82f1b98159))
|
|
13
|
+
* **highlightjs:** cdn npm ([2caa1fb](https://github.com/volantis-x/hexo-theme-volantis/commit/2caa1fb1e630381ed9ea019038a4d8580d17703c))
|
|
14
|
+
* **meta:** counter ([7470b7a](https://github.com/volantis-x/hexo-theme-volantis/commit/7470b7abcfbc545e5552363c85b9562e42e75541))
|
|
15
|
+
* **rightmenu:** [#779](https://github.com/volantis-x/hexo-theme-volantis/issues/779) ([9023ce5](https://github.com/volantis-x/hexo-theme-volantis/commit/9023ce573d8ad0595990dafb13553817d749fee8))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Code Refactoring
|
|
19
|
+
|
|
20
|
+
* **artalk:** imgUploader -> imageUploader ([8cde195](https://github.com/volantis-x/hexo-theme-volantis/commit/8cde195b30c2111338ac2bcec45bcaf145867ccf))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Miscellaneous Chores
|
|
24
|
+
|
|
25
|
+
* release 5.6.0 ([cd60196](https://github.com/volantis-x/hexo-theme-volantis/commit/cd60196d4dc730d9d8d238ad1958f868b103ebfb))
|
|
26
|
+
|
|
3
27
|
## [5.5.0](https://github.com/volantis-x/hexo-theme-volantis/compare/v5.4.0...v5.5.0) (2022-06-18)
|
|
4
28
|
|
|
5
29
|
|
package/_config.yml
CHANGED
|
@@ -205,13 +205,13 @@ article:
|
|
|
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>
|
|
@@ -27,7 +27,7 @@
|
|
|
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');
|
|
@@ -46,7 +46,7 @@
|
|
|
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
|
@@ -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
|
|