hexo-theme-stellar 1.25.0 → 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 (117) hide show
  1. package/_config.yml +80 -32
  2. package/_data/icons.yml +33 -0
  3. package/_data/widgets.yml +2 -16
  4. package/languages/zh-CN.yml +1 -1
  5. package/languages/zh-TW.yml +1 -1
  6. package/layout/404.ejs +2 -2
  7. package/layout/_partial/cover/index.ejs +5 -5
  8. package/layout/_partial/cover/post_cover.ejs +1 -1
  9. package/layout/_partial/cover/wiki_cover.ejs +2 -2
  10. package/layout/_partial/head.ejs +5 -8
  11. package/layout/_partial/main/article/article_footer.ejs +7 -15
  12. package/layout/_partial/main/article/read_next.ejs +6 -6
  13. package/layout/_partial/main/article/related_posts.ejs +1 -1
  14. package/layout/_partial/main/footer.ejs +1 -1
  15. package/layout/_partial/main/navbar/article_top_area.ejs +35 -0
  16. package/layout/_partial/main/navbar/author_banner.ejs +1 -3
  17. package/layout/_partial/main/navbar/breadcrumb/blog.ejs +34 -0
  18. package/layout/_partial/main/navbar/breadcrumb/page.ejs +10 -0
  19. package/layout/_partial/main/navbar/breadcrumb/wiki.ejs +20 -0
  20. package/layout/_partial/main/navbar/dateinfo.ejs +32 -0
  21. package/layout/_partial/main/navbar/ghinfo.ejs +25 -0
  22. package/layout/_partial/main/navbar/nav_tabs_blog.ejs +3 -3
  23. package/layout/_partial/main/navbar/nav_tabs_wiki.ejs +2 -2
  24. package/layout/_partial/main/post_list/paginator.ejs +1 -1
  25. package/layout/_partial/main/post_list/post_card.ejs +3 -3
  26. package/layout/_partial/menubtn.ejs +1 -1
  27. package/layout/_partial/plugins/ai/tianli_gpt.ejs +4 -3
  28. package/layout/_partial/plugins/comments/artalk/layout.ejs +1 -1
  29. package/layout/_partial/plugins/comments/artalk/script.ejs +1 -1
  30. package/layout/_partial/plugins/comments/beaudar/layout.ejs +1 -1
  31. package/layout/_partial/plugins/comments/giscus/layout.ejs +1 -1
  32. package/layout/_partial/plugins/comments/layout.ejs +3 -3
  33. package/layout/_partial/plugins/comments/twikoo/layout.ejs +1 -1
  34. package/layout/_partial/plugins/comments/utterances/layout.ejs +1 -1
  35. package/layout/_partial/plugins/comments/waline/layout.ejs +1 -1
  36. package/layout/_partial/sidebar/index.ejs +72 -71
  37. package/layout/_partial/sidebar/logo.ejs +87 -0
  38. package/layout/_partial/sidebar/menu.ejs +23 -18
  39. package/layout/_partial/sidebar/search.ejs +42 -0
  40. package/layout/_partial/widgets/components/link.ejs +21 -0
  41. package/layout/_partial/widgets/components/linklist.ejs +27 -0
  42. package/layout/_partial/widgets/ghissues.ejs +7 -9
  43. package/layout/_partial/widgets/ghrepo.ejs +10 -12
  44. package/layout/_partial/widgets/ghuser.ejs +2 -6
  45. package/layout/_partial/widgets/linklist.ejs +17 -0
  46. package/layout/_partial/widgets/markdown.ejs +5 -2
  47. package/layout/_partial/widgets/recent.ejs +12 -8
  48. package/layout/_partial/widgets/related.ejs +13 -9
  49. package/layout/_partial/widgets/search.ejs +0 -40
  50. package/layout/_partial/widgets/tagcloud.ejs +2 -2
  51. package/layout/_partial/widgets/timeline.ejs +2 -2
  52. package/layout/_partial/widgets/toc.ejs +24 -24
  53. package/layout/archive.ejs +2 -2
  54. package/layout/categories.ejs +1 -1
  55. package/layout/index.ejs +4 -20
  56. package/layout/index_topic.ejs +1 -1
  57. package/layout/index_wiki.ejs +2 -2
  58. package/layout/layout.ejs +53 -21
  59. package/layout/page.ejs +59 -12
  60. package/layout/tags.ejs +1 -1
  61. package/package.json +2 -2
  62. package/scripts/events/lib/config.js +28 -24
  63. package/scripts/events/lib/doc_tree.js +27 -19
  64. package/scripts/events/lib/merge_posts.js +0 -1
  65. package/scripts/generators/topic.js +3 -3
  66. package/scripts/generators/wiki.js +5 -4
  67. package/scripts/helpers/category_color.js +1 -1
  68. package/scripts/helpers/icon.js +16 -0
  69. package/scripts/helpers/parse_config.js +18 -16
  70. package/scripts/helpers/scrollreveal.js +6 -6
  71. package/scripts/tags/lib/toc.js +1 -1
  72. package/source/css/_common/blur.styl +1 -8
  73. package/source/css/_common/cap.styl +1 -1
  74. package/source/css/_common/device.styl +2 -2
  75. package/source/css/_common/highlight.styl +2 -2
  76. package/source/css/_common/layout.styl +6 -0
  77. package/source/css/_common/svg.styl +3 -0
  78. package/source/css/_custom.styl +9 -2
  79. package/source/css/_defines/theme.styl +10 -0
  80. package/source/css/_layout/layout.styl +17 -4
  81. package/source/css/_layout/list.styl +5 -2
  82. package/source/css/_layout/main.styl +5 -4
  83. package/source/css/_layout/md.styl +12 -11
  84. package/source/css/_layout/partial/paginator.styl +2 -2
  85. package/source/css/_layout/sidebar/footer.styl +4 -31
  86. package/source/css/_layout/sidebar/{header.styl → logo.styl} +11 -41
  87. package/source/css/_layout/sidebar/menu.styl +53 -0
  88. package/source/css/_layout/sidebar/nav-area.styl +2 -0
  89. package/source/css/_layout/{widgets → sidebar}/search.styl +51 -50
  90. package/source/css/_layout/sidebar/sidebar.styl +21 -31
  91. package/source/css/_layout/tag-plugins/banner.styl +9 -10
  92. package/source/css/_layout/tag-plugins/okr.styl +0 -1
  93. package/source/css/_layout/tag-plugins/tabs.styl +2 -2
  94. package/source/css/_layout/tag-plugins/toc.styl +1 -1
  95. package/source/css/_layout/widgets/components.styl +49 -0
  96. package/source/css/_layout/widgets/ghrepo.styl +0 -1
  97. package/source/css/_layout/widgets/ghuser.styl +0 -23
  98. package/source/css/_layout/widgets/list.styl +28 -0
  99. package/source/css/_layout/widgets/markdown.styl +20 -0
  100. package/source/css/_layout/widgets/related.styl +36 -5
  101. package/source/css/_layout/widgets/timeline.styl +21 -2
  102. package/source/css/_layout/widgets/toc_blog.styl +1 -1
  103. package/source/css/_layout/widgets/toc_common.styl +12 -12
  104. package/source/css/_layout/widgets/toc_wiki.styl +38 -25
  105. package/source/css/_layout/widgets/widgets.styl +25 -20
  106. package/source/css/_plugins/comments/twikoo.styl +9 -9
  107. package/source/css/_plugins/scrollreveal.styl +1 -1
  108. package/source/css/_plugins/tianli_gpt.styl +12 -14
  109. package/source/js/main.js +5 -2
  110. package/source/js/plugins/copycode.js +3 -3
  111. package/layout/_partial/main/header/index.ejs +0 -3
  112. package/layout/_partial/main/navbar/breadcrumb.ejs +0 -161
  113. package/layout/_partial/sidebar/header.ejs +0 -58
  114. package/layout/post.ejs +0 -33
  115. package/layout/topic.ejs +0 -28
  116. package/layout/wiki.ejs +0 -32
  117. package/source/css/_layout/widgets/recent.styl +0 -15
package/_config.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  ######## Stellar info ########
2
2
  stellar:
3
- version: '1.25.0'
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
@@ -20,66 +21,100 @@ open_graph:
20
21
  ######## Sidebar ########
21
22
  # 左上角显示的 logo 区域,包含图标、大标题、副标题
22
23
  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"/>](/)'
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"/>](/)'
25
26
  subtitle: '' # '文字1 | 文字2' (鼠标放上去会切换到文字2)
26
27
 
27
28
  # 侧边栏主功能导航菜单
28
- # 自己可以增加任意的键值对
29
- # 键:就是 menu_id,后面需要用到
30
- # 值:就是显示的 md 链接,方括号内支持文字和图片标签
31
- menu:
32
- # post: '[btn.blog](/)'
33
- # wiki: '[btn.wiki](/wiki/)'
34
- # friends: '[友链](/friends/)'
35
- # about: '[关于](/about/)'
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/
36
57
 
37
58
 
38
59
  ######## Main ########
39
60
  # 站点主结构树
40
61
  site_tree:
62
+ # -- 列表类页面 -- #
41
63
  # 主页配置
42
64
  home:
43
- sidebar: search, recent, timeline
44
- # 博客配置
45
- blog:
65
+ sidebar: welcome, recent, timeline
66
+ # 博客列表页配置
67
+ index_blog:
46
68
  base_dir: blog # 只影响自动生成的页面路径
47
69
  menu_id: post # 未在 front-matter 中指定 menu_id 时,layout 为 post 的页面默认使用这里配置的 menu_id
48
- sidebar: search_blog, recent, timeline # for categories/tags/archives
70
+ sidebar: welcome, recent, timeline # for categories/tags/archives
49
71
  nav_tabs: # 近期发布 分类 标签 专栏 归档 and ...
50
72
  # '朋友文章': /friends/rss/
51
- # 博客文章配置
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
+ # 博客文章内页配置
52
86
  post:
53
87
  menu_id: post # 未在 front-matter 中指定 menu_id 时,layout 为 post 的页面默认使用这里配置的 menu_id
54
- sidebar: search_blog, toc, related, ghrepo, ghissues # for pages using 'layout:post'
55
- # 博客专栏配置
88
+ sidebar: toc, related, ghrepo, ghissues, recent # for pages using 'layout:post'
89
+ # 博客专栏文章内页配置
56
90
  topic:
57
- base_dir: topic # 只影响自动生成的页面路径
58
- menu_id: post # 未在 front-matter 中指定 menu_id 时,layout 为 topic 的页面默认使用这里配置的 menu_id
59
- sidebar: search_blog, toc, related # for topic
60
- # wiki配置
91
+ menu_id: post
92
+ # 文档内页配置
61
93
  wiki:
62
- base_dir: wiki # 只影响自动生成的页面路径
63
94
  menu_id: wiki # 未在 front-matter 中指定 menu_id 时,layout 为 wiki 的页面默认使用这里配置的 menu_id
64
- sidebar: search_docs, ghissues, related, recent, timeline # for wiki
95
+ sidebar: toc, ghissues, related, recent # for wiki
65
96
  # 作者信息配置
66
97
  author:
67
98
  base_dir: author # 只影响自动生成的页面路径
68
99
  menu_id: post
69
- sidebar: search_blog, recent, timeline
100
+ sidebar: recent, timeline
70
101
  # 错误页配置
71
102
  error_page:
72
103
  menu_id: post
73
104
  '404': '/404.html'
74
- sidebar: search, recent, timeline
105
+ sidebar: recent, timeline
75
106
  # 其它自定义页面配置 layout: page
76
107
  page:
77
- sidebar: toc, search
108
+ sidebar: toc, recent, timeline
78
109
 
79
110
 
80
111
 
81
112
  ######## Article ########
82
113
  article:
114
+ # 文章类型,决定布局风格,可以在 front-matter/topic/wiki 中覆盖此参数
115
+ type: tech # tech: 默认技术类文章, story: 图文类文章,文字和段落间增距大
116
+ # 缩进两个文字宽度,适合文字类博客,可以在 front-matter/topic/wiki 中覆盖此参数
117
+ indent: # true / false
83
118
  # 如果没有指定封面,是否根据 tags 作为关键词搜索封面图片?
84
119
  auto_cover: false # search from https://source.unsplash.com/
85
120
  # 封面图宽高比
@@ -350,9 +385,9 @@ plugins:
350
385
  # https://scrollrevealjs.org/api/reveal.html
351
386
  scrollreveal:
352
387
  enable: #true
353
- js: https://gcore.jsdelivr.net/npm/scrollreveal@4.0.9/dist/scrollreveal.min.js
354
- distance: 8px
355
- 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
356
391
  interval: 100 # ms
357
392
  scale: 1 # 0.1~1
358
393
 
@@ -429,6 +464,7 @@ plugins:
429
464
  enable: false
430
465
  field: post # all, post, wiki
431
466
  api: 5Q5mpqRK5DkwT1X9Gi5e # tianli_gpt key
467
+ limit: 1000 # 设置提交的字数限制,默认为1000字,上限为5000,超过5000字符将被截断,不能为空
432
468
  typingAnimate: true # 打字机动画
433
469
 
434
470
  style:
@@ -436,7 +472,7 @@ style:
436
472
  smooth_scroll: false # true / false 开启时如果目录过长可能无法准确定位
437
473
  font-size:
438
474
  root: 16px
439
- body: .9375rem # 15px
475
+ body: 1rem # 16px
440
476
  code: 85% # 14px
441
477
  codeblock: 0.8125rem # 13px
442
478
  font-family:
@@ -448,7 +484,7 @@ style:
448
484
  border-radius:
449
485
  card: 12px
450
486
  block: 12px
451
- bar: 6px
487
+ bar: 12px
452
488
  image: 6px
453
489
  color:
454
490
  # 动态颜色(会根据明暗主题重设明度值,只用关心色相和饱和度即可)
@@ -476,6 +512,17 @@ style:
476
512
  gradient: # https://webgradients.com/
477
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%))'
478
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
479
526
 
480
527
  default:
481
528
  avatar: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/avatar/round/3442075.svg
@@ -486,6 +533,7 @@ default:
486
533
  banner: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/banner/books.jpg
487
534
  topic: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/image/10433048.png
488
535
 
536
+
489
537
  api_host:
490
538
  ghapi: https://api.github.com
491
539
  ghraw: https://raw.githubusercontent.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
@@ -1,7 +1,7 @@
1
1
  btn:
2
2
  home: 主页
3
3
  blog: 文章
4
- wiki: 项目
4
+ wiki: 文档
5
5
  topic: 专栏
6
6
  recent_publish: 近期发布
7
7
  all_wiki: 所有项目
@@ -1,7 +1,7 @@
1
1
  btn:
2
2
  home: 首頁
3
3
  blog: 網誌
4
- wiki: Wiki
4
+ wiki: 文檔
5
5
  topic: 專欄
6
6
  recent_publish: 近期發布
7
7
  all_wiki: 所有 Wiki
package/layout/404.ejs CHANGED
@@ -1,10 +1,10 @@
1
1
  <%
2
2
  page.comment_title = '';
3
- page.header = 'auto';
3
+ page.header = false;
4
4
  page.robots = 'none';
5
5
  %>
6
6
  <article class='md-text error-page'>
7
- <h1><img id='error' src='https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/404/1c830bfcd517d.svg' alt='404'></h1>
7
+ <h1><img id='error' src='<%- theme.style.error_page %>' alt='404'></h1>
8
8
  <p class='what'>
9
9
  <strong>
10
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 {
@@ -27,9 +24,9 @@ function generate_description() {
27
24
  return '';
28
25
  }
29
26
  if (page.wiki) {
30
- let proj = theme.wiki.tree[page.wiki];
31
- if (proj && proj.description) {
32
- return '<meta name="description" content="' + proj.description + '">';
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 = '';
@@ -39,7 +39,7 @@ function layoutDiv() {
39
39
 
40
40
  var license = ''
41
41
  if (page.wiki) {
42
- let proj = theme.wiki.tree[page.wiki]
42
+ const proj = theme.wiki.tree[page.wiki]
43
43
  if (page.license != null) {
44
44
  license = page.license || theme.article.license
45
45
  } else if (proj?.license != null) {
@@ -76,7 +76,7 @@ function layoutDiv() {
76
76
 
77
77
  var showSharePlugin = false
78
78
  if (page.wiki) {
79
- let proj = theme.wiki.tree[page.wiki]
79
+ const proj = theme.wiki.tree[page.wiki]
80
80
  if (page.share != null) {
81
81
  showSharePlugin = page.share == true
82
82
  } else if (proj != null) {
@@ -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.icon) {
104
+ } else if (page.wiki && page.icon) {
105
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.12/social/b32ef3da1162a.svg"/>';
118
- } else if (item == 'weibo') {
119
- el += '<img src="https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/social/80c07e4dbb303.svg"/>';
120
- } else if (item == 'email') {
121
- el += '<img src="https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/social/a1b00e20f425d.svg"/>';
122
- } else if (item == 'link') {
123
- el += '<img src="https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/social/8411ed322ced6.svg"/>';
124
- }
116
+ el += icon(`share:${item}`)
125
117
  el += '</a>';
126
118
  }
127
119
  });
@@ -4,13 +4,13 @@ function layoutDiv() {
4
4
  var title = __('meta.read_next')
5
5
  title_prev = __('meta.newer')
6
6
  title_next = __('meta.older')
7
- if (page.layout === 'post' || page.layout === 'topic') {
7
+ if (page.layout === 'post') {
8
8
  prev = page.prev
9
9
  next = page.next
10
- } else if (page.layout === 'wiki' && page.wiki?.length > 0) {
10
+ } else if (page.wiki?.length > 0) {
11
11
  var title_prev = __('meta.prev');
12
12
  var title_next = __('meta.next');
13
- let proj = theme.wiki.tree[page.wiki];
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>';
@@ -2,7 +2,7 @@
2
2
  function layoutDiv() {
3
3
  if (theme.article.related_posts.enable) {
4
4
  var el = '';
5
- el += '<div class="related-wrap reveal" id="related-posts">';
5
+ el += `<div class="related-wrap${scrollreveal(' ')}" id="related-posts">`
6
6
  el += popular_posts_wrapper({
7
7
  title: __('meta.related_posts'),
8
8
  json: popular_posts_json({ maxCount: theme.article.related_posts.max_count , ulClass: 'related-posts' , PPMixingRate: 0.2 , isImage: true , isExcerpt: true} , page )
@@ -2,7 +2,7 @@
2
2
  const content = theme.footer.content?.replace('${author.name}', (config.author || 'Anonymity'))?.replace('${theme.name}', stellar_info('name'))?.replace('${theme.version}', stellar_info('version'))?.replace('${theme.tree}', stellar_info('tree'))
3
3
  function layoutDiv() {
4
4
  var el = ''
5
- el += '<footer class="page-footer reveal fs12">'
5
+ el += `<footer class="page-footer${scrollreveal(' ')} fs12">`
6
6
  el += '<hr>'
7
7
  // sitemap
8
8
  if (theme.footer.sitemap && Object.keys(theme.footer.sitemap).length > 0) {
@@ -0,0 +1,35 @@
1
+ <%
2
+ function layoutDiv() {
3
+ if (page.breadcrumb === false) {
4
+ return ''
5
+ }
6
+ var el = ''
7
+ // 1.main
8
+ el += `<div class="bread-nav fs12">`
9
+ // 2.left
10
+ el += `<div class="left">`
11
+ // 3.left.top: 面包屑导航
12
+ el += `<div id="breadcrumb">`
13
+ // 首页
14
+ el += `<a class="cap breadcrumb" href="${url_for(config.root)}">${__("btn.home")}</a>`
15
+ if (theme.wiki.tree[page.wiki]) {
16
+ el += partial('breadcrumb/wiki')
17
+ } else if (page.layout == 'post') {
18
+ el += partial('breadcrumb/blog')
19
+ } else {
20
+ el += partial('breadcrumb/page')
21
+ }
22
+ // end 3.left.top
23
+ el += `</div>`
24
+ // 3.left.bottom
25
+ el += partial('dateinfo')
26
+ // end 2.left
27
+ el += `</div>`
28
+ // 2.right
29
+ el += partial('ghinfo')
30
+ // end 1.main
31
+ el += `</div>`
32
+ return el
33
+ }
34
+ %>
35
+ <%- layoutDiv() %>
@@ -10,9 +10,7 @@ function layoutDiv() {
10
10
  <div class="content">
11
11
  <div class="top">
12
12
  <button class="back cap" onclick="window.history.back()">
13
- <svg aria-hidden="true" viewBox="0 0 16 16" fill="currentColor">
14
- <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>
15
- </svg>
13
+ ${icon('default:goback')}
16
14
  </button>
17
15
  </div>
18
16
  <div class="bottom">
@@ -0,0 +1,34 @@
1
+ <%
2
+ function layoutDiv() {
3
+ const topicObject = theme.topic.tree[page.topic]
4
+ var el = ''
5
+ if (topicObject) { // 专栏文章
6
+ // 专栏列表页
7
+ const topicIndexPageURL = url_for(theme.site_tree.index_topic.base_dir)
8
+ el += `<span class="sep"></span>`
9
+ el += `<a class="cap breadcrumb" id="menu" href="${topicIndexPageURL}">${__("btn.topic")}</a>`
10
+ // 专栏项目名
11
+ const topicHomePageURL = url_for(topicObject.homepage?.path);
12
+ if (topicHomePageURL != topicIndexPageURL) {
13
+ el += `<span class="sep"></span>`
14
+ el += `<a class="cap breadcrumb" id="proj" href="${topicHomePageURL}">${topicObject.name || topicObject.title}</a>`
15
+ }
16
+ } else { // 普通文章
17
+ // 文章列表页
18
+ el += `<span class="sep"></span>`
19
+ el += `<a class="cap breadcrumb" href="${url_for(config.index_generator.path)}">${__("btn.blog")}</a>`
20
+ // 分类列表页
21
+ if (page.categories?.length > 0) {
22
+ el += `<span class="sep"></span>`
23
+ el += list_categories(page.categories, {
24
+ class: "cap breadcrumb",
25
+ show_count: false,
26
+ separator: ' <span class="sep"></span> ',
27
+ style: "none"
28
+ })
29
+ }
30
+ }
31
+ return el
32
+ }
33
+ %>
34
+ <%- layoutDiv() %>
@@ -0,0 +1,10 @@
1
+ <%
2
+ function layoutDiv() {
3
+ // 普通页面就显示当前页面
4
+ return `
5
+ <span class="sep"></span>
6
+ <a class="cap breadcrumb" href="${url_for(page.path)}">${page.title}</a>
7
+ `
8
+ }
9
+ %>
10
+ <%- layoutDiv() %>