hexo-theme-volantis 5.0.0-rc.7 → 5.1.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.
Files changed (72) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +4 -4
  3. package/_config.yml +173 -69
  4. package/layout/_meta/counter.ejs +27 -5
  5. package/layout/_meta/walinecount.ejs +2 -1
  6. package/layout/_partial/article.ejs +2 -2
  7. package/layout/_partial/head.ejs +29 -25
  8. package/layout/_partial/header.ejs +1 -1
  9. package/layout/_partial/scripts/_ctrl/cdnCtrl.ejs +1 -0
  10. package/layout/_partial/scripts/content-visibility-scroll-fix.ejs +71 -69
  11. package/layout/_partial/scripts/global.ejs +49 -23
  12. package/layout/_partial/scripts/index.ejs +26 -9
  13. package/layout/_partial/scripts/toc.ejs +61 -38
  14. package/layout/_plugins/_page_plugins/indent/index.ejs +1 -1
  15. package/layout/_plugins/_page_plugins/index.ejs +27 -7
  16. package/layout/_plugins/_page_plugins/snackbar/index.ejs +1 -1
  17. package/layout/_plugins/analytics/script.ejs +11 -1
  18. package/layout/_plugins/aplayer/script.ejs +2 -2
  19. package/layout/_plugins/comments/artalk/script.ejs +17 -11
  20. package/layout/_plugins/comments/beaudar/script.ejs +2 -2
  21. package/layout/_plugins/comments/discuss/script.ejs +30 -0
  22. package/layout/_plugins/comments/hashover/script.ejs +2 -2
  23. package/layout/_plugins/comments/index.ejs +4 -4
  24. package/layout/_plugins/comments/twikoo/script.ejs +1 -1
  25. package/layout/_plugins/comments/waline/script.ejs +40 -22
  26. package/layout/_plugins/parallax/script.ejs +1 -1
  27. package/layout/_plugins/pjax/index.ejs +3 -4
  28. package/layout/_plugins/pjax/pdata.ejs +0 -1
  29. package/layout/_plugins/rightmenu/layout.ejs +2 -2
  30. package/layout/_plugins/rightmenus/layout.ejs +137 -0
  31. package/layout/_plugins/search/script.ejs +14 -7
  32. package/layout/_widget/lastupdate.ejs +27 -27
  33. package/layout/_widget/webinfo.ejs +7 -7
  34. package/layout/layout.ejs +20 -3
  35. package/layout/tag.ejs +1 -1
  36. package/package.json +1 -1
  37. package/scripts/events/index.js +1 -0
  38. package/scripts/events/lib/check-configuration.js +43 -0
  39. package/scripts/events/lib/check-environment.js +74 -0
  40. package/scripts/events/lib/render-stylus.js +1 -1
  41. package/scripts/filters/content-visibility.js +2 -2
  42. package/scripts/helpers/custom-files.js +3 -1
  43. package/scripts/helpers/head/generate_seo.js +1 -1
  44. package/scripts/helpers/head/generate_title__keywords__description.js +14 -4
  45. package/scripts/helpers/structured-data/lib/blogposting.js +18 -6
  46. package/scripts/helpers/structured-data/lib/breadcrumblist.js +25 -1
  47. package/scripts/helpers/structured-data/lib/index.js +1 -9
  48. package/scripts/tags/fancybox.js +1 -1
  49. package/scripts/tags/note.js +24 -1
  50. package/scripts/tags/tabs.js +85 -86
  51. package/source/css/_defines/AutoPrefixCSS.styl +16 -16
  52. package/source/css/_defines/color.styl +23 -2
  53. package/source/css/_first/base_first.styl +5 -0
  54. package/source/css/_first/dark_first.styl +30 -29
  55. package/source/css/_first/navbar_first.styl +1 -1
  56. package/source/css/_style/_base/base.styl +2 -2
  57. package/source/css/_style/_layout/toc.styl +2 -2
  58. package/source/css/_style/_plugins/_dark/dark_async.styl +1 -1
  59. package/source/css/_style/_plugins/_dark/dark_plugins.styl +21 -5
  60. package/source/css/_style/_plugins/_highlight/highlightjs/clipboard.styl +1 -1
  61. package/source/css/_style/_plugins/_rightmenu/reading.styl +2 -2
  62. package/source/css/_style/_plugins/_rightmenu/rightmenu.styl +3 -2
  63. package/source/css/_style/_plugins/fontcolor.styl +1 -1
  64. package/source/css/_style/_plugins/index.styl +1 -1
  65. package/source/css/first.styl +5 -7
  66. package/source/js/app.js +69 -41
  67. package/source/js/plugins/aplayer.js +1 -3
  68. package/source/js/plugins/rightMenu.js +22 -22
  69. package/source/js/plugins/rightMenus.js +616 -0
  70. package/source/js/search/hexo.js +3 -0
  71. package/layout/_partial/scripts/import.ejs +0 -3
  72. package/scripts/filters/CSP.js +0 -74
package/CHANGELOG.md ADDED
@@ -0,0 +1,22 @@
1
+ # Changelog
2
+
3
+ ## [5.1.0](https://github.com/volantis-x/hexo-theme-volantis/compare/5.0.0...v5.1.0) (2022-05-19)
4
+
5
+
6
+ ### Features
7
+
8
+ * release-please ([97efd35](https://github.com/volantis-x/hexo-theme-volantis/commit/97efd352d3f44d7f12a813db89c07ab0ba56e188))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * 703 ([034d684](https://github.com/volantis-x/hexo-theme-volantis/commit/034d6847050472d7fe89335d65f371112c7449e8))
14
+ * 706 移动端菜单栏异常 ([e1f63b3](https://github.com/volantis-x/hexo-theme-volantis/commit/e1f63b33d47a992c278eb51471e5e2816ebc138f))
15
+ * 713 ([e1233de](https://github.com/volantis-x/hexo-theme-volantis/commit/e1233de457648ea46597a5ec4875efc5011e58b5))
16
+ * 740 ([a845788](https://github.com/volantis-x/hexo-theme-volantis/commit/a845788c9dbc1c251e93ca6e8b557d6e1bfb849e))
17
+ * Discuss 评论系统适配深色模式 ([#752](https://github.com/volantis-x/hexo-theme-volantis/issues/752)) ([86002b6](https://github.com/volantis-x/hexo-theme-volantis/commit/86002b67af0060e21e9ac2514aeee64377e01e69))
18
+ * error friendly ([3bffeab](https://github.com/volantis-x/hexo-theme-volantis/commit/3bffeabc2399cd3dda5816c13b1b56be25d7f95f))
19
+ * no-title ([48c70f8](https://github.com/volantis-x/hexo-theme-volantis/commit/48c70f8c13dd4d6dc7fa1bb5226c5987fde7971f))
20
+ * **twikoo:** 所有页面都说同一个path的bug ([14de40b](https://github.com/volantis-x/hexo-theme-volantis/commit/14de40bbe12e1e1679a60a58e0d501625d0e7ff2))
21
+ * 为 Discuss 添加最低高度 ([#742](https://github.com/volantis-x/hexo-theme-volantis/issues/742)) ([9bf70de](https://github.com/volantis-x/hexo-theme-volantis/commit/9bf70debfb8a38da89a7bf5f7bd7634d504aa457))
22
+ * 修复Discuss评论区表情包在深色模式下,css权重低的bug ([#753](https://github.com/volantis-x/hexo-theme-volantis/issues/753)) ([872baf7](https://github.com/volantis-x/hexo-theme-volantis/commit/872baf7481b1bb6e47381638c5c346fb232a398a))
package/README.md CHANGED
@@ -9,10 +9,10 @@
9
9
  Check your environment:
10
10
 
11
11
  ```yaml
12
- Hexo: 4.2 ~ 5.x
13
- hexo-cli: 3.1 ~ 4.x
14
- node.js: 12.16 LTS ~ latest LTS
15
- npm: 6.13 ~ latest LTS
12
+ Hexo: 5.4 ~ 6.x
13
+ hexo-cli: 4.3 ~ latest
14
+ node.js: 16.x LTS ~ latest LTS
15
+ npm: 8.x ~ latest LTS
16
16
  ```
17
17
 
18
18
  Edit your `_config.yml`:
package/_config.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  ############################### Volantis ###############################
2
2
  info:
3
3
  theme_name: Volantis # This is theme's name.
4
- theme_version: '5.0.0-rc.7' # This is theme's version.
4
+ theme_version: '5.0.0-alpha.112' # This is theme's version.
5
5
  theme_docs: https://volantis.js.org/ # This is theme's URL.
6
6
  theme_repo: https://github.com/volantis-x/hexo-theme-volantis
7
7
  # Debug 调试模式
@@ -13,9 +13,10 @@ default:
13
13
  cover: volantis-static/media/placeholder/cover/76b86c0226ffd.svg # https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/cover/76b86c0226ffd.svg
14
14
  image: volantis-static/media/placeholder/image/2659360.svg # https://cdn.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/image/2659360.svg
15
15
  ############################### CSP ###############################
16
- # 内容安全策略( CSP )
16
+ # 内容安全策略( CSP ) meta 标签 http-equiv="Content-Security-Policy"
17
17
  # https://developer.mozilla.org/zh-CN/docs/Web/HTTP/CSP
18
18
  # https://content-security-policy.com/
19
+ # 也可以设为 false 在 HTTP 标头中设置 https://volantis.js.org/v5/advanced-settings/#设置-HTTP-响应标头
19
20
  csp:
20
21
  enable: true
21
22
  content: "
@@ -35,9 +36,6 @@ csp:
35
36
  style-src 'self' https: 'unsafe-inline' *;
36
37
  "
37
38
  # 可以使用自动程序替换默认的 'unsafe-inline' 和 * 生成更严格的内容安全策略.
38
- # hexo_fliter_sha256 用于 hexo g 时替换 'unsafe-inline' 生成 script-src 'sha256-' , 只适用于外层不含有压缩工具得场景.
39
- # 如果外层含有压缩工具会改变 hash 导致无效,hexo_fliter_sha256 需设为false, 使用 gulp 方案.
40
- hexo_fliter_sha256: false
41
39
  # 另可以参考官网的 gulp 方案.
42
40
  # gulpfile.js https://github.com/volantis-x/community/blob/main/gulpfile.js
43
41
  ############################### CDN ###############################
@@ -56,7 +54,9 @@ cdn:
56
54
  app: /js/app.js
57
55
  css:
58
56
  style: /css/style.css # (异步加载样式)
59
- # 请求静态资源添加版本号 本地文件使用文件内容的hash值作为版本号(app.8c1e7c88.js) 其他为时间戳 (?time=1648684470140)
57
+ # 静态资源版本控制
58
+ # 本地文件使用文件内容的hash值作为版本号(app.8c1e7c88.js) 其他为时间戳 (?time=1648684470140)
59
+ # 建议静态资源设置标头 浏览器缓存一年边缘缓存一个月 cache-control: max-age=86400, s-maxage=31536000 如果有更新记得刷新缓存
60
60
  cdn_version: true
61
61
  # volantis static 静态资源文件 npm 包 CDN 地址 (后面加 "/" )
62
62
  # https://github.com/volantis-x/volantis-static
@@ -65,12 +65,13 @@ volantis_static_cdn: https://unpkg.com/volantis-static@0.0.1649552113628/
65
65
  # 全局页面字符串替换 A => B (可用于临时修改错字等)
66
66
  replace:
67
67
  - https://cdn.jsdelivr.net/npm/ => https://unpkg.com/
68
- - https://unpkg.com/ => https://npm.elemecdn.com/
68
+ - https://cdn.jsdelivr.net/gh/ => https://fastly.jsdelivr.net/gh/
69
+ # - https://unpkg.com/ => https://npm.elemecdn.com/
69
70
 
70
71
  # dns-prefetch preconnect x-dns-prefetch-control
71
72
  dns_prefetch:
72
- # - https://unpkg.com
73
- - https://npm.elemecdn.com
73
+ - https://unpkg.com
74
+ # - https://npm.elemecdn.com
74
75
 
75
76
  # 平滑滚动效果
76
77
  scroll_smooth: true
@@ -279,20 +280,15 @@ comments:
279
280
  # https://artalk.js.org/
280
281
  # https://github.com/ArtalkJS/Artalk
281
282
  artalk:
282
- js: https://unpkg.com/artalk@2.1.3/dist/Artalk.js
283
- css: https://unpkg.com/artalk@2.1.3/dist/Artalk.css
284
- server: http://127.0.0.1:8080/api # 修改为自建的后端服务地址
283
+ js: https://yours-artalk-domain/dist/Artalk.js # or https://unpkg.com/artalk@2.2.8/dist/Artalk.js
284
+ css: https://yours-artalk-domain/dist/Artalk.css # or https://unpkg.com/artalk@2.2.8/dist/Artalk.css
285
+ server: https://yours-artalk-domain # 修改为自建的后端服务地址
285
286
  path: # 全局评论地址
286
- # 更多选项 https://artalk.js.org/guide/frontend/config.htm 按照yml格式继续填写即可
287
- # 除了 [el pageKey pageTitle site] 选项
288
- # 下面是一些例子:
289
- placeholder: 来啊,快活啊 ( ゜- ゜) # 全局评论占位
290
- noComment: 快来成为第一个评论的人吧~ # 评论为空时,评论列表显示字符
291
- pagination:
292
- readMore: true # 加载更多模式
293
- autoLoad: false # 滚动到底部自动加载
294
- pageSize: 10 # 每次请求获取数量
295
-
287
+ placeholder: # 评论占位
288
+ # 更多置项可在 Artalk 后端进行配置,详见 https://artalk.js.org/guide/backend/fe-control.html
289
+ # 也可以在此处继续参考上方例子进行配置,不建议重写配置的字段除上方所述外还有:
290
+ # [el, useBackendConf, pageKey, pageTitle, site, darkMode, pvEl]
291
+
296
292
  # giscus
297
293
  # https://giscus.app
298
294
  # https://github.com/laymonage/giscus
@@ -410,19 +406,31 @@ comments:
410
406
  # Waline
411
407
  # https://waline.js.org/
412
408
  waline:
413
- js: https://npm.elemecdn.com/@waline/client@1.6.0/dist/Waline.min.js
409
+ js: https://unpkg.com/@waline/client@v2/dist/waline.js
410
+ css: https://unpkg.com/@waline/client@v2/dist/waline.css
414
411
  path: # 全局评论地址 目前设置全局评论地址后visitor失效,这是waline的问题
415
- placeholder: 快来评论吧~ # 评论占位提示
416
- # imageHosting: https://7bu.top/api/upload?token=7ffe9d626fe4315c953758efbdb6ee2e # 图床api(默认注释使用base64)
417
- # 其他配置项按照yml格式继续填写即可 除了 [el path placeholder uploadImage] 选项
418
- meta: [nick,mail,link] # waline comment header info
419
- requiredFields: [nick,mail]
420
- serverURL: xxxxxxxxxxxxxxx # Waline 的服务端地址(必填) 测试用地址: https://waline-ruddy.vercel.app
421
- avatar: robohash # gravatar style https://waline.js.org/client/basic.html#avatar
422
- avatarCDN: #https://sdn.geekzu.org/avatar/
423
- pageSize: 10 # 评论每页显示数量
424
- lang: zh-CN
425
- visitor: true
412
+ placeholder: # 评论占位提示
413
+ serverURL: # Waline 的服务端地址(必填) 测试用地址: https://waline.vercel.app
414
+ imageUploader:
415
+ # 以兰空图床为例,下列填写内容为:
416
+ # url: https://xxxxxx/api/v1/upload
417
+ # token: Bearer xxxxxxxxxxxxxx
418
+ # resp: data.links.url
419
+ api: # 图床地址
420
+ token: # 图床验证
421
+ resp: # 图片地址返回值的字段
422
+ pageview: true # 浏览量统计
423
+ comment: true # 评论数统计
424
+ # 其他配置项按照yml格式继续填写即可 除了 [el path imageUploader] 选项
425
+ # 组件属性地址:https://waline.js.org/reference/component.html
426
+ # meta: ['nick', 'mail', 'link']
427
+
428
+ # Discuss
429
+ # https://discuss.js.org
430
+ discuss:
431
+ js: https://cdn.jsdelivr.net/npm/discuss/dist/Discuss.js # 建议锁定版本
432
+ serverURLs: # Discuss server address url
433
+ # https://discuss.js.org/Quick-Start.html#path
426
434
 
427
435
 
428
436
  ############################### Comments ############################### > end
@@ -528,7 +536,6 @@ sidebar:
528
536
  text: '本站总字数:' # 需要启用 wordcount
529
537
  unit: '字'
530
538
  visitcounter:
531
- service: leancloud # busuanzi, leancloud
532
539
  siteuv:
533
540
  enable: true
534
541
  text: '本站访客数:'
@@ -678,7 +685,7 @@ plugins:
678
685
 
679
686
  # https://scrollrevealjs.org/api/reveal.html
680
687
  scrollreveal:
681
- enable: #true
688
+ enable: true
682
689
  js: volantis-static/libs/scrollreveal/dist/scrollreveal.min.js # https://unpkg.com/scrollreveal@4.0.9/dist/scrollreveal.min.js
683
690
  distance: 32px
684
691
  duration: 800 # ms
@@ -865,9 +872,9 @@ plugins:
865
872
  enable: true
866
873
  play: fa-solid fa-play
867
874
  pause: fa-solid fa-pause
868
- rightmenu:
875
+ rightmenu:
869
876
  enable: true # 是否开启右键模块的消息通知
870
- notice: true # 唤醒原右键菜单的通知
877
+ notice: true # 唤醒原右键菜单的通知
871
878
 
872
879
  # 聊天功能
873
880
  chat_service: # tidio or gitter
@@ -881,7 +888,7 @@ plugins:
881
888
  # https://gitter.im
882
889
  gitter:
883
890
  room: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
884
-
891
+
885
892
  # swiper
886
893
  # https://www.swiper.com.cn/
887
894
  swiper:
@@ -892,9 +899,102 @@ plugins:
892
899
  ############################### Plugins ############################### > end
893
900
 
894
901
  ############################### Rightmenu ############################### > start
902
+
903
+ ### 自定义右键 新
904
+ rightmenus:
905
+ enable: true
906
+ # 右键菜单项及加载顺序
907
+ # 内容示例:plugins.[组名], menus.[组名], hr(分割线,推荐去线留白), music(音乐控制器)
908
+ order:
909
+ - plugins.navigation
910
+ - hr
911
+ - plugins.inputBox
912
+ - plugins.seletctText
913
+ - plugins.elementCheck
914
+ - plugins.elementImage
915
+ - menus.link
916
+ - hr
917
+ - menus.darkMode
918
+ - plugins.articlePage
919
+ - music
920
+ ############################
921
+ # - {id: '', name: '', icon: '', link: '', event: '', group: ''}
922
+ # id: 唯一值
923
+ # name: 用于菜单名称显示
924
+ # icon: 用于菜单图标显示
925
+ # link: 跳转链接
926
+ # event: 事件,当输入内容不为内置事件时,作 JavaScript 代码执行
927
+ # group: 菜单项所处分组名称
928
+ # 注:
929
+ # 1. link/event 二选一,同时出现时仅处理 link
930
+ # 2. 内置事件列表: copyText, copyLink, copyPaste, copyAll, copyCut, copyImg, printMode, readMode
931
+ # 3. 内置组列表:navigation, inputBox, seletctText, elementCheck, elementImage, articlePage
932
+ # 4. plugins 列允许自定义组内项目
933
+ # 5. menus 列允许自定义组及其内容
934
+ # 6. 除 navigation 外的内置组,在显示时会隐藏含 link 属性的菜单项
935
+ ###########################
936
+ # 基础项设置
937
+ options:
938
+ # 图标前缀 fa-solid, fa-regular, fa-light, fa-thin, fa-duotone, fa-brands
939
+ iconPrefix: fa-solid
940
+ # 例外,在 articlePage 组显示时(文章页)时依旧显示含 link 属性的菜单项
941
+ articleShowLink: false
942
+ # 当设定全局音乐播放器时,是否一直显示音乐控制菜单。false:仅当音乐播放时启用
943
+ musicAlwaysShow: false
944
+ # 右键内置组,预置实现
945
+ plugins:
946
+ # 导航组件
947
+ # 横向排列,共用一行,仅显示图标 (原则上支持的数量不限)
948
+ navigation:
949
+ - {id: 'left', name: '转到上一页', icon: 'fa-solid fa-arrow-left', event: 'history.back()', group: 'navigation'}
950
+ - {id: 'right', name: '转到下一页', icon: 'fa-solid fa-arrow-right', event: 'history.forward()', group: 'navigation'}
951
+ - {id: 'redo', name: '刷新当前页面', icon: 'fa-solid fa-redo', event: 'window.location.reload()', group: 'navigation'}
952
+ - {id: 'up', name: '回到顶部', icon: 'fa-solid fa-arrow-up', event: 'VolantisApp.scrolltoElement(volantis.dom.bodyAnchor)', group: 'navigation'}
953
+ #- {id: 'home', name: '回到首页', icon: 'fa-solid fa-home', link: '/', group: 'navigation'}
954
+ # 文本输入框相关组件
955
+ # 生效于 input/textarea,粘贴、剪切、全选
956
+ inputBox:
957
+ - {id: 'copyPaste', name: '粘贴文本', icon: 'fa-solid fa-paste', event: 'copyPaste', group: 'inputBox'}
958
+ - {id: 'copyAll', name: '全选文本', icon: 'fa-solid fa-object-ungroup', event: 'copyAll', group: 'inputBox'}
959
+ - {id: 'copyCut', name: '剪切文本', icon: 'fa-solid fa-cut', event: 'copyCut', group: 'inputBox'}
960
+ # 文本选中类组件
961
+ # 生效于右键选中文本,__text__ 为选中的文本。
962
+ seletctText:
963
+ - {id: 'copyText', name: '复制文本', icon: 'fa-solid fa-copy', event: 'copyText', group: 'seletctText'}
964
+ - {id: 'searchWord', name: '站内搜索', icon: 'fa-solid fa-search', event: 'OpenSearch(__text__)', group: 'seletctText'}
965
+ - {id: 'bingSearch', name: '必应搜索', icon: 'fa-solid fa-search', event: 'window.open(`https://cn.bing.com/search?q=${__text__}`)', group: 'seletctText'}
966
+ #- {id: 'googleSearch', name: '谷歌搜索', icon: 'fa-solid fa-search', event: 'window.open(`https://www.google.com/search?q=${__text__}`)', group: 'seletctText'}
967
+ # 链接判断组件
968
+ # 生效于链接处的右键行为,__link__ 为链接地址
969
+ elementCheck:
970
+ - {id: 'openTab', name: '新标签页打开', icon: 'fa-solid fa-external-link-square-alt', event: 'window.open(__link__)', group: 'elementCheck'}
971
+ - {id: 'copyLink', name: '复制链接地址', icon: 'fa-solid fa-link', event: 'copyLink', group: 'elementCheck'}
972
+ # 图片判断类组件
973
+ # 生效于图片类的右键行为,__link__ 为链接地址
974
+ elementImage:
975
+ - {id: 'copyImg', name: '复制图片', icon: 'fa-solid fa-image', event: 'copyImg', group: 'elementImage'}
976
+ - {id: 'googleImg', name: '谷歌识图', icon: 'fa-solid fa-images', event: 'window.open(`https://www.google.com.hk/searchbyimage?image_url=${__link__}`)', group: 'elementImage'}
977
+ # 文章页面组件
978
+ # 生效于 post.article 页面
979
+ articlePage:
980
+ - {id: 'printMode', name: '打印页面', icon: 'fa-solid fa-print', event: 'printMode', group: 'articlePage'}
981
+ - {id: 'readMode', name: '阅读模式', icon: 'fa-solid fa-book-open', event: 'readMode', group: 'articlePage'}
982
+ # 右键自定义菜单区域
983
+ menus:
984
+ link:
985
+ - {id: 'help', name: '常见问题', icon: 'fa-solid fa-question', link: 'https://volantis.js.org/faqs/', group: 'link'}
986
+ - {id: 'examples', name: '示例博客', icon: 'fa-solid fa-rss', link: 'https://volantis.js.org/examples/', group: 'link'}
987
+ - {id: 'contributors', name: '加入社区', icon: 'fa-solid fa-fan', link: 'https://volantis.js.org/contributors/', group: 'link'}
988
+ - hr
989
+ - {id: 'source_docs', name: '本站源码', icon: 'fa-solid fa-code-branch', link: 'https://github.com/volantis-x/volantis-docs/', group: 'link'}
990
+ - {id: 'source_theme', name: '主题源码', icon: 'fa-solid fa-code-branch', link: 'https://github.com/volantis-x/hexo-theme-volantis/', group: 'link'}
991
+ darkMode:
992
+ - {id: 'darkMode', name: '暗黑模式', icon: 'fa-solid fa-moon', event: 'volantis.dark.toggle()', group: 'darkMode'}
993
+ ###
994
+
895
995
  # 自定义右键菜单
896
996
  rightmenu:
897
- enable: true
997
+ enable: false
898
998
  faicon: fa # 公共图标类型 fa fal fa-solid fa-duotone
899
999
  # hr: 分割线, music: 音乐控制器
900
1000
  layout: [home, hr, help, examples, contributors, hr, source_docs, source_theme, hr, print, darkmode, reading, music]
@@ -949,14 +1049,15 @@ search:
949
1049
 
950
1050
  ############################### Color Scheme ############################### > start
951
1051
  # Accessibility: 背景色和前景色要有足够的对比度 https://web.dev/color-contrast/
1052
+ # https://ant.design/docs/spec/colors-cn
952
1053
  color_scheme:
953
1054
  # ------------
954
1055
  # 通用颜色
955
1056
  common:
956
1057
  # 主题色
957
- theme: '#44D7B6'
1058
+ theme: '#3dd9b6'
958
1059
  # 链接色
959
- link: '#1b79c4'
1060
+ link: '#2092ec'
960
1061
  # 按钮色
961
1062
  button: '#44D7B6'
962
1063
  # 鼠标放到交互元素上时的色
@@ -1004,40 +1105,43 @@ color_scheme:
1004
1105
  meta: '#888'
1005
1106
  # ------------
1006
1107
  # 暗色主题
1108
+ # https://www.maijisheji.com/2094.html
1007
1109
  dark:
1008
- # 网站背景色
1009
- site_bg: '#222'
1110
+ # 网站最深底色 # Dark Grey 1
1111
+ site_bd: '#121212'
1112
+ # 网站背景色 # Dark Grey 2
1113
+ site_bg: '#1f1f1f'
1114
+ # 卡片背景色 # Dark Grey 3
1115
+ card: '#262626'
1010
1116
  # 网站背景上的文字
1011
- site_inner: '#eee'
1117
+ site_inner: '#eeeeeede'
1012
1118
  # 网站页脚文字
1013
- site_footer: '#aaa'
1014
- # 卡片背景色
1015
- card: '#333'
1119
+ site_footer: '#aaaaaade'
1016
1120
  # 卡片上的普通文字
1017
- text: '#eee'
1121
+ text: '#eeeeeede'
1018
1122
 
1019
- # 区块和代码块背景色
1020
- block: '#3a3a3a'
1021
- # 代码块高亮时的背景色
1022
- codeblock: '#343a3c'
1123
+ # 区块和代码块背景色 # Dark Grey 4
1124
+ block: '#434343'
1125
+ # 代码块高亮时的背景色 # Dark Grey 2
1126
+ codeblock: '#1f1f1f'
1023
1127
  # 行内代码颜色
1024
1128
  inlinecode: '#D56D28'
1025
1129
 
1026
- # 文章部分
1027
- h1: '#eee'
1028
- h2: '#eee'
1029
- h3: '#ddd'
1030
- h4: '#ddd'
1031
- h5: '#ddd'
1032
- h6: '#ddd'
1033
- p: '#bbb'
1034
-
1035
- # 列表文字
1036
- list: '#aaa'
1130
+ # 文章部分 高强度文本的不透明度应为87% 中等重点文字适用于60%
1131
+ h1: '#FFFFFFde' # Dark Grey 8
1132
+ h2: '#FFFFFFde'
1133
+ h3: '#FFFFFF99' # Dark Grey 7
1134
+ h4: '#FFFFFF99'
1135
+ h5: '#FFFFFF99'
1136
+ h6: '#FFFFFF99'
1137
+ p: '#d9d9d9de' # Dark Grey 6
1138
+
1139
+ # 列表文字 # Dark Grey 6
1140
+ list: '#d9d9d9de'
1037
1141
  # 列表 hover 时的文字
1038
1142
  list_hl: 'mix($color-theme, #fff, 80)'
1039
- # 辅助性文字
1040
- meta: '#888'
1143
+ # 辅助性文字 # Dark Grey 5
1144
+ meta: '#bfbfbfde'
1041
1145
  # 夜间图片亮度
1042
1146
  brightness: 70%
1043
1147
  ############################### Color Scheme ############################### > end
@@ -1061,11 +1165,11 @@ custom_css:
1061
1165
  navbar:
1062
1166
  height: 64px
1063
1167
  width: auto # auto, max
1064
- effect: [shadow, blur] # [shadow, floatable, blur]
1168
+ effect: [shadow, floatable, blur] # [shadow, floatable, blur]
1065
1169
  sidebar:
1066
- effect: [shadow] # [shadow, floatable, blur]
1170
+ effect: [shadow, floatable, blur] # [shadow, floatable, blur]
1067
1171
  body:
1068
- effect: [shadow] # [shadow, floatable, blur]
1172
+ effect: [shadow, floatable, blur] # [shadow, floatable, blur]
1069
1173
  highlight:
1070
1174
  language: true # show language of codeblock
1071
1175
  grayscale: false # Enable grayscale effect
@@ -26,7 +26,7 @@
26
26
  </p>
27
27
  </a>
28
28
  </div>
29
- -<% } else if (theme.comments.service=='waline' && theme.comments.waline.visitor) { %>
29
+ <% } else if (theme.comments.service=='waline' && theme.comments.waline.pageview) { %>
30
30
  <div class="new-meta-item browse">
31
31
  <a class='notlink'>
32
32
  <i class="<%- theme.article.body.meta_library.counter.icon %> fa-fw" aria-hidden="true"></i>
@@ -36,21 +36,43 @@
36
36
  path = path.substring(0, path.length - 10);
37
37
  }
38
38
  %>
39
- <span id="<%- url_for(path) %>" class="leancloud_visitors" data-flag-title="<%- post.title || page.title %>">
39
+ <span data-path="<%- url_for(path) %>" class="waline-pageview-count"></span>
40
+ </a>
41
+ </div>
42
+ <% } else if (theme.comments.service=='twikoo' && !!page.comments) { %>
43
+ <div class="new-meta-item browse">
44
+ <a class='notlink'>
45
+ <i class="<%- theme.article.body.meta_library.counter.icon %> fa-fw" aria-hidden="true"></i>
40
46
  <p>
41
- <span class="leancloud-visitors-count"></span>
47
+ <span id="twikoo_visitors">
48
+ <i class="fa-solid fa-circle-notch fa-spin fa-fw" aria-hidden="true"></i>
49
+ </span>
42
50
  </p>
43
51
  </span>
44
52
  </a>
45
53
  </div>
46
- <% } else if (theme.comments.service=='twikoo' && !!page.comments) { %>
54
+ <% } else if (theme.comments.service=='discuss' && !!page.comments) { %>
47
55
  <div class="new-meta-item browse">
48
56
  <a class='notlink'>
49
57
  <i class="<%- theme.article.body.meta_library.counter.icon %> fa-fw" aria-hidden="true"></i>
50
58
  <p>
51
- <span id="twikoo_visitors"></span>
59
+ <span id="Discuss-Visitors">
60
+ <i class="fa-solid fa-circle-notch fa-spin fa-fw" aria-hidden="true"></i>
61
+ </span>
52
62
  </p>
53
63
  </span>
54
64
  </a>
55
65
  </div>
66
+ <% } else if (theme.comments.service=='artalk' && !!page.comments) { %>
67
+ <div class="new-meta-item browse">
68
+ <a class='notlink'>
69
+ <i class="<%- theme.article.body.meta_library.counter.icon %> fa-fw" aria-hidden="true"></i>
70
+ <p>
71
+ <span id="artalk_visitors">
72
+ <i class="fa-solid fa-circle-notch fa-spin fa-fw" aria-hidden="true"></i>
73
+ </span>
74
+ <%- theme.article.body.meta_library.counter.unit %>
75
+ </p>
76
+ </a>
77
+ </div>
56
78
  <% } %>
@@ -5,10 +5,11 @@
5
5
  if (path.length > 9 && (path.substring(path.length - 10) == 'index.html')) {
6
6
  path = path.substring(0, path.length - 10);
7
7
  }
8
+ if(!!theme.comments.waline.path) path = theme.comments.waline.path
8
9
  %>
9
10
  <a href="<%- url_for(path) %>#comments">
10
11
  <i class="<%- theme.article.body.meta_library.walinecount.icon %> fa-fw"></i>
11
- <span id="<%- url_for(path) %>" class="waline-comment-count"></span>
12
+ <span data-path="<%- url_for(path) %>" class="waline-comment-count"></span>
12
13
  <span class="leancloud-comments-count">&nbsp;<%- theme.article.body.meta_library.walinecount.desc %></span>
13
14
  </a>
14
15
  </div>
@@ -114,13 +114,13 @@
114
114
  <div class="prev-next">
115
115
  <% if (post.prev) { %>
116
116
  <a class='prev' href='<%- url_for(post.prev.path) %>'>
117
- <p class='title'><i class="fa-solid fa-chevron-left" aria-hidden="true"></i><%- post.prev.title || '' %></p>
117
+ <p class='title'><i class="fa-solid fa-chevron-left" aria-hidden="true"></i><%- post.prev.title || post.prev.seo_title || date(post.date, theme.article.body.meta_library.date.format) %></p>
118
118
  <p class='content'><%- truncate(strip_html(page.prev.content), {length: 100}) %></p>
119
119
  </a>
120
120
  <% } %>
121
121
  <% if (post.next) { %>
122
122
  <a class='next' href='<%- url_for(post.next.path) %>'>
123
- <p class='title'><%- post.next.title || '' %><i class="fa-solid fa-chevron-right" aria-hidden="true"></i></p>
123
+ <p class='title'><%- post.next.title || post.next.seo_title || date(post.date, theme.article.body.meta_library.date.format) %><i class="fa-solid fa-chevron-right" aria-hidden="true"></i></p>
124
124
  <p class='content'><%- truncate(strip_html(page.next.content), {length: 100}) %></p>
125
125
  </a>
126
126
  <% } %>
@@ -1,5 +1,6 @@
1
1
  <head hexo-theme='https://github.com/volantis-x/hexo-theme-volantis/tree/<%- theme.info.theme_version %>'>
2
2
  <%- meta_generator() %>
3
+ <meta name="Volantis" content="<%- theme.info.theme_version %>">
3
4
  <meta charset="utf-8">
4
5
  <!-- SEO相关 -->
5
6
  <%- generate_seo(theme, page) %>
@@ -21,16 +22,23 @@
21
22
  <meta name="HandheldFriendly" content="True" >
22
23
  <meta name="apple-mobile-web-app-capable" content="yes">
23
24
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
24
- <meta content="<%=config.title%>" name="application-name">
25
- <meta content="<%=config.title%>" name="apple-mobile-web-app-title">
26
25
  <meta content="black-translucent" name="apple-mobile-web-app-status-bar-style">
27
26
  <meta content="telephone=no" name="format-detection">
27
+ <!-- import head_begin begin -->
28
+ <%_ if (config.import && config.import.head_begin){ _%>
29
+ <%_ ([...config.import.head_begin]).forEach(function(item){ _%>
30
+ <%- item %>
31
+ <%_ }) _%>
32
+ <%_ } _%>
33
+ <!-- import head_begin end -->
34
+ <!-- Custom Files headBegin begin-->
35
+ <%- volantis_inject('headBegin') %>
36
+ <!-- Custom Files headBegin end-->
37
+ <%_ if (config.favicon) { _%>
38
+ <link rel="shortcut icon" type='image/x-icon' href="<%- url_for(config.favicon) %>">
39
+ <%_ } _%>
28
40
  <link rel="preload" href="<%- theme.cdn.map.css.style %>" as="style">
29
41
  <%- generate_preload_fontfamily(theme) %>
30
- <!-- 页面元数据 -->
31
- <%- generate_title(config, theme, page) %>
32
- <%- generate_keywords(config, theme, page) %>
33
- <%- open_graph(theme.open_graph) %>
34
42
  <!-- feed -->
35
43
  <%_ if (config.feed && config.feed.path){ _%>
36
44
  <%_ if (typeof(config.feed.path)=="string"){ _%>
@@ -41,22 +49,11 @@
41
49
  <%_ }) _%>
42
50
  <%_ } _%>
43
51
  <%_ } _%>
44
- <!-- import meta -->
45
- <%_ if (config.import && config.import.meta){ _%>
46
- <%_ (config.import.meta||[]).forEach(function(item){ _%>
47
- <%- item %>
48
- <%_ }) _%>
49
- <%_ } _%>
50
- <!-- link -->
51
- <%_ if (config.favicon) { _%>
52
- <link rel="shortcut icon" type='image/x-icon' href="<%- url_for(config.favicon) %>">
53
- <%_ } _%>
54
- <!-- import link -->
55
- <%_ if (config.import && config.import.link){ _%>
56
- <%_ (config.import.link||[]).forEach(function(item){ _%>
57
- <%- item %>
58
- <%_ }) _%>
59
- <%_ } _%>
52
+ <!-- 页面元数据 -->
53
+ <%- generate_title(config, theme, page) %>
54
+ <%- generate_keywords(config, theme, page) %>
55
+ <%- generate_description(config, theme, page) %>
56
+ <%- open_graph(theme.open_graph) %>
60
57
  <style>
61
58
  /* 首屏样式 */
62
59
  <%- FirstCSS() %>
@@ -73,7 +70,14 @@
73
70
  <%_ } _%>
74
71
  <%- partial('../_plugins/end-of-support/script') %>
75
72
  <%- partial('scripts/global') %>
76
- <!-- Custom Files head begin-->
77
- <%- volantis_inject('head') %>
78
- <!-- Custom Files head end-->
73
+ <!-- import head_end begin -->
74
+ <%_ if (config.import && config.import.head_end){ _%>
75
+ <%_ ([...config.import.head_end]).forEach(function(item){ _%>
76
+ <%- item %>
77
+ <%_ }) _%>
78
+ <%_ } _%>
79
+ <!-- import head_end end -->
80
+ <!-- Custom Files headEnd begin-->
81
+ <%- volantis_inject('headEnd') %>
82
+ <!-- Custom Files headEnd end-->
79
83
  </head>
@@ -61,7 +61,7 @@
61
61
  </li>
62
62
  <% } else { %>
63
63
  <li>
64
- <a class="menuitem flat-box faa-parent animated-hover"
64
+ <a class="menuitem flat-box faa-parent animated-hover"
65
65
  <%- value.url ? `href="` + url_for(value.url) + `" title="` + (value.description || value.name) + `"`
66
66
  : ` href="/" onclick="return false;" title="` + (value.description || value.name) + `"` %>
67
67
  <% if (value.rel) { %>
@@ -92,6 +92,7 @@
92
92
  theme.cdn.addJS("app")
93
93
  theme.cdn.addJS("parallax", "plugins/parallax")
94
94
  theme.cdn.addJS("rightMenu", "plugins/rightMenu")
95
+ theme.cdn.addJS("rightMenus", "plugins/rightMenus")
95
96
  theme.cdn.addJS("sites","plugins/tags/sites")
96
97
  theme.cdn.addJS("friends","plugins/tags/friends")
97
98
  theme.cdn.addJS("contributors","plugins/tags/contributors")