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
@@ -1,5 +1,5 @@
1
1
  .cmt-body.twikoo
2
- --twikoo-lighttext: #ef794f;
2
+ --twikoo-lighttext: $color-theme;
3
3
  --twikoo-secondtext: #909094;
4
4
  --twikoo-emoji-background: #f8f8f8;
5
5
  --twikoo-theme: $color-theme;
@@ -8,14 +8,14 @@
8
8
  .tk-content
9
9
  .vemoji, .tk-owo-emotion
10
10
  width: unset;
11
- border-radius: 0;
11
+ border-radius: $border-image;
12
12
  max-height: 24px;
13
13
  max-width: 100px;
14
14
 
15
15
  img
16
16
  max-width: 400px;
17
17
  max-height: 400px;
18
- border-radius: 8px;
18
+ border-radius: $border-image;
19
19
 
20
20
  .OwO
21
21
  .OwO-body
@@ -58,7 +58,7 @@
58
58
  width: auto
59
59
  border: none
60
60
  padding: 6px 2rem
61
- border-radius: 4px
61
+ border-radius: $border-block
62
62
  background: var(--block)
63
63
  color: var(--text-p1)
64
64
  line-height: 2
@@ -74,7 +74,7 @@
74
74
  margin-bottom: 1rem
75
75
  border: 1px dashed var(--block-border);
76
76
  padding: 1rem;
77
- border-radius: 4px;
77
+ border-radius: $border-block;
78
78
  background: var(--card);
79
79
 
80
80
  &:hover
@@ -86,7 +86,7 @@
86
86
 
87
87
  .tk-submit
88
88
  padding: 1rem 1rem 0 1rem;
89
- border-radius: 4px;
89
+ border-radius: $border-block;
90
90
  background: var(--card);
91
91
 
92
92
  .tk-tag
@@ -108,9 +108,9 @@
108
108
 
109
109
  set_darkmode_comments()
110
110
  .cmt-body.twikoo
111
- --twikoo-lighttext: #f2b94b;
112
- --twikoo-secondtext: #a1a2b8;
113
- --twikoo-theme: #409eff;
111
+ --twikoo-lighttext: $color-link;
112
+ --twikoo-secondtext: var(--text-p2);
113
+ --twikoo-theme: $color-theme;
114
114
 
115
115
  if hexo-config('style.darkmode') == 'auto'
116
116
  @media (prefers-color-scheme: dark)
@@ -1,2 +1,2 @@
1
- .reveal
1
+ .slide-up
2
2
  visibility: hidden
@@ -1,7 +1,7 @@
1
1
  .post-TianliGPT
2
2
  --heo-none: #00000000
3
- --heo-theme = var(--theme-link)
4
- --heo-main: var(--theme-link)
3
+ --heo-theme = $color-theme
4
+ --heo-main: $color-theme
5
5
  --heo-snackbar-time: 5s
6
6
  --heo-theme-none: #4259ef01
7
7
  --heo-background: var(--site-bg)
@@ -18,11 +18,10 @@
18
18
 
19
19
  .post-TianliGPT
20
20
  background: var(--block)
21
- border-radius: 12px
21
+ border-radius: $border-block
22
22
  padding: 12px
23
23
  line-height: 1.3
24
24
  border: var(--style-border-always)
25
- margin: 16px 0
26
25
 
27
26
  @media screen and (max-width: 768px)
28
27
  .post-TianliGPT
@@ -30,7 +29,6 @@
30
29
 
31
30
  .tianliGPT-title
32
31
  display: flex
33
- color: var(--theme-link)
34
32
  border-radius: 8px
35
33
  align-items: center
36
34
  padding: 0 12px
@@ -46,7 +44,7 @@
46
44
  margin-top: 12px
47
45
  padding: 8px 12px
48
46
  background: var(--card)
49
- border-radius: 8px
47
+ border-radius: $border-block
50
48
  border: var(--style-border-always)
51
49
  font-size: 15px
52
50
  line-height: 1.4
@@ -71,15 +69,15 @@
71
69
  transition: 0.3s
72
70
 
73
71
  .tianliGPT-suggestions .tianliGPT-suggestions-item:hover
74
- background: var(--heo-main)
72
+ background: $color-theme
75
73
  color: var(--text-p0)
76
74
 
77
75
  .blinking-cursor
78
- background-color: var(--heo-main)
76
+ background-color: var(--text-p2)
79
77
  width: 10px
80
- height: 16px
78
+ height: 10px
81
79
  display: inline-block
82
- vertical-align: middle
80
+ border-radius: 50%;
83
81
  animation: blinking-cursor 0.5s infinite
84
82
  -webkit-animation: blinking-cursor 0.5s infinite
85
83
  margin-left: 4px
@@ -102,7 +100,7 @@
102
100
 
103
101
  .tianliGPT-tag
104
102
  font-size: 12px
105
- background-color: var(--theme-link)
103
+ background-color: var(--text-p2)
106
104
  color: var(--card)
107
105
  font-weight: bold
108
106
  border-radius: 4px
@@ -116,7 +114,7 @@
116
114
  transition: 0.3s
117
115
 
118
116
  .tianliGPT-tag:hover
119
- background: var(--text-p2)
117
+ background: $color-theme
120
118
  color: var(--card)
121
119
 
122
120
  ins.adsbygoogle
@@ -149,7 +147,7 @@ ins.adsbygoogle
149
147
  .tianliGPT-title-icon svg
150
148
  width: 20px
151
149
  height: 20px
152
- fill: var(--heo-main)
150
+ fill: var(--text-p2)
153
151
 
154
152
  .tianliGPT-title-icon svg path
155
- fill: var(--heo-main)
153
+ fill: var(--text-p2)
package/source/js/main.js CHANGED
@@ -197,13 +197,16 @@ init.registerTabsTag()
197
197
  // scrollreveal
198
198
  if (stellar.plugins.scrollreveal) {
199
199
  stellar.loadScript(stellar.plugins.scrollreveal.js).then(function () {
200
- ScrollReveal().reveal("body .reveal", {
200
+ const slideUp = {
201
201
  distance: stellar.plugins.scrollreveal.distance,
202
202
  duration: stellar.plugins.scrollreveal.duration,
203
203
  interval: stellar.plugins.scrollreveal.interval,
204
204
  scale: stellar.plugins.scrollreveal.scale,
205
+ opacity: 0,
205
206
  easing: "ease-out"
206
- });
207
+ }
208
+ ScrollReveal().reveal('.l_left .slide-up', slideUp)
209
+ ScrollReveal().reveal('.l_main .slide-up', slideUp)
207
210
  })
208
211
  }
209
212
 
@@ -3,7 +3,7 @@ codeElementArr.forEach(code => {
3
3
  // copy btn
4
4
  const codeCopyBtn = document.createElement('div')
5
5
  codeCopyBtn.classList.add('copy-btn')
6
- codeCopyBtn.innerText = stellar.plugins.copycode.default_text
6
+ codeCopyBtn.innerHTML = stellar.plugins.copycode.default_text
7
7
 
8
8
  code.appendChild(codeCopyBtn)
9
9
 
@@ -11,11 +11,11 @@ codeElementArr.forEach(code => {
11
11
  const currentCodeElement = code.children[0]?.innerText
12
12
  await copyCode(currentCodeElement)
13
13
 
14
- codeCopyBtn.innerText = stellar.plugins.copycode.success_text
14
+ codeCopyBtn.innerHTML = stellar.plugins.copycode.success_text
15
15
  codeCopyBtn.classList.add('success')
16
16
  hud.toast(stellar.plugins.copycode.toast, 2500)
17
17
  setTimeout(() => {
18
- codeCopyBtn.innerText = stellar.plugins.copycode.default_text
18
+ codeCopyBtn.innerHTML = stellar.plugins.copycode.default_text
19
19
  codeCopyBtn.classList.remove('success')
20
20
  },3000)
21
21
  })
@@ -86,7 +86,7 @@ $(function () {
86
86
  var cfg = new Object();
87
87
  cfg.el = el;
88
88
  cfg.api = api;
89
- cfg.avatar = 'https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/avatar/round/3442075.svg';
89
+ cfg.avatar = 'https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/avatar/round/3442075.svg';
90
90
  FCircle.layoutDiv(cfg);
91
91
  }
92
92
  });
@@ -78,7 +78,7 @@ $(function () {
78
78
  cfg.el = el;
79
79
  cfg.api = api;
80
80
  cfg.class = el.getAttribute('class');
81
- cfg.avatar = 'https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/avatar/round/3442075.svg';
81
+ cfg.avatar = 'https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/avatar/round/3442075.svg';
82
82
  friendsjs.layout(cfg);
83
83
  }
84
84
  });
@@ -126,7 +126,7 @@ $(function () {
126
126
  cfg.host = api.replace(/https:\/\/(.*?)\/(.*)/i, '$1');
127
127
  cfg.avatar = el.getAttribute('avatar');
128
128
  if (!cfg.avatar) {
129
- cfg.avatar = 'https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/avatar/round/3442075.svg';
129
+ cfg.avatar = 'https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/avatar/round/3442075.svg';
130
130
  }
131
131
  MemosJS.layoutDiv(cfg);
132
132
  }
@@ -80,8 +80,8 @@ $(function () {
80
80
  cfg.class = el.getAttribute('class');
81
81
  cfg.el = el;
82
82
  cfg.api = api;
83
- cfg.avatar = 'https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/link/8f277b4ee0ecd.svg';
84
- cfg.screenshot = 'https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/cover/76b86c0226ffd.svg';
83
+ cfg.avatar = 'https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/link/8f277b4ee0ecd.svg';
84
+ cfg.screenshot = 'https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/cover/76b86c0226ffd.svg';
85
85
  sitesjs.layout(cfg);
86
86
  }
87
87
  });
@@ -110,7 +110,7 @@ $(function () {
110
110
  var cfg = new Object();
111
111
  cfg.el = el;
112
112
  cfg.api = api;
113
- cfg.avatar = 'https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.9/avatar/round/3442075.svg';
113
+ cfg.avatar = 'https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/avatar/round/3442075.svg';
114
114
  weibojs.layoutDiv(cfg);
115
115
  }
116
116
  });
@@ -1,3 +0,0 @@
1
- <% if (page.header != 'auto' && page.header != false) { %>
2
- <%- partial('../../sidebar/header', {where: 'main'}) %>
3
- <% } %>
@@ -1,139 +0,0 @@
1
- <%
2
- function layoutDiv() {
3
- var el = '';
4
- if (page.breadcrumb === false) {
5
- return el;
6
- }
7
- var home_title = __("btn.home");
8
- if (theme.breadcrumb && theme.breadcrumb.home) {
9
- if (theme.breadcrumb.home === 'config.title') {
10
- home_title = config.title;
11
- } else if (theme.breadcrumb.home === 'config.author') {
12
- home_title = config.author;
13
- } else if (theme.breadcrumb.home !== 'home') {
14
- home_title = theme.breadcrumb.home;
15
- }
16
- }
17
- if (page.layout === "post") {
18
- var firstCat = "";
19
- if (page.categories && page.categories.length > 0) {
20
- firstCat = page.categories.data[0].name;
21
- }
22
- el += '<div class="bread-nav fs12">';
23
- el += '<div class="left">';
24
- el += '<div id="breadcrumb">';
25
- el += '<a class="cap breadcrumb" href="' + url_for(config.root) + '">' + home_title + '</a>';
26
- el += '<span class="sep"></span>';
27
- el += '<a class="cap breadcrumb" href="' + url_for(config.index_generator.path) + '">' + __("btn.blog") + '</a>';
28
- if (page.layout == "post" && page.categories && page.categories.length > 0) {
29
- el += '<span class="sep"></span>';
30
- el += list_categories(page.categories, {
31
- class: "cap breadcrumb",
32
- show_count: false,
33
- separator: ' <span class="sep"></span> ',
34
- style: "none"
35
- });
36
- }
37
- el += '</div>';
38
- // 作者
39
- var author = null
40
- if (theme.authors) {
41
- if (page.author?.length > 0 && theme.authors[page.author] != null) {
42
- author = theme.authors[page.author]
43
- } else {
44
- author = theme.default_author
45
- }
46
- }
47
- el += '<div id="post-meta">';
48
- if (author) {
49
- let link = `<a href="${url_for(author.path)}">${author.name}</a>`
50
- el += `<span class="author">${__("meta.created_author", link)}</span>`
51
- } else {
52
- el += `<span class="author">${__("meta.created")}</span>`
53
- }
54
- // 发布日期
55
- el += `
56
- <span class="created"><time datetime="${date_xml(page.date)}">${date(page.date, config.date_format)}</time></span>
57
- `;
58
- // 更新日期
59
- el += `
60
- <span class="updated">${__("symbol.comma") + __("meta.updated")}&nbsp;<time datetime="${date_xml(page.updated)}">${date(page.updated, config.date_format)}</time></span>
61
- `;
62
- el += '</div>';
63
-
64
- el += '</div>';
65
- el += '</div>';
66
- } else if (page.layout === "wiki" && page.wiki && page.wiki.length > 0) {
67
- el += '<div class="bread-nav fs12">';
68
- el += '<div class="left">';
69
- el += '<div id="breadcrumb">';
70
- var nodes = [];
71
- // home
72
- el += '<a class="cap breadcrumb" id="home" href="' + url_for(config.root) + '">' + home_title + '</a>';
73
- nodes.push('/');
74
- // menu_id
75
- el += '<span class="sep"></span>';
76
- if (page.menu_id && theme.sidebar.menu[page.menu_id] && md_link(theme.sidebar.menu[page.menu_id])) {
77
- let url = url_for(md_link(theme.sidebar.menu[page.menu_id]));
78
- nodes.push(url);
79
- el += '<a class="cap breadcrumb" id="menu" href="' + url + '">' + __(md_text(theme.sidebar.menu[page.menu_id])) + '</a>';
80
- } else {
81
- let url = url_for(config.wiki_dir || "/wiki/");
82
- nodes.push(url);
83
- el += '<a class="cap breadcrumb" id="menu" href="' + url + '">' + __("btn.wiki") + '</a>';
84
- }
85
- // 项目名
86
- let proj = theme.wiki.tree[page.wiki];
87
- if (proj != null) {
88
- let url_proj = url_for(proj.homepage?.path);
89
- if (nodes.includes(url_proj) === false) {
90
- el += '<span class="sep"></span>';
91
- el += '<a class="cap breadcrumb" id="proj" href="' + url_proj + '">' + (proj.name || proj.title) + '</a>';
92
- }
93
- }
94
- el += '</div>';
95
- // 更新日期
96
- el += '<div id="post-meta">';
97
- el += `
98
- <span>${__("meta.updated")}&nbsp;<time datetime="${date_xml(page.updated)}">${date(page.updated, config.date_format)}</time></span>
99
- `;
100
- el += '</div>';
101
- el += '</div>';
102
-
103
- const repo = page.repo || proj?.repo
104
- if (repo) {
105
- el += `
106
- <div class="right ghrepo stellar-ghinfo-api" api="${theme.api_host.ghapi}/repos/${repo}">
107
- <a class="repo-link bold" href="https://github.com/${repo}">
108
- <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>
109
- <span type="text">${repo}</span>
110
- </a>
111
- <a class="repo-link" href="https://github.com/${repo}/stargazers">
112
- <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>
113
- <span type="text" id="stargazers_count">0</span><span>stars</span>
114
- </a>
115
- <a class="repo-link" href="https://github.com/${repo}/forks">
116
- <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>
117
- <span type="text" id="forks_count">0</span><span>forks</span>
118
- </a>
119
- </div>
120
- `;
121
- }
122
- el += '</div>';
123
- } else if (page.title || page.seo_title) {
124
- el += `
125
- <div class="bread-nav fs12">
126
- <div class="left">
127
- <div id="breadcrumb">
128
- <a class="cap breadcrumb" href="${url_for(config.root)}">${home_title}</a>
129
- <span class="sep"></span>
130
- <a class="cap breadcrumb" href="${url_for(page.path)}">${page.title || page.seo_title}</a>
131
- </div>
132
- </div>
133
- </div>
134
- `;
135
- }
136
- return el;
137
- }
138
- %>
139
- <%- layoutDiv() %>
@@ -1,59 +0,0 @@
1
- <%
2
- var proj;
3
- if (page.layout === 'wiki' && page.wiki) {
4
- proj = theme.wiki.tree[page.wiki];
5
- }
6
- function layoutTitle(main, url, sub) {
7
- var el = '';
8
- el += '<a class="title" href="' + url_for(url || "/") + '">';
9
- el += '<div class="main" ff="title">' + main + '</div>';
10
- if (sub) {
11
- let arr = sub.split('|');
12
- if (arr.length > 1) {
13
- el += '<div class="sub normal cap">' + arr.shift().trim() + '</div>';
14
- el += '<div class="sub hover cap" style="opacity:0">' + arr.join('|') + '</div>';
15
- } else {
16
- el += '<div class="sub cap">' + sub + '</div>';
17
- }
18
- }
19
- el += '</a>';
20
- return el;
21
- }
22
-
23
- function layoutDiv() {
24
- var el = '';
25
- if (page.layout == 'wiki' && page.menu_id == 'wiki') {
26
- return el;
27
- }
28
- el += '<header class="header';
29
- if (where == 'main') {
30
- el += ' mobile-only';
31
- }
32
- el += '">';
33
-
34
- el += '<div class="logo-wrap">';
35
- if (md_text(theme.sidebar.logo.avatar)) {
36
- el += '<a class="avatar" href="' + url_for(md_link(theme.sidebar.logo.avatar) || "/") + '">';
37
- if (theme.style.animated_avatar.animate) {
38
- el += '<div class="bg" style="opacity:0;background-image:url(' + theme.style.animated_avatar.background + ');"></div>';
39
- }
40
- el += '<img no-lazy class="avatar" src="' + md_text(theme.sidebar.logo.avatar) + '">';
41
- el += '</a>';
42
- }
43
- let main = md_text(theme.sidebar.logo.title);
44
- if (main) {
45
- let url = md_link(theme.sidebar.logo.title);
46
- let sub = config.subtitle;
47
- el += layoutTitle(main, url, sub);
48
- }
49
- el += '</div>';
50
-
51
- if (where != 'main') {
52
- el += partial('menu', {where: where});
53
- }
54
- el += '</header>';
55
- return el;
56
- }
57
- %>
58
-
59
- <%- layoutDiv() %>
package/layout/post.ejs DELETED
@@ -1,33 +0,0 @@
1
- <%
2
- if (page.menu_id == undefined) {
3
- page.menu_id = 'post';
4
- }
5
- if (page.header == undefined) {
6
- page.header = 'auto';
7
- }
8
- function layoutTitle() {
9
- const title = page.h1 != null ? page.h1 : page.title;
10
- if (title && title.length > 0) {
11
- return '<h1 class="article-title"><span>' + title + '</span></h1>';
12
- } else {
13
- return '';
14
- }
15
- }
16
- let post = page;
17
- let heti = '';
18
- if (theme.plugins.heti && theme.plugins.heti.enable) {
19
- heti = ' heti';
20
- }
21
- %>
22
- <%- partial('_partial/main/navbar/breadcrumb') %>
23
- <article class='md-text content<%- heti %> <%- post.layout %><%- post.indent ? ' indent' : '' %><%- scrollreveal() %>'>
24
- <%- layoutTitle() %>
25
- <%- post.content %>
26
- <% if (theme.plugins.tianli_gpt.enable && ['all', 'post'].includes(theme.plugins.tianli_gpt.field)) { %>
27
- <%- partial('_partial/plugins/ai/tianli_gpt') %>
28
- <% } %>
29
- <%- partial('_partial/main/article/article_footer') %>
30
- </article>
31
- <%- partial('_partial/main/article/read_next') %>
32
- <%- partial('_partial/main/article/related_posts') %>
33
- <%- partial('_partial/plugins/comments/layout') %>
package/layout/wiki.ejs DELETED
@@ -1,43 +0,0 @@
1
- <%
2
- if (page.menu_id == undefined) {
3
- page.menu_id = 'wiki';
4
- }
5
- if (page.layout == undefined) {
6
- page.layout = 'wiki_index';
7
- }
8
- if (page.title == undefined) {
9
- if (page.tagName) {
10
- page.title = page.tagName;
11
- } else {
12
- page.title = __('btn.wiki');
13
- }
14
- }
15
- function layoutTitle() {
16
- const title = page.h1 != null ? page.h1 : page.title;
17
- if (title && title.length > 0) {
18
- return '<h1 class="article-title"><span>' + title + '</span></h1>';
19
- } else {
20
- return '';
21
- }
22
- }
23
- %>
24
- <% if (page.layout === 'wiki_index') { %>
25
- <%- partial('index') %>
26
- <% } else { %>
27
- <%
28
- if (page.header == undefined) {
29
- page.header = 'auto';
30
- }
31
- %>
32
- <%- partial('_partial/main/navbar/breadcrumb') %>
33
- <article class='md-text content <%- page.layout %><%- page.indent ? ' indent' : '' %><%- scrollreveal() %>'>
34
- <%- layoutTitle() %>
35
- <%- page.content %>
36
- <% if (theme.plugins.tianli_gpt.enable && ['all', 'wiki'].includes(theme.plugins.tianli_gpt.field)) { %>
37
- <%- partial('_partial/plugins/ai/tianli_gpt') %>
38
- <% } %>
39
- <%- partial('_partial/main/article/article_footer') %>
40
- </article>
41
- <%- partial('_partial/main/article/read_next') %>
42
- <%- partial('_partial/plugins/comments/layout') %>
43
- <% } %>
@@ -1,15 +0,0 @@
1
- .widget-wrapper.recent .widget-body
2
- display: flex
3
- flex-direction: column
4
- align-items: flex-start
5
- margin-top: 0.25rem
6
- a
7
- line-height: 1.2
8
- font-size: $fs-13
9
- margin: 0.25rem 0
10
- .title
11
- font-size: $fs-13
12
- color: var(--text-p2)
13
- &:hover
14
- color: $color-hover
15
-
@@ -1,102 +0,0 @@
1
- .widgets .widget-wrapper.search
2
- margin-bottom: 0
3
-
4
- .search-wrapper
5
- width: 100%
6
- >.search-form
7
- position: sticky
8
- top: 1rem
9
- display: flex
10
- flex-direction: row
11
- align-items: center
12
- transition: 0.38s ease-out
13
- z-index: 0
14
- .search-input
15
- width: 100%
16
- padding: 0.5rem 0
17
- line-height: 1.5
18
- box-sizing: border-box
19
- font-family: $ff-body
20
- font-size: $fs-13
21
- color: var(--text-p0)
22
-
23
-
24
- &.noresult[searching='true']
25
- .search-icon
26
- color: $c-red
27
- .search-form
28
- border: 1px solid $c-red
29
-
30
- .search-no-result
31
- display: none
32
- margin: 1em auto
33
- color: var(--text-p1)
34
- text-align: center
35
- font-size: $fs-14
36
- padding: 2rem
37
- background: var(--block)
38
- border-radius: $border-bar
39
-
40
- #search-result
41
- ul.search-result-list
42
- padding: 0
43
- margin: 0
44
- list-style-type: none
45
- li
46
- margin: 1em auto
47
- &:hover
48
- .search-result-title
49
- color: $color-hover
50
- .search-result-title
51
- color: var(--text-p1)
52
- font-weight: 700
53
- line-height: 1.2
54
-
55
- .search-result-content
56
- overflow: hidden
57
- color: var(--text-p3)
58
- margin: .4em auto
59
- max-height: 13em
60
- text-align: justify
61
- font-size: $fs-12
62
- line-height: 1.2
63
- display: -webkit-box
64
- -webkit-box-orient: vertical
65
- overflow: hidden
66
- -webkit-line-clamp: 3
67
-
68
- .search-keyword
69
- border-bottom: 1px dashed $color-hover
70
- color: $color-hover
71
- font-weight: bold
72
-
73
-
74
-
75
- .search-wrapper.noresult[searching='true']
76
- .search-no-result
77
- display: block
78
-
79
- .widget-wrapper
80
- .search-form
81
- top: 0
82
- background: var(--card)
83
- border: 1px solid var(--block-border)
84
- border-radius: $border-bar
85
- .search-input
86
- text-indent: 0.75rem
87
- padding-right: 2rem
88
- .search-icon
89
- margin: 2px
90
- position absolute
91
- right: 0
92
- pointer-events: none
93
- color: var(--text-p2)
94
- padding: 0.5rem
95
- border-radius: 'calc(%s - 2px)' % $border-bar
96
-
97
- #search-result,.search-no-result
98
- margin-top: 1rem
99
-
100
- .widget-wrapper:not(:first-child)
101
- .search-wrapper
102
- margin-top: -1rem