hexo-theme-stellar 1.24.1 → 1.26.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 (136) hide show
  1. package/_config.yml +122 -50
  2. package/_data/icons.yml +33 -0
  3. package/_data/widgets.yml +2 -16
  4. package/languages/en.yml +2 -1
  5. package/languages/zh-CN.yml +3 -2
  6. package/languages/zh-TW.yml +3 -2
  7. package/layout/404.ejs +2 -4
  8. package/layout/_partial/cover/index.ejs +5 -5
  9. package/layout/_partial/cover/post_cover.ejs +1 -1
  10. package/layout/_partial/cover/wiki_cover.ejs +2 -2
  11. package/layout/_partial/head.ejs +6 -9
  12. package/layout/_partial/main/article/article_footer.ejs +16 -24
  13. package/layout/_partial/main/article/read_next.ejs +13 -13
  14. package/layout/_partial/main/article/related_posts.ejs +1 -1
  15. package/layout/_partial/main/footer.ejs +1 -1
  16. package/layout/_partial/main/navbar/article_top_area.ejs +35 -0
  17. package/layout/_partial/main/navbar/author_banner.ejs +1 -3
  18. package/layout/_partial/main/navbar/breadcrumb/blog.ejs +34 -0
  19. package/layout/_partial/main/navbar/breadcrumb/page.ejs +10 -0
  20. package/layout/_partial/main/navbar/breadcrumb/wiki.ejs +20 -0
  21. package/layout/_partial/main/navbar/dateinfo.ejs +32 -0
  22. package/layout/_partial/main/navbar/ghinfo.ejs +25 -0
  23. package/layout/_partial/main/navbar/{list_post.ejs → nav_tabs_blog.ejs} +15 -7
  24. package/layout/_partial/main/navbar/{list_wiki.ejs → nav_tabs_wiki.ejs} +15 -1
  25. package/layout/_partial/main/post_list/paginator.ejs +1 -1
  26. package/layout/_partial/main/post_list/post_card.ejs +4 -15
  27. package/layout/_partial/main/post_list/topic_card.ejs +16 -0
  28. package/layout/_partial/menubtn.ejs +1 -1
  29. package/layout/_partial/plugins/ai/tianli_gpt.ejs +4 -3
  30. package/layout/_partial/plugins/comments/artalk/layout.ejs +1 -1
  31. package/layout/_partial/plugins/comments/artalk/script.ejs +1 -1
  32. package/layout/_partial/plugins/comments/beaudar/layout.ejs +1 -1
  33. package/layout/_partial/plugins/comments/giscus/layout.ejs +1 -1
  34. package/layout/_partial/plugins/comments/layout.ejs +3 -3
  35. package/layout/_partial/plugins/comments/twikoo/layout.ejs +1 -1
  36. package/layout/_partial/plugins/comments/utterances/layout.ejs +1 -1
  37. package/layout/_partial/plugins/comments/waline/layout.ejs +1 -1
  38. package/layout/_partial/sidebar/index.ejs +92 -83
  39. package/layout/_partial/sidebar/logo.ejs +87 -0
  40. package/layout/_partial/sidebar/menu.ejs +23 -18
  41. package/layout/_partial/sidebar/search.ejs +42 -0
  42. package/layout/_partial/widgets/components/link.ejs +21 -0
  43. package/layout/_partial/widgets/components/linklist.ejs +27 -0
  44. package/layout/_partial/widgets/ghissues.ejs +7 -9
  45. package/layout/_partial/widgets/ghrepo.ejs +10 -12
  46. package/layout/_partial/widgets/ghuser.ejs +2 -6
  47. package/layout/_partial/widgets/linklist.ejs +17 -0
  48. package/layout/_partial/widgets/markdown.ejs +5 -2
  49. package/layout/_partial/widgets/recent.ejs +12 -8
  50. package/layout/_partial/widgets/related.ejs +51 -20
  51. package/layout/_partial/widgets/search.ejs +0 -40
  52. package/layout/_partial/widgets/tagcloud.ejs +2 -2
  53. package/layout/_partial/widgets/timeline.ejs +2 -2
  54. package/layout/_partial/widgets/toc.ejs +61 -53
  55. package/layout/archive.ejs +3 -3
  56. package/layout/categories.ejs +2 -2
  57. package/layout/index.ejs +10 -62
  58. package/layout/index_topic.ejs +28 -0
  59. package/layout/index_wiki.ejs +42 -0
  60. package/layout/layout.ejs +53 -21
  61. package/layout/page.ejs +60 -13
  62. package/layout/tags.ejs +2 -2
  63. package/package.json +2 -2
  64. package/scripts/events/index.js +5 -0
  65. package/scripts/events/lib/authors.js +1 -1
  66. package/scripts/events/lib/config.js +28 -24
  67. package/scripts/events/lib/doc_tree.js +27 -19
  68. package/scripts/events/lib/merge_posts.js +46 -0
  69. package/scripts/events/lib/topic_tree.js +45 -0
  70. package/scripts/generators/404.js +8 -3
  71. package/scripts/generators/author.js +4 -2
  72. package/scripts/generators/categories.js +4 -4
  73. package/scripts/generators/tags.js +4 -4
  74. package/scripts/generators/topic.js +21 -0
  75. package/scripts/generators/wiki.js +30 -28
  76. package/scripts/helpers/category_color.js +1 -1
  77. package/scripts/helpers/icon.js +16 -0
  78. package/scripts/helpers/parse_config.js +20 -18
  79. package/scripts/helpers/scrollreveal.js +6 -6
  80. package/scripts/tags/lib/audio.js +9 -4
  81. package/scripts/tags/lib/navbar.js +1 -1
  82. package/scripts/tags/lib/toc.js +1 -1
  83. package/scripts/tags/lib/video.js +8 -8
  84. package/source/css/_common/blur.styl +5 -9
  85. package/source/css/_common/cap.styl +1 -1
  86. package/source/css/_common/device.styl +2 -2
  87. package/source/css/_common/highlight.styl +3 -2
  88. package/source/css/_common/layout.styl +6 -0
  89. package/source/css/_common/svg.styl +3 -0
  90. package/source/css/_custom.styl +9 -2
  91. package/source/css/_defines/theme.styl +10 -0
  92. package/source/css/_layout/layout.styl +17 -4
  93. package/source/css/_layout/list.styl +5 -2
  94. package/source/css/_layout/main.styl +5 -4
  95. package/source/css/_layout/md.styl +12 -11
  96. package/source/css/_layout/partial/paginator.styl +2 -2
  97. package/source/css/_layout/partial/related.styl +3 -0
  98. package/source/css/_layout/sidebar/footer.styl +4 -31
  99. package/source/css/_layout/sidebar/{header.styl → logo.styl} +11 -41
  100. package/source/css/_layout/sidebar/menu.styl +53 -0
  101. package/source/css/_layout/sidebar/nav-area.styl +2 -0
  102. package/source/css/_layout/sidebar/search.styl +106 -0
  103. package/source/css/_layout/sidebar/sidebar.styl +21 -31
  104. package/source/css/_layout/tag-plugins/banner.styl +9 -7
  105. package/source/css/_layout/tag-plugins/frame.styl +1 -1
  106. package/source/css/_layout/tag-plugins/okr.styl +0 -1
  107. package/source/css/_layout/tag-plugins/tabs.styl +2 -2
  108. package/source/css/_layout/tag-plugins/toc.styl +1 -1
  109. package/source/css/_layout/widgets/components.styl +49 -0
  110. package/source/css/_layout/widgets/ghrepo.styl +0 -1
  111. package/source/css/_layout/widgets/ghuser.styl +0 -23
  112. package/source/css/_layout/widgets/list.styl +28 -0
  113. package/source/css/_layout/widgets/markdown.styl +20 -0
  114. package/source/css/_layout/widgets/related.styl +36 -5
  115. package/source/css/_layout/widgets/timeline.styl +21 -2
  116. package/source/css/_layout/widgets/toc_blog.styl +1 -1
  117. package/source/css/_layout/widgets/toc_common.styl +12 -12
  118. package/source/css/_layout/widgets/toc_wiki.styl +38 -25
  119. package/source/css/_layout/widgets/widgets.styl +25 -20
  120. package/source/css/_plugins/comments/twikoo.styl +9 -9
  121. package/source/css/_plugins/scrollreveal.styl +1 -1
  122. package/source/css/_plugins/tianli_gpt.styl +12 -14
  123. package/source/js/main.js +5 -2
  124. package/source/js/plugins/copycode.js +3 -3
  125. package/source/js/plugins/fcircle.js +1 -1
  126. package/source/js/plugins/friends.js +1 -1
  127. package/source/js/plugins/memos.js +1 -1
  128. package/source/js/plugins/sites.js +2 -2
  129. package/source/js/plugins/weibo.js +1 -1
  130. package/layout/_partial/main/header/index.ejs +0 -3
  131. package/layout/_partial/main/navbar/breadcrumb.ejs +0 -139
  132. package/layout/_partial/sidebar/header.ejs +0 -59
  133. package/layout/post.ejs +0 -33
  134. package/layout/wiki.ejs +0 -43
  135. package/source/css/_layout/widgets/recent.styl +0 -15
  136. package/source/css/_layout/widgets/search.styl +0 -102
package/_config.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  ######## Stellar info ########
2
2
  stellar:
3
- version: '1.24.1'
3
+ version: '1.26.0'
4
4
  homepage: 'https://xaoxuu.com/wiki/stellar/'
5
5
  repo: 'https://github.com/xaoxuu/hexo-theme-stellar'
6
6
  cdn_css: # Use cdn links instead of /css/main.css
@@ -11,6 +11,7 @@ stellar:
11
11
  preconnect:
12
12
  # - https://gcore.jsdelivr.net
13
13
  # - https://unpkg.com
14
+ # - https://cdn.bootcdn.net
14
15
 
15
16
  open_graph:
16
17
  enable: true
@@ -18,45 +19,102 @@ open_graph:
18
19
 
19
20
 
20
21
  ######## Sidebar ########
21
- sidebar:
22
- logo:
23
- avatar: '[config.avatar](/about/)' # you can set avatar link in _config.yml or '[https://xxx.png](/about/)'
24
- title: '[config.title](/)' # you can set html tag like: '[<img no-lazy height="32px" src="xxx"/>](/)'
25
- menu:
26
- # post: '[btn.blog](/)'
27
- # wiki: '[btn.wiki](/wiki/)'
28
- # friends: '[友链](/friends/)'
29
- # about: '[关于](/about/)'
30
- # Sidebar widgets
31
- widgets:
32
- #### 自动生成的页面 ####
33
- # 主页
34
- home: search, recent, timeline # for home
35
- # 博客索引页
36
- blog_index: search_blog, recent, timeline # for categories/tags/archives
37
- # 文档索引页
38
- wiki_index: search_docs, recent, timeline # for wiki
39
- # 其它(404)
40
- others: search, recent, timeline # for 404 and ...
41
- #### 手动创建的页面 ####
42
- # 文章内页
43
- post: search_blog, toc, ghrepo, ghissues # for pages using 'layout:post'
44
- # 文档内页
45
- wiki: search, toc, ghissues, related # for pages using 'layout:wiki'
46
- # 其它 layout:page 的页面
47
- page: toc, search # for custom pages using 'layout:page'
48
-
49
- ######## Index ########
50
- post-index: # 近期发布 分类 标签 归档 and ...
51
- # '朋友文章': /friends/rss/
22
+ # 左上角显示的 logo 区域,包含图标、大标题、副标题
23
+ logo:
24
+ avatar: '[${config.avatar}](/about/)' # you can set avatar link in _config.yml or '[https://xxx.png](/about/)'
25
+ title: '[${config.title}](/)' # you can set html tag like: '[<img no-lazy height="32px" src="xxx"/>](/)'
26
+ subtitle: '' # '文字1 | 文字2' (鼠标放上去会切换到文字2)
27
+
28
+ # 侧边栏主功能导航菜单
29
+ menubar:
30
+ columns: 4 # 一行多少个
31
+ items: # 可按照自己需求增加,符合以下格式即可
32
+ # id: 页面中高亮的 menu_id
33
+ # theme: 高亮时的颜色,仅 svg 中 fill="currentColor" 时有效
34
+ # icon: 支持 svg/img 标签,可以定义在 icons.yml 文件中,也支持外部图片的 URL
35
+ # title: 标题
36
+ # url: 点击跳转到哪,支持相对路径和绝对路径
37
+ # - id: post
38
+ # theme: '#1BCDFC'
39
+ # icon: solar:documents-bold-duotone
40
+ # title: 博客
41
+ # url: /
42
+ # - id: wiki
43
+ # theme: '#3DC550'
44
+ # icon: solar:notebook-bookmark-bold-duotone
45
+ # title: 文档
46
+ # url: /wiki/
47
+ # - id: explore
48
+ # theme: '#FA6400'
49
+ # icon: solar:planet-bold-duotone
50
+ # title: 探索
51
+ # url: /explore/
52
+ # - id: social
53
+ # theme: '#F44336'
54
+ # icon: solar:chat-square-like-bold-duotone
55
+ # title: 社交
56
+ # url: /friends/
52
57
 
53
58
 
54
59
  ######## Main ########
55
- breadcrumb:
56
- home: home # config.title / config.author / home or custom content
60
+ # 站点主结构树
61
+ site_tree:
62
+ # -- 列表类页面 -- #
63
+ # 主页配置
64
+ home:
65
+ sidebar: welcome, recent, timeline
66
+ # 博客列表页配置
67
+ index_blog:
68
+ base_dir: blog # 只影响自动生成的页面路径
69
+ menu_id: post # 未在 front-matter 中指定 menu_id 时,layout 为 post 的页面默认使用这里配置的 menu_id
70
+ sidebar: welcome, recent, timeline # for categories/tags/archives
71
+ nav_tabs: # 近期发布 分类 标签 专栏 归档 and ...
72
+ # '朋友文章': /friends/rss/
73
+ # 博客专栏列表页配置
74
+ index_topic:
75
+ base_dir: topic # 只影响自动生成的页面路径
76
+ menu_id: post # 未在 front-matter 中指定 menu_id 时,layout 为 topic 的页面默认使用这里配置的 menu_id
77
+ # 文档列表页配置
78
+ index_wiki:
79
+ base_dir: wiki # 只影响自动生成的页面路径
80
+ menu_id: wiki # 未在 front-matter 中指定 menu_id 时,layout 为 wiki 的页面默认使用这里配置的 menu_id
81
+ sidebar: toc, ghissues, related, recent # for wiki
82
+ nav_tabs:
83
+ # 'more': https://github.com/xaoxuu
84
+ # -- 内容类页面 -- #
85
+ # 博客文章内页配置
86
+ post:
87
+ menu_id: post # 未在 front-matter 中指定 menu_id 时,layout 为 post 的页面默认使用这里配置的 menu_id
88
+ sidebar: toc, related, ghrepo, ghissues, recent # for pages using 'layout:post'
89
+ # 博客专栏文章内页配置
90
+ topic:
91
+ menu_id: post
92
+ # 文档内页配置
93
+ wiki:
94
+ menu_id: wiki # 未在 front-matter 中指定 menu_id 时,layout 为 wiki 的页面默认使用这里配置的 menu_id
95
+ sidebar: toc, ghissues, related, recent # for wiki
96
+ # 作者信息配置
97
+ author:
98
+ base_dir: author # 只影响自动生成的页面路径
99
+ menu_id: post
100
+ sidebar: recent, timeline
101
+ # 错误页配置
102
+ error_page:
103
+ menu_id: post
104
+ '404': '/404.html'
105
+ sidebar: recent, timeline
106
+ # 其它自定义页面配置 layout: page
107
+ page:
108
+ sidebar: toc, recent, timeline
109
+
110
+
57
111
 
58
112
  ######## Article ########
59
113
  article:
114
+ # 文章类型,决定布局风格,可以在 front-matter/topic/wiki 中覆盖此参数
115
+ type: tech # tech: 默认技术类文章, story: 图文类文章,文字和段落间增距大
116
+ # 缩进两个文字宽度,适合文字类博客,可以在 front-matter/topic/wiki 中覆盖此参数
117
+ indent: # true / false
60
118
  # 如果没有指定封面,是否根据 tags 作为关键词搜索封面图片?
61
119
  auto_cover: false # search from https://source.unsplash.com/
62
120
  # 封面图宽高比
@@ -189,16 +247,16 @@ comments:
189
247
  footer:
190
248
  social:
191
249
  # github:
192
- # icon: '<img src="https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/social/08a41b181ce68.svg"/>'
250
+ # icon: '<img src="https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/social/08a41b181ce68.svg"/>'
193
251
  # url: /
194
252
  # music:
195
- # icon: '<img src="https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/social/3845874.svg"/>'
253
+ # icon: '<img src="https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/social/3845874.svg"/>'
196
254
  # url: /
197
255
  # unsplash:
198
- # icon: '<img src="https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/social/3616429.svg"/>'
256
+ # icon: '<img src="https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/social/3616429.svg"/>'
199
257
  # url: /
200
258
  # comments:
201
- # icon: '<img src="https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/social/942ebbf1a4b91.svg"/>'
259
+ # icon: '<img src="https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/social/942ebbf1a4b91.svg"/>'
202
260
  # url: /about/#comments
203
261
  sitemap:
204
262
  # '博客':
@@ -327,9 +385,9 @@ plugins:
327
385
  # https://scrollrevealjs.org/api/reveal.html
328
386
  scrollreveal:
329
387
  enable: #true
330
- js: https://gcore.jsdelivr.net/npm/scrollreveal@4.0.9/dist/scrollreveal.min.js
331
- distance: 8px
332
- duration: 500 # ms
388
+ js: https://cdn.bootcdn.net/ajax/libs/scrollReveal.js/4.0.9/scrollreveal.min.js
389
+ distance: 16px
390
+ duration: 800 # ms
333
391
  interval: 100 # ms
334
392
  scale: 1 # 0.1~1
335
393
 
@@ -406,6 +464,7 @@ plugins:
406
464
  enable: false
407
465
  field: post # all, post, wiki
408
466
  api: 5Q5mpqRK5DkwT1X9Gi5e # tianli_gpt key
467
+ limit: 1000 # 设置提交的字数限制,默认为1000字,上限为5000,超过5000字符将被截断,不能为空
409
468
  typingAnimate: true # 打字机动画
410
469
 
411
470
  style:
@@ -413,7 +472,7 @@ style:
413
472
  smooth_scroll: false # true / false 开启时如果目录过长可能无法准确定位
414
473
  font-size:
415
474
  root: 16px
416
- body: .9375rem # 15px
475
+ body: 1rem # 16px
417
476
  code: 85% # 14px
418
477
  codeblock: 0.8125rem # 13px
419
478
  font-family:
@@ -425,7 +484,7 @@ style:
425
484
  border-radius:
426
485
  card: 12px
427
486
  block: 12px
428
- bar: 6px
487
+ bar: 12px
429
488
  image: 6px
430
489
  color:
431
490
  # 动态颜色(会根据明暗主题重设明度值,只用关心色相和饱和度即可)
@@ -443,7 +502,7 @@ style:
443
502
  underline: true # true / false
444
503
  animated_avatar:
445
504
  animate: auto # auto, always
446
- background: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/avatar/round/rainbow64@3x.webp
505
+ background: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/avatar/round/rainbow64@3x.webp
447
506
  codeblock:
448
507
  scrollbar: 4px
449
508
  highlightjs_theme: https://gcore.jsdelivr.net/gh/highlightjs/cdn-release@11.7.0/build/styles/atom-one-dark.min.css
@@ -453,14 +512,27 @@ style:
453
512
  gradient: # https://webgradients.com/
454
513
  start: 'linear-gradient(to right, hsl(215, 95%, 64%), hsl(195, 95%, 60%), hsl(165, 95%, 56%), hsl(165, 95%, 56%), hsl(195 95% 60%), hsl(215, 95%, 64%))'
455
514
  search: 'linear-gradient(to right, #04F3FF, #08FFC6, #DDF730, #FFBD19, #FF1FE0, #C418FF, #04F3FF)'
515
+ sidebar:
516
+ # 可以设置:纯色/渐变色/图片作为背景
517
+ # background: 'linear-gradient(to bottom, #abc3, #abc3)'
518
+ # background: 'linear-gradient(to bottom, #20E2D744, #F9FEA544)'
519
+ # 在图片上层增加高斯模糊效果(同时附带饱和度增强效果)
520
+ background: 'url(https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.13/image/sidebar-bg1@small.jpg)'
521
+ blur: true
522
+ paginator:
523
+ prev: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/arrow/f049bbd4e88ec.svg
524
+ next: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/arrow/064b95430caf4.svg
525
+ error_page: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/404/1c830bfcd517d.svg
456
526
 
457
527
  default:
458
- avatar: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/avatar/round/3442075.svg
459
- link: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/link/8f277b4ee0ecd.svg
460
- cover: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/cover/76b86c0226ffd.svg
461
- image: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/image/2659360.svg
462
- project: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/image/2779789.png
463
- banner: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/banner/books.jpg
528
+ avatar: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/avatar/round/3442075.svg
529
+ link: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/link/8f277b4ee0ecd.svg
530
+ cover: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/cover/76b86c0226ffd.svg
531
+ image: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/image/2659360.svg
532
+ project: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/image/2779789.png
533
+ banner: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/banner/books.jpg
534
+ topic: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/image/10433048.png
535
+
464
536
 
465
537
  api_host:
466
538
  ghapi: https://api.github.com
@@ -0,0 +1,33 @@
1
+
2
+ solar:documents-bold-duotone: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" fill-rule="evenodd" d="M5.879 2.879C5 3.757 5 5.172 5 8v8c0 2.828 0 4.243.879 5.121C6.757 22 8.172 22 11 22h2c2.828 0 4.243 0 5.121-.879C19 20.243 19 18.828 19 16V8c0-2.828 0-4.243-.879-5.121C17.243 2 15.828 2 13 2h-2c-2.828 0-4.243 0-5.121.879M8.25 17a.75.75 0 0 1 .75-.75h3a.75.75 0 0 1 0 1.5H9a.75.75 0 0 1-.75-.75M9 12.25a.75.75 0 0 0 0 1.5h6a.75.75 0 0 0 0-1.5zM8.25 9A.75.75 0 0 1 9 8.25h6a.75.75 0 0 1 0 1.5H9A.75.75 0 0 1 8.25 9" clip-rule="evenodd"/><path fill="currentColor" d="M5.235 4.058C5 4.941 5 6.177 5 8v8c0 1.823 0 3.058.235 3.942L5 19.924c-.975-.096-1.631-.313-2.121-.803C2 18.243 2 16.828 2 14v-4c0-2.829 0-4.243.879-5.121c.49-.49 1.146-.707 2.121-.803zm13.53 15.884C19 19.058 19 17.822 19 16V8c0-1.823 0-3.059-.235-3.942l.235.018c.975.096 1.631.313 2.121.803C22 5.757 22 7.17 22 9.999v4c0 2.83 0 4.243-.879 5.122c-.49.49-1.146.707-2.121.803z" opacity=".5"/></svg>
3
+ solar:chat-square-like-bold-duotone: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="m13.629 20.472l-.542.916c-.483.816-1.69.816-2.174 0l-.542-.916c-.42-.71-.63-1.066-.968-1.262c-.338-.197-.763-.204-1.613-.219c-1.256-.021-2.043-.098-2.703-.372a5 5 0 0 1-2.706-2.706C2 14.995 2 13.83 2 11.5v-1c0-3.273 0-4.91.737-6.112a5 5 0 0 1 1.65-1.651C5.59 2 7.228 2 10.5 2h3c3.273 0 4.91 0 6.113.737a5 5 0 0 1 1.65 1.65C22 5.59 22 7.228 22 10.5v1c0 2.33 0 3.495-.38 4.413a5 5 0 0 1-2.707 2.706c-.66.274-1.447.35-2.703.372c-.85.015-1.275.022-1.613.219c-.338.196-.548.551-.968 1.262" opacity=".5"/><path fill="currentColor" d="M10.99 14.308c-1.327-.978-3.49-2.84-3.49-4.593c0-2.677 2.475-3.677 4.5-1.609c2.025-2.068 4.5-1.068 4.5 1.609c0 1.752-2.163 3.615-3.49 4.593c-.454.335-.681.502-1.01.502c-.329 0-.556-.167-1.01-.502"/></svg>
4
+ solar:planet-bold-duotone: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M20 12a8 8 0 1 1-16 0a8 8 0 0 1 16 0" opacity=".5"/><path fill="currentColor" d="M17.712 5.453c1.047-.193 2.006-.259 2.797-.152c.77.103 1.536.393 1.956 1.064c.446.714.312 1.542-.012 2.258c-.33.728-.918 1.499-1.672 2.268c-1.516 1.547-3.836 3.226-6.597 4.697c-2.763 1.472-5.495 2.484-7.694 2.92c-1.095.217-2.098.299-2.923.201c-.8-.095-1.6-.383-2.032-1.075c-.47-.752-.296-1.63.07-2.379c.375-.768 1.032-1.586 1.872-2.403L4 12.416c0 .219.083.71.168 1.146c.045.23.09.444.123.596c-.652.666-1.098 1.263-1.339 1.756c-.277.567-.208.825-.145.925c.072.116.305.305.937.38c.609.073 1.44.018 2.455-.183c2.02-.4 4.613-1.351 7.28-2.772c2.667-1.42 4.85-3.015 6.23-4.423c.694-.707 1.15-1.334 1.377-1.836c.233-.515.167-.75.107-.844c-.07-.112-.289-.294-.883-.374c-.542-.072-1.272-.041-2.163.112L16.87 5.656c.338-.101.658-.17.842-.203"/></svg>
5
+ solar:notebook-bookmark-bold-duotone: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" fill-rule="evenodd" d="M14.25 4.48v3.057c0 .111 0 .27.02.406a.936.936 0 0 0 .445.683a.96.96 0 0 0 .783.072c.13-.04.272-.108.378-.159L17 8.005l1.124.534c.106.05.248.119.378.16a.958.958 0 0 0 .783-.073a.936.936 0 0 0 .444-.683c.021-.136.021-.295.021-.406V3.031c.113-.005.224-.01.332-.013C21.154 2.98 22 3.86 22 4.933v11.21c0 1.112-.906 2.01-2.015 2.08c-.97.06-2.108.179-2.985.41c-1.082.286-1.99 1.068-3.373 1.436c-.626.167-1.324.257-1.627.323V5.174c.32-.079 1.382-.203 1.674-.371c.184-.107.377-.216.576-.323m5.478 8.338a.75.75 0 0 1-.546.91l-4 1a.75.75 0 0 1-.364-1.456l4-1a.75.75 0 0 1 .91.546" clip-rule="evenodd"/><path fill="currentColor" d="M18.25 3.151c-.62.073-1.23.18-1.75.336a8.2 8.2 0 0 0-.75.27v3.182l.75-.356l.008-.005a1.13 1.13 0 0 1 .492-.13c.047 0 .094.004.138.01c.175.029.315.1.354.12l.009.005l.749.356V3.647z"/><path fill="currentColor" d="M12 5.214c-.334-.064-1.057-.161-1.718-.339C8.938 4.515 8.05 3.765 7 3.487c-.887-.234-2.041-.352-3.018-.412C2.886 3.007 2 3.9 2 4.998v11.146c0 1.11.906 2.01 2.015 2.079c.97.06 2.108.179 2.985.41c.486.129 1.216.431 1.873.726c1.005.451 2.052.797 3.127 1.034z" opacity=".5"/><path fill="currentColor" d="M4.273 12.818a.75.75 0 0 1 .91-.545l4 1a.75.75 0 1 1-.365 1.455l-4-1a.75.75 0 0 1-.545-.91m.909-4.545a.75.75 0 1 0-.364 1.455l4 1a.75.75 0 0 0 .364-1.455z"/></svg>
6
+
7
+
8
+ default:goback: <svg aria-hidden="true" viewBox="0 0 16 16" fill="currentColor"><path fill-rule="evenodd" d="M7.78 12.53a.75.75 0 01-1.06 0L2.47 8.28a.75.75 0 010-1.06l4.25-4.25a.75.75 0 011.06 1.06L4.81 7h7.44a.75.75 0 010 1.5H4.81l2.97 2.97a.75.75 0 010 1.06z"></path></svg>
9
+
10
+ # 必须包含 class="loading"
11
+ default:loading: <svg class="loading" style="vertical-align:middle;fill:currentColor;overflow:hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2709"><path d="M832 512c0-176-144-320-320-320V128c211.2 0 384 172.8 384 384h-64zM192 512c0 176 144 320 320 320v64C300.8 896 128 723.2 128 512h64z" p-id="2710"></path></svg>
12
+
13
+ # 必须包含 class="icon search-icon"
14
+ default:search: <svg t="1705074644177" class="icon search-icon" viewBox="0 0 1025 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1560" width="200" height="200"><path d="M1008.839137 935.96571L792.364903 719.491476a56.783488 56.783488 0 0 0-80.152866 0 358.53545 358.53545 0 1 1 100.857314-335.166073 362.840335 362.840335 0 0 1-3.689902 170.145468 51.248635 51.248635 0 1 0 99.217358 26.444296 462.057693 462.057693 0 1 0-158.255785 242.303546l185.930047 185.725053a51.248635 51.248635 0 0 0 72.568068 0 51.248635 51.248635 0 0 0 0-72.978056z" p-id="1561"></path><path d="M616.479587 615.969233a50.428657 50.428657 0 0 0-61.498362-5.534852 174.655348 174.655348 0 0 1-177.525271 3.484907 49.403684 49.403684 0 0 0-58.833433 6.76482l-3.074918 2.869923a49.403684 49.403684 0 0 0 8.609771 78.10292 277.767601 277.767601 0 0 0 286.992355-5.739847 49.403684 49.403684 0 0 0 8.404776-76.667958z" p-id="1562"></path></svg>
15
+ default:rss: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M5 21q-.825 0-1.412-.587T3 19q0-.825.588-1.412T5 17q.825 0 1.413.588T7 19q0 .825-.587 1.413T5 21m13.5 0q-.65 0-1.088-.475T16.9 19.4q-.275-2.425-1.312-4.537T12.9 11.1q-1.65-1.65-3.762-2.687T4.6 7.1q-.65-.075-1.125-.512T3 5.5q0-.65.45-1.062t1.075-.363q3.075.275 5.763 1.563t4.737 3.337q2.05 2.05 3.338 4.738t1.562 5.762q.05.625-.363 1.075T18.5 21m-6 0q-.625 0-1.075-.437T10.85 19.5q-.225-1.225-.787-2.262T8.65 15.35q-.85-.85-1.888-1.412T4.5 13.15q-.625-.125-1.062-.575T3 11.5q0-.65.45-1.075t1.075-.325q1.825.25 3.413 1.063t2.837 2.062q1.25 1.25 2.063 2.838t1.062 3.412q.1.625-.325 1.075T12.5 21"/></svg>
16
+
17
+ # 必须包含 class="active-icon"
18
+ default:bookmark.active: <svg class="active-icon" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M21 11.098v4.993c0 3.096 0 4.645-.734 5.321c-.35.323-.792.526-1.263.58c-.987.113-2.14-.907-4.445-2.946c-1.02-.901-1.529-1.352-2.118-1.47a2.225 2.225 0 0 0-.88 0c-.59.118-1.099.569-2.118 1.47c-2.305 2.039-3.458 3.059-4.445 2.945a2.238 2.238 0 0 1-1.263-.579C3 20.736 3 19.188 3 16.091v-4.994C3 6.81 3 4.666 4.318 3.333C5.636 2 7.758 2 12 2c4.243 0 6.364 0 7.682 1.332C21 4.665 21 6.81 21 11.098" opacity=".5"/><path fill="currentColor" d="M9 5.25a.75.75 0 0 0 0 1.5h6a.75.75 0 0 0 0-1.5z"/></svg>
19
+
20
+ # 必须包含 class="icon"
21
+ default:sidebar: <svg t="1705412886951" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8331" width="200" height="200"><path d="M638.72 970.666667h-256c-118.186667 0-198.272-25.002667-251.946667-78.72S52.053333 758.186667 52.053333 640V384c0-118.186667 25.002667-198.272 78.72-251.946667S264.533333 53.333333 382.72 53.333333h256c118.186667 0 198.272 25.002667 251.946667 78.72S969.386667 265.813333 969.386667 384v256c0 118.186667-25.002667 198.272-78.72 251.946667S756.906667 970.666667 638.72 970.666667z m-256-853.333334c-100.096 0-165.802667 19.2-206.72 59.946667S116.053333 283.904 116.053333 384v256c0 100.096 19.072 165.802667 59.946667 206.72S282.624 906.666667 382.72 906.666667h256c100.096 0 165.802667-19.072 206.72-59.946667S905.386667 740.096 905.386667 640V384c0-100.096-19.072-165.802667-59.946667-206.72S738.816 117.333333 638.72 117.333333z" p-id="8332"></path><path d="M638.72 970.666667a32 32 0 0 1-32-32V85.333333a32 32 0 0 1 32-32 32 32 0 0 1 32 32v853.333334a32 32 0 0 1-32 32zM340.053333 653.226667a31.914667 31.914667 0 0 1-22.613333-9.386667 32 32 0 0 1 0-45.269333L404.053333 512 317.44 425.386667a32 32 0 0 1 0-45.226667 32 32 0 0 1 45.226667 0l109.226666 109.226667a32 32 0 0 1 0 45.269333L362.666667 643.84a31.914667 31.914667 0 0 1-22.613334 9.386667z" p-id="8333"></path></svg>
22
+ default:pin: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="m12 16.068l-3.771 3.905c-.54.559-.81.839-1.04.935c-.52.22-1.099.032-1.373-.448c-.12-.21-.158-.59-.232-1.35c-.043-.43-.064-.644-.128-.824a1.433 1.433 0 0 0-.835-.864c-.173-.067-.38-.089-.795-.133c-.734-.077-1.101-.116-1.305-.24c-.463-.284-.646-.883-.433-1.422c.094-.237.364-.517.904-1.076L5.456 12l1.238-1.238zl5.306-5.306L18.544 12l2.464 2.55c.54.56.81.84.904 1.076c.213.54.03 1.139-.433 1.423c-.204.124-.57.163-1.305.24c-.414.044-.622.066-.795.133c-.389.149-.69.462-.835.864c-.064.18-.085.394-.128.823c-.075.76-.112 1.14-.232 1.351c-.274.48-.853.669-1.374.448c-.228-.096-.498-.376-1.038-.935z" opacity=".5"/><path fill="currentColor" fill-rule="evenodd" d="M12 16a7 7 0 1 0 0-14a7 7 0 0 0 0 14m0-10c-.284 0-.474.34-.854 1.023l-.098.176c-.108.194-.162.29-.246.354c-.085.064-.19.088-.4.135l-.19.044c-.738.167-1.107.25-1.195.532c-.088.283.164.577.667 1.165l.13.152c.143.167.215.25.247.354c.032.104.021.215 0 .438l-.02.203c-.076.785-.114 1.178.115 1.352c.23.174.576.015 1.267-.303l.178-.082c.197-.09.295-.135.399-.135c.104 0 .202.045.399.135l.178.082c.691.319 1.037.477 1.267.303c.23-.174.191-.567.115-1.352l-.02-.203c-.021-.223-.032-.334 0-.438c.032-.103.104-.187.247-.354l.13-.152c.503-.588.755-.882.667-1.165c-.088-.282-.457-.365-1.195-.532l-.19-.044c-.21-.047-.315-.07-.4-.135c-.084-.064-.138-.16-.246-.354l-.098-.176C12.474 6.34 12.284 6 12 6" clip-rule="evenodd"/></svg>
23
+
24
+ github:logo: <svg aria-hidden="true" role="img" class="color-icon-primary" viewBox="0 0 16 16" width="1em" height="1em" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"></path></svg>
25
+ github:repo: <svg aria-hidden="true" role="img" class="color-icon-primary" viewBox="0 0 16 16" width="1em" height="1em" fill="currentColor" style="user-select:none;overflow:visible"><path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"></path></svg>
26
+ github:star: <svg aria-hidden="true" role="img" class="color-icon-primary" viewBox="0 0 16 16" width="1em" height="1em" fill="currentColor" style="user-select:none;overflow:visible"><path fill-rule="evenodd" d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25zm0 2.445L6.615 5.5a.75.75 0 01-.564.41l-3.097.45 2.24 2.184a.75.75 0 01.216.664l-.528 3.084 2.769-1.456a.75.75 0 01.698 0l2.77 1.456-.53-3.084a.75.75 0 01.216-.664l2.24-2.183-3.096-.45a.75.75 0 01-.564-.41L8 2.694v.001z"></path></svg>
27
+ github:fork: <svg aria-hidden="true" role="img" class="color-icon-primary" viewBox="0 0 16 16" width="1em" height="1em" fill="currentColor" style="user-select:none;overflow:visible"><path fill-rule="evenodd" d="M5 3.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm0 2.122a2.25 2.25 0 10-1.5 0v.878A2.25 2.25 0 005.75 8.5h1.5v2.128a2.251 2.251 0 101.5 0V8.5h1.5a2.25 2.25 0 002.25-2.25v-.878a2.25 2.25 0 10-1.5 0v.878a.75.75 0 01-.75.75h-4.5A.75.75 0 015 6.25v-.878zm3.75 7.378a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm3-8.75a.75.75 0 100-1.5.75.75 0 000 1.5z"></path></svg>
28
+ github:tag: <svg aria-hidden="true" role="img" class="color-icon-primary" viewBox="0 0 16 16" width="1em" height="1em" fill="currentColor" style="user-select:none;overflow:visible"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"></path></svg>
29
+
30
+ share:wechat: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/social/b32ef3da1162a.svg
31
+ share:weibo: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/social/80c07e4dbb303.svg
32
+ share:email: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/social/a1b00e20f425d.svg
33
+ share:link: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/social/8411ed322ced6.svg
package/_data/widgets.yml CHANGED
@@ -2,21 +2,7 @@
2
2
  # layout即组件布局,支持自定义的有:
3
3
  # - markdown: 渲染 md 文本
4
4
  #
5
- search:
6
- layout: search
7
- filter: auto # auto or 'path'
8
5
 
9
-
10
- search_blog:
11
- layout: search
12
- filter: /blog/ # auto or 'path'
13
- placeholder: 文章搜索
14
-
15
- search_docs:
16
- layout: search
17
- filter: /wiki/ # auto or 'path'
18
- placeholder: 文档搜索
19
-
20
6
  ghrepo:
21
7
  layout: ghrepo
22
8
  related:
@@ -33,7 +19,7 @@ ghissues:
33
19
  recent:
34
20
  layout: recent
35
21
  rss: # /atom.xml # npm i hexo-generator-feed
36
- limit: 5 # Count of posts
22
+ limit: 10 # Count of posts
37
23
 
38
24
  # TOC (valid only in layout:post/wiki)
39
25
  toc:
@@ -41,7 +27,7 @@ toc:
41
27
  list_number: false
42
28
  min_depth: 2
43
29
  max_depth: 5
44
- fallback: recent # Use a backup widget when toc does not exist.
30
+ fallback: # recent # Use a backup widget when toc does not exist.
45
31
  collapse: false # true / false / auto
46
32
 
47
33
  # github user info
package/languages/en.yml CHANGED
@@ -2,6 +2,7 @@ btn:
2
2
  home: Home
3
3
  blog: Blog
4
4
  wiki: Wiki
5
+ topic: Topic
5
6
  recent_publish: Recent
6
7
  all_wiki: All Products
7
8
  category: Category
@@ -23,7 +24,7 @@ meta:
23
24
  related_posts: Related Posts
24
25
  comment_title: Join the discussion
25
26
  back_to_top: Back to top
26
- more: 'More %s'
27
+ more: More
27
28
  created_author: '%s posted on'
28
29
  created: 'Posted on'
29
30
  updated: 'Updated on'
@@ -1,7 +1,8 @@
1
1
  btn:
2
2
  home: 主页
3
3
  blog: 文章
4
- wiki: 项目
4
+ wiki: 文档
5
+ topic: 专栏
5
6
  recent_publish: 近期发布
6
7
  all_wiki: 所有项目
7
8
  category: 分类
@@ -23,7 +24,7 @@ meta:
23
24
  related_posts: 您可能感兴趣的文章
24
25
  comment_title: 快来参与讨论吧
25
26
  back_to_top: 回到顶部
26
- more: '更多「%s」'
27
+ more: 更多
27
28
  created_author: 本文由 %s 发布于
28
29
  created: 发布于
29
30
  updated: 更新于
@@ -1,7 +1,8 @@
1
1
  btn:
2
2
  home: 首頁
3
3
  blog: 網誌
4
- wiki: Wiki
4
+ wiki: 文檔
5
+ topic: 專欄
5
6
  recent_publish: 近期發布
6
7
  all_wiki: 所有 Wiki
7
8
  category: 分類
@@ -23,7 +24,7 @@ meta:
23
24
  related_posts: 您可能感興趣的文章
24
25
  comment_title: 參與討論
25
26
  back_to_top: 回到頁首
26
- more: '更多「%s」'
27
+ more: 更多
27
28
  created_author: 本文由 %s 發布於
28
29
  created: 發布於
29
30
  updated: 更新於
package/layout/404.ejs CHANGED
@@ -1,12 +1,10 @@
1
1
  <%
2
- page.menu_id = '404';
3
- page.layout = '404';
4
2
  page.comment_title = '';
5
- page.header = 'auto';
3
+ page.header = false;
6
4
  page.robots = 'none';
7
5
  %>
8
6
  <article class='md-text error-page'>
9
- <h1><img id='error' src='https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/404/1c830bfcd517d.svg' alt='404'></h1>
7
+ <h1><img id='error' src='<%- theme.style.error_page %>' alt='404'></h1>
10
8
  <p class='what'>
11
9
  <strong>
12
10
  <%- __('page.error.what') %>
@@ -1,12 +1,12 @@
1
1
  <%
2
2
  function layoutCover() {
3
- if (page.layout == 'wiki') {
4
- return partial('wiki_cover');
3
+ if (page.wiki) {
4
+ return partial('wiki_cover')
5
5
  }
6
- if (page.layout == 'post') {
7
- return partial('post_cover');
6
+ if (page.layout === 'post') {
7
+ return partial('post_cover')
8
8
  }
9
- return '';
9
+ return ''
10
10
  }
11
11
  %>
12
12
  <%- layoutCover() %>
@@ -26,7 +26,7 @@ function div() {
26
26
  url = 'https://source.unsplash.com/random/2000x400';
27
27
  }
28
28
  }
29
- el += '<div class="l_cover post' + scrollreveal() + '">';
29
+ el += '<div class="l_cover post' + scrollreveal(' ') + '">';
30
30
  el += '<div class="cover">';
31
31
  if (theme.plugins.lazyload && theme.plugins.lazyload.enable) {
32
32
  el += '<div class="lazy img bg" data-bg="' + url + '"></div>';
@@ -1,7 +1,7 @@
1
1
  <%
2
2
  function layoutWikiCover() {
3
3
  var el = '';
4
- let proj = theme.wiki.tree[page.wiki];
4
+ const proj = theme.wiki.tree[page.wiki]
5
5
  if (proj == undefined) {
6
6
  return el;
7
7
  }
@@ -18,7 +18,7 @@ function layoutWikiCover() {
18
18
  if (coverpage === true) {
19
19
  coverpage = ['cover', 'title', 'description'];
20
20
  }
21
- el += '<div class="l_cover wiki' + scrollreveal() + '">';
21
+ el += '<div class="l_cover wiki' + scrollreveal(' ') + '">';
22
22
  el += '<article class="cover-wrap md-text">';
23
23
 
24
24
  if (cover?.length > 0 && coverpage.includes('cover')) {
@@ -1,11 +1,8 @@
1
1
  <%
2
2
  function generate_title() {
3
- if (page.seo_title) {
4
- return page.seo_title;
5
- }
6
3
  if (page.wiki) {
7
- let proj = theme.wiki.tree[page.wiki];
8
- let wiki = (proj && proj.name) || page.wiki;
4
+ const proj = theme.wiki.tree[page.wiki]
5
+ const wiki = proj?.name || page.wiki
9
6
  if (page.title) {
10
7
  return wiki + __('symbol.colon') + page.title + ' - ' + config.title;
11
8
  } else {
@@ -26,10 +23,10 @@ function generate_description() {
26
23
  if (theme.open_graph && theme.open_graph.enable) {
27
24
  return '';
28
25
  }
29
- if (page.layout == 'wiki' && page.wiki) {
30
- let proj = theme.wiki.tree[page.wiki];
31
- if (proj && proj.description) {
32
- return '<meta name="description" content="' + proj.description + '">';
26
+ if (page.wiki) {
27
+ const proj = theme.wiki.tree[page.wiki]
28
+ if (proj?.description) {
29
+ return '<meta name="description" content="' + proj.description + '">'
33
30
  }
34
31
  }
35
32
  if (page.description || page.excerpt || page.content) {
@@ -14,7 +14,7 @@ function layoutDiv() {
14
14
  if (item.length === 0) {
15
15
  return el;
16
16
  }
17
- el += '<div class="article-footer reveal fs14">';
17
+ el += `<div class="article-footer${scrollreveal(' ')} fs14">`
18
18
  if (page.references?.length > 0) {
19
19
  function refList() {
20
20
  var el = '';
@@ -38,12 +38,8 @@ function layoutDiv() {
38
38
  }
39
39
 
40
40
  var license = ''
41
- if (page.layout == 'post') {
42
- if (theme.article.license && (page.license != false)) {
43
- license = page.license || theme.article.license
44
- }
45
- } else if (page.layout == 'wiki' && page.wiki) {
46
- let proj = theme.wiki.tree[page.wiki]
41
+ if (page.wiki) {
42
+ const proj = theme.wiki.tree[page.wiki]
47
43
  if (page.license != null) {
48
44
  license = page.license || theme.article.license
49
45
  } else if (proj?.license != null) {
@@ -53,6 +49,10 @@ function layoutDiv() {
53
49
  license = proj.license
54
50
  }
55
51
  }
52
+ } else if (page.layout == 'post') {
53
+ if (theme.article.license && (page.license != false)) {
54
+ license = page.license || theme.article.license
55
+ }
56
56
  }
57
57
  if (license.length > 0) {
58
58
  var author = null
@@ -75,15 +75,15 @@ function layoutDiv() {
75
75
  }
76
76
 
77
77
  var showSharePlugin = false
78
- if (page.layout == 'post') {
79
- showSharePlugin = page.share != false
80
- } else if (page.layout == 'wiki' && page.wiki) {
81
- let proj = theme.wiki.tree[page.wiki]
78
+ if (page.wiki) {
79
+ const proj = theme.wiki.tree[page.wiki]
82
80
  if (page.share != null) {
83
81
  showSharePlugin = page.share == true
84
82
  } else if (proj != null) {
85
83
  showSharePlugin = proj.share == true
86
84
  }
85
+ } else if (page.layout == 'post') {
86
+ showSharePlugin = page.share != false
87
87
  }
88
88
  if (theme.article.share && showSharePlugin) {
89
89
  function socialButtons() {
@@ -98,30 +98,22 @@ function layoutDiv() {
98
98
  el += ' onclick="util.toggle(&quot;qrcode-wechat&quot)"';
99
99
  } else if (item == 'weibo') {
100
100
  el += ' href="https://service.weibo.com/share/share.php?url=' + page.permalink;
101
- el += '&title=' + (page.seo_title || (page.title + ' - ' + config.title));
101
+ el += '&title=' + page.title + ' - ' + config.title;
102
102
  if (page.layout == 'post' && page.cover) {
103
103
  el += '&pics=' + page.cover;
104
- } else if (page.layout == 'wiki' && page.logo && page.logo.src) {
105
- el += '&pics=' + page.logo.src;
104
+ } else if (page.wiki && page.icon) {
105
+ el += '&pics=' + page.icon;
106
106
  }
107
107
  el += '&summary=' + truncate(page.description || strip_html(page.excerpt || page.content), {length: 120});
108
108
  el += '"';
109
109
  } else if (item == 'email') {
110
- el += ' href="mailto:?subject=' + ((page.title + ' - ' + config.title) || page.seo_title) + '&amp;'
110
+ el += ' href="mailto:?subject=' + page.title + ' - ' + config.title + '&amp;'
111
111
  el += 'body=' + page.permalink + '"';
112
112
  } else if (item == 'link') {
113
113
  el += ' onclick="util.copy(&quot;copy-link&quot;, &quot;' + __('message.copied') + '&quot;)"';
114
114
  }
115
115
  el += '>';
116
- if (item == 'wechat') {
117
- el += '<img src="https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/social/b32ef3da1162a.svg"/>';
118
- } else if (item == 'weibo') {
119
- el += '<img src="https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/social/80c07e4dbb303.svg"/>';
120
- } else if (item == 'email') {
121
- el += '<img src="https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/social/a1b00e20f425d.svg"/>';
122
- } else if (item == 'link') {
123
- el += '<img src="https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/social/8411ed322ced6.svg"/>';
124
- }
116
+ el += icon(`share:${item}`)
125
117
  el += '</a>';
126
118
  }
127
119
  });
@@ -1,16 +1,16 @@
1
1
  <%
2
2
  function layoutDiv() {
3
- var prev,next;
4
- var title = __('meta.read_next');
5
- var title_prev = __('meta.prev');
6
- var title_next = __('meta.next');
3
+ var prev,next
4
+ var title = __('meta.read_next')
5
+ title_prev = __('meta.newer')
6
+ title_next = __('meta.older')
7
7
  if (page.layout === 'post') {
8
- prev = page.prev;
9
- next = page.next;
10
- title_prev = __('meta.newer');
11
- title_next = __('meta.older');
12
- } else if (page.layout === 'wiki' && page.wiki && page.wiki.length > 0) {
13
- let proj = theme.wiki.tree[page.wiki];
8
+ prev = page.prev
9
+ next = page.next
10
+ } else if (page.wiki?.length > 0) {
11
+ var title_prev = __('meta.prev');
12
+ var title_next = __('meta.next');
13
+ const proj = theme.wiki.tree[page.wiki];
14
14
  if (proj) {
15
15
  let ps = proj.pages?.filter(p => p.path == page.path)
16
16
  if (ps?.length > 0) {
@@ -33,14 +33,14 @@ function layoutDiv() {
33
33
  }
34
34
  let el = '';
35
35
  if (prev || next) {
36
- el += '<div class="related-wrap reveal" id="read-next">';
36
+ el += `<div class="related-wrap${scrollreveal(' ')}" id="read-next">`
37
37
  el += '<section class="body">';
38
38
  // prev
39
39
  el += '<div class="item" id="prev">';
40
40
  if (prev) {
41
41
  el += '<div class="note">' + title_prev + '</div>';
42
42
  el += '<a href="' + url_for(prev.path) + '">';
43
- el += prev.title || prev.seo_title || prev.wiki || date(prev.date, config.date_format);
43
+ el += prev.title || prev.wiki || date(prev.date, config.date_format);
44
44
  el += '</a>';
45
45
  }
46
46
  el += '</div>';
@@ -49,7 +49,7 @@ function layoutDiv() {
49
49
  if (next) {
50
50
  el += '<div class="note">' + title_next + '</div>';
51
51
  el += '<a href="' + url_for(next.path) + '">';
52
- el += next.title || next.seo_title || next.wiki || date(next.date, config.date_format);
52
+ el += next.title || next.wiki || date(next.date, config.date_format);
53
53
  el += '</a>';
54
54
  }
55
55
  el += '</div>';