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.
- package/_config.yml +122 -50
- package/_data/icons.yml +33 -0
- package/_data/widgets.yml +2 -16
- package/languages/en.yml +2 -1
- package/languages/zh-CN.yml +3 -2
- package/languages/zh-TW.yml +3 -2
- package/layout/404.ejs +2 -4
- package/layout/_partial/cover/index.ejs +5 -5
- package/layout/_partial/cover/post_cover.ejs +1 -1
- package/layout/_partial/cover/wiki_cover.ejs +2 -2
- package/layout/_partial/head.ejs +6 -9
- package/layout/_partial/main/article/article_footer.ejs +16 -24
- package/layout/_partial/main/article/read_next.ejs +13 -13
- package/layout/_partial/main/article/related_posts.ejs +1 -1
- package/layout/_partial/main/footer.ejs +1 -1
- package/layout/_partial/main/navbar/article_top_area.ejs +35 -0
- package/layout/_partial/main/navbar/author_banner.ejs +1 -3
- package/layout/_partial/main/navbar/breadcrumb/blog.ejs +34 -0
- package/layout/_partial/main/navbar/breadcrumb/page.ejs +10 -0
- package/layout/_partial/main/navbar/breadcrumb/wiki.ejs +20 -0
- package/layout/_partial/main/navbar/dateinfo.ejs +32 -0
- package/layout/_partial/main/navbar/ghinfo.ejs +25 -0
- package/layout/_partial/main/navbar/{list_post.ejs → nav_tabs_blog.ejs} +15 -7
- package/layout/_partial/main/navbar/{list_wiki.ejs → nav_tabs_wiki.ejs} +15 -1
- package/layout/_partial/main/post_list/paginator.ejs +1 -1
- package/layout/_partial/main/post_list/post_card.ejs +4 -15
- package/layout/_partial/main/post_list/topic_card.ejs +16 -0
- package/layout/_partial/menubtn.ejs +1 -1
- package/layout/_partial/plugins/ai/tianli_gpt.ejs +4 -3
- package/layout/_partial/plugins/comments/artalk/layout.ejs +1 -1
- package/layout/_partial/plugins/comments/artalk/script.ejs +1 -1
- package/layout/_partial/plugins/comments/beaudar/layout.ejs +1 -1
- package/layout/_partial/plugins/comments/giscus/layout.ejs +1 -1
- package/layout/_partial/plugins/comments/layout.ejs +3 -3
- package/layout/_partial/plugins/comments/twikoo/layout.ejs +1 -1
- package/layout/_partial/plugins/comments/utterances/layout.ejs +1 -1
- package/layout/_partial/plugins/comments/waline/layout.ejs +1 -1
- package/layout/_partial/sidebar/index.ejs +92 -83
- package/layout/_partial/sidebar/logo.ejs +87 -0
- package/layout/_partial/sidebar/menu.ejs +23 -18
- package/layout/_partial/sidebar/search.ejs +42 -0
- package/layout/_partial/widgets/components/link.ejs +21 -0
- package/layout/_partial/widgets/components/linklist.ejs +27 -0
- package/layout/_partial/widgets/ghissues.ejs +7 -9
- package/layout/_partial/widgets/ghrepo.ejs +10 -12
- package/layout/_partial/widgets/ghuser.ejs +2 -6
- package/layout/_partial/widgets/linklist.ejs +17 -0
- package/layout/_partial/widgets/markdown.ejs +5 -2
- package/layout/_partial/widgets/recent.ejs +12 -8
- package/layout/_partial/widgets/related.ejs +51 -20
- package/layout/_partial/widgets/search.ejs +0 -40
- package/layout/_partial/widgets/tagcloud.ejs +2 -2
- package/layout/_partial/widgets/timeline.ejs +2 -2
- package/layout/_partial/widgets/toc.ejs +61 -53
- package/layout/archive.ejs +3 -3
- package/layout/categories.ejs +2 -2
- package/layout/index.ejs +10 -62
- package/layout/index_topic.ejs +28 -0
- package/layout/index_wiki.ejs +42 -0
- package/layout/layout.ejs +53 -21
- package/layout/page.ejs +60 -13
- package/layout/tags.ejs +2 -2
- package/package.json +2 -2
- package/scripts/events/index.js +5 -0
- package/scripts/events/lib/authors.js +1 -1
- package/scripts/events/lib/config.js +28 -24
- package/scripts/events/lib/doc_tree.js +27 -19
- package/scripts/events/lib/merge_posts.js +46 -0
- package/scripts/events/lib/topic_tree.js +45 -0
- package/scripts/generators/404.js +8 -3
- package/scripts/generators/author.js +4 -2
- package/scripts/generators/categories.js +4 -4
- package/scripts/generators/tags.js +4 -4
- package/scripts/generators/topic.js +21 -0
- package/scripts/generators/wiki.js +30 -28
- package/scripts/helpers/category_color.js +1 -1
- package/scripts/helpers/icon.js +16 -0
- package/scripts/helpers/parse_config.js +20 -18
- package/scripts/helpers/scrollreveal.js +6 -6
- package/scripts/tags/lib/audio.js +9 -4
- package/scripts/tags/lib/navbar.js +1 -1
- package/scripts/tags/lib/toc.js +1 -1
- package/scripts/tags/lib/video.js +8 -8
- package/source/css/_common/blur.styl +5 -9
- package/source/css/_common/cap.styl +1 -1
- package/source/css/_common/device.styl +2 -2
- package/source/css/_common/highlight.styl +3 -2
- package/source/css/_common/layout.styl +6 -0
- package/source/css/_common/svg.styl +3 -0
- package/source/css/_custom.styl +9 -2
- package/source/css/_defines/theme.styl +10 -0
- package/source/css/_layout/layout.styl +17 -4
- package/source/css/_layout/list.styl +5 -2
- package/source/css/_layout/main.styl +5 -4
- package/source/css/_layout/md.styl +12 -11
- package/source/css/_layout/partial/paginator.styl +2 -2
- package/source/css/_layout/partial/related.styl +3 -0
- package/source/css/_layout/sidebar/footer.styl +4 -31
- package/source/css/_layout/sidebar/{header.styl → logo.styl} +11 -41
- package/source/css/_layout/sidebar/menu.styl +53 -0
- package/source/css/_layout/sidebar/nav-area.styl +2 -0
- package/source/css/_layout/sidebar/search.styl +106 -0
- package/source/css/_layout/sidebar/sidebar.styl +21 -31
- package/source/css/_layout/tag-plugins/banner.styl +9 -7
- package/source/css/_layout/tag-plugins/frame.styl +1 -1
- package/source/css/_layout/tag-plugins/okr.styl +0 -1
- package/source/css/_layout/tag-plugins/tabs.styl +2 -2
- package/source/css/_layout/tag-plugins/toc.styl +1 -1
- package/source/css/_layout/widgets/components.styl +49 -0
- package/source/css/_layout/widgets/ghrepo.styl +0 -1
- package/source/css/_layout/widgets/ghuser.styl +0 -23
- package/source/css/_layout/widgets/list.styl +28 -0
- package/source/css/_layout/widgets/markdown.styl +20 -0
- package/source/css/_layout/widgets/related.styl +36 -5
- package/source/css/_layout/widgets/timeline.styl +21 -2
- package/source/css/_layout/widgets/toc_blog.styl +1 -1
- package/source/css/_layout/widgets/toc_common.styl +12 -12
- package/source/css/_layout/widgets/toc_wiki.styl +38 -25
- package/source/css/_layout/widgets/widgets.styl +25 -20
- package/source/css/_plugins/comments/twikoo.styl +9 -9
- package/source/css/_plugins/scrollreveal.styl +1 -1
- package/source/css/_plugins/tianli_gpt.styl +12 -14
- package/source/js/main.js +5 -2
- package/source/js/plugins/copycode.js +3 -3
- package/source/js/plugins/fcircle.js +1 -1
- package/source/js/plugins/friends.js +1 -1
- package/source/js/plugins/memos.js +1 -1
- package/source/js/plugins/sites.js +2 -2
- package/source/js/plugins/weibo.js +1 -1
- package/layout/_partial/main/header/index.ejs +0 -3
- package/layout/_partial/main/navbar/breadcrumb.ejs +0 -139
- package/layout/_partial/sidebar/header.ejs +0 -59
- package/layout/post.ejs +0 -33
- package/layout/wiki.ejs +0 -43
- package/source/css/_layout/widgets/recent.styl +0 -15
- package/source/css/_layout/widgets/search.styl +0 -102
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
function layoutDiv() {
|
|
3
3
|
if (theme.article.related_posts.enable) {
|
|
4
4
|
var el = '';
|
|
5
|
-
el +=
|
|
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 +=
|
|
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
|
-
|
|
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,20 @@
|
|
|
1
|
+
<%
|
|
2
|
+
function layoutDiv() {
|
|
3
|
+
const wikiObject = theme.wiki.tree[page.wiki]
|
|
4
|
+
var el = ''
|
|
5
|
+
// 文档列表页
|
|
6
|
+
el += `<span class="sep"></span>`
|
|
7
|
+
const wikiIndexPageURL = url_for(theme.site_tree.index_wiki.base_dir)
|
|
8
|
+
el += `<a class="cap breadcrumb" id="menu" href="${wikiIndexPageURL}">${__("btn.wiki")}</a>`
|
|
9
|
+
if (wikiObject) {
|
|
10
|
+
// 文档项目名
|
|
11
|
+
const wikiHomePageURL = url_for(wikiObject.homepage?.path);
|
|
12
|
+
if (wikiHomePageURL != wikiIndexPageURL) {
|
|
13
|
+
el += `<span class="sep"></span>`
|
|
14
|
+
el += `<a class="cap breadcrumb" id="proj" href="${wikiHomePageURL}">${wikiObject.name || wikiObject.title}</a>`
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return el
|
|
18
|
+
}
|
|
19
|
+
%>
|
|
20
|
+
<%- layoutDiv() %>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<%
|
|
2
|
+
function layoutDiv() {
|
|
3
|
+
// 作者
|
|
4
|
+
const author = theme.authors ? (theme.authors[page.author] || theme.default_author) : null
|
|
5
|
+
var el = ''
|
|
6
|
+
el += `<div id="post-meta">`
|
|
7
|
+
if (page.wiki) {
|
|
8
|
+
el += `<span class="author">${__("meta.updated") + __("symbol.colon")}</span>`
|
|
9
|
+
el += `<time datetime="${date_xml(page.updated)}">${date(page.updated, config.date_format)}</time>`
|
|
10
|
+
el += `</span>`
|
|
11
|
+
} else {
|
|
12
|
+
if (author) {
|
|
13
|
+
const link = `<a href="${url_for(author.path)}">${author.name}</a>`
|
|
14
|
+
el += `<span class="author">${__("meta.created_author", link) + __("symbol.colon")}</span>`
|
|
15
|
+
} else {
|
|
16
|
+
el += `<span class="author">${__("meta.created") + __("symbol.colon")}</span>`
|
|
17
|
+
}
|
|
18
|
+
// 发布日期
|
|
19
|
+
el += `<span class="created">`
|
|
20
|
+
el += `<time datetime="${date_xml(page.date)}">${date(page.date, config.date_format)}</time>`
|
|
21
|
+
el += `</span>`
|
|
22
|
+
// 更新日期
|
|
23
|
+
el += `<span class="updated">`
|
|
24
|
+
el += `${__("symbol.comma") + __("meta.updated") + __("symbol.colon")}`
|
|
25
|
+
el += `<time datetime="${date_xml(page.updated)}">${date(page.updated, config.date_format)}</time>`
|
|
26
|
+
el += `</span>`
|
|
27
|
+
}
|
|
28
|
+
el += `</div>`
|
|
29
|
+
return el
|
|
30
|
+
}
|
|
31
|
+
%>
|
|
32
|
+
<%- layoutDiv() %>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<%
|
|
2
|
+
function layoutDiv() {
|
|
3
|
+
const repo = page.repo || theme.wiki.tree[page.wiki]?.repo
|
|
4
|
+
if (repo == null) {
|
|
5
|
+
return ''
|
|
6
|
+
}
|
|
7
|
+
return `
|
|
8
|
+
<div class="right ghrepo stellar-ghinfo-api" api="${theme.api_host.ghapi}/repos/${repo}">
|
|
9
|
+
<a class="repo-link bold" href="https://github.com/${repo}">
|
|
10
|
+
${icon('github:repo')}
|
|
11
|
+
<span type="text">${repo}</span>
|
|
12
|
+
</a>
|
|
13
|
+
<a class="repo-link" href="https://github.com/${repo}/stargazers">
|
|
14
|
+
${icon('github:star')}
|
|
15
|
+
<span type="text" id="stargazers_count">0</span><span>stars</span>
|
|
16
|
+
</a>
|
|
17
|
+
<a class="repo-link" href="https://github.com/${repo}/forks">
|
|
18
|
+
${icon('github:fork')}
|
|
19
|
+
<span type="text" id="forks_count">0</span><span>forks</span>
|
|
20
|
+
</a>
|
|
21
|
+
</div>
|
|
22
|
+
`
|
|
23
|
+
}
|
|
24
|
+
%>
|
|
25
|
+
<%- layoutDiv() %>
|
|
@@ -29,6 +29,14 @@ function layoutDiv() {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
if (theme.topic?.publish_list?.length > 0) {
|
|
33
|
+
if (page.layout == 'index_topic') {
|
|
34
|
+
el += '<a class="active" href="' + url_for(theme.site_tree.index_topic.base_dir) + '">' + __("btn.topic") + '</a>';
|
|
35
|
+
} else {
|
|
36
|
+
el += '<a href="' + url_for(theme.site_tree.index_topic.base_dir) + '">' + __("btn.topic") + '</a>';
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
32
40
|
if (site.posts && site.posts.length > 0) {
|
|
33
41
|
if (is_archive()) {
|
|
34
42
|
el += '<a class="active" href="' + url_for(config.archive_dir) + '">' + __("btn.archives") + '</a>';
|
|
@@ -37,15 +45,15 @@ function layoutDiv() {
|
|
|
37
45
|
}
|
|
38
46
|
}
|
|
39
47
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
for (let key of Object.keys(
|
|
48
|
+
const { nav_tabs } = theme.site_tree.index_blog
|
|
49
|
+
if (nav_tabs) {
|
|
50
|
+
for (let key of Object.keys(nav_tabs)) {
|
|
43
51
|
// 当 page 的末尾为 index.html 或者处于该 page 的某个子页面时也应该匹配
|
|
44
|
-
// if (full_url_for(page.path) == full_url_for(
|
|
45
|
-
if (full_url_for(page.path).startsWith(full_url_for(
|
|
46
|
-
el += '<a class="active" href="' + url_for(
|
|
52
|
+
// if (full_url_for(page.path) == full_url_for(nav_tabs[key])) {
|
|
53
|
+
if (full_url_for(page.path).startsWith(full_url_for(nav_tabs[key]))){
|
|
54
|
+
el += '<a class="active" href="' + url_for(nav_tabs[key]) + '">' + key + '</a>';
|
|
47
55
|
} else {
|
|
48
|
-
el += '<a href="' + url_for(
|
|
56
|
+
el += '<a href="' + url_for(nav_tabs[key]) + '">' + key + '</a>';
|
|
49
57
|
}
|
|
50
58
|
}
|
|
51
59
|
}
|
|
@@ -8,7 +8,7 @@ function layoutDiv() {
|
|
|
8
8
|
if (page.filter === false) {
|
|
9
9
|
el += ' class="active"';
|
|
10
10
|
}
|
|
11
|
-
el += ' href="' + url_for(
|
|
11
|
+
el += ' href="' + url_for(theme.site_tree.index_wiki.base_dir) + '">' + __("btn.all_wiki") + '</a>';
|
|
12
12
|
el += '</a>';
|
|
13
13
|
// 项目分类
|
|
14
14
|
const { shelf, all_tags } = theme.wiki;
|
|
@@ -24,6 +24,20 @@ function layoutDiv() {
|
|
|
24
24
|
el += '</a>';
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
+
|
|
28
|
+
const { nav_tabs } = theme.site_tree.index_wiki
|
|
29
|
+
if (nav_tabs) {
|
|
30
|
+
for (let key of Object.keys(nav_tabs)) {
|
|
31
|
+
// 当 page 的末尾为 index.html 或者处于该 page 的某个子页面时也应该匹配
|
|
32
|
+
// if (full_url_for(page.path) == full_url_for(nav_tabs[key])) {
|
|
33
|
+
if (full_url_for(page.path).startsWith(full_url_for(nav_tabs[key]))){
|
|
34
|
+
el += '<a class="active" href="' + url_for(nav_tabs[key]) + '">' + key + '</a>';
|
|
35
|
+
} else {
|
|
36
|
+
el += '<a href="' + url_for(nav_tabs[key]) + '">' + key + '</a>';
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
27
41
|
el += '</nav>';
|
|
28
42
|
el += '</div>';
|
|
29
43
|
return el;
|
|
@@ -46,7 +46,7 @@ function div_default() {
|
|
|
46
46
|
|
|
47
47
|
// 标题
|
|
48
48
|
el += '<h2 class="post-title">';
|
|
49
|
-
el +=
|
|
49
|
+
el += post.title ? post.title : date(post.date, config.date_format);
|
|
50
50
|
el += '</h2>';
|
|
51
51
|
|
|
52
52
|
// 摘要
|
|
@@ -69,18 +69,7 @@ function div_default() {
|
|
|
69
69
|
// meta
|
|
70
70
|
el += '<div class="meta cap">';
|
|
71
71
|
el += '<span class="cap" id="post-meta">';
|
|
72
|
-
|
|
73
|
-
var author = null
|
|
74
|
-
if (theme.authors) {
|
|
75
|
-
if (page.author?.length > 0 && theme.authors[page.author] != null) {
|
|
76
|
-
author = theme.authors[page.author]
|
|
77
|
-
} else {
|
|
78
|
-
author = theme.default_author
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
if (author) {
|
|
82
|
-
el += author.name + ' '
|
|
83
|
-
}
|
|
72
|
+
|
|
84
73
|
// time
|
|
85
74
|
el += __("meta.created") + ' ' + '<time datetime="' + date_xml(post.date) + '">' + date(post.date, config.date_format) + '</time>';
|
|
86
75
|
el += '</span>';
|
|
@@ -101,8 +90,8 @@ function div_default() {
|
|
|
101
90
|
}
|
|
102
91
|
}
|
|
103
92
|
}
|
|
104
|
-
if (post.
|
|
105
|
-
el +=
|
|
93
|
+
if (post.sticky) {
|
|
94
|
+
el += `<span class="pin">${icon('default:pin')}</span>`
|
|
106
95
|
}
|
|
107
96
|
el += '</div>';
|
|
108
97
|
el += '</article>';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<%
|
|
2
|
+
function layoutDiv() {
|
|
3
|
+
var el = '';
|
|
4
|
+
el += '<article class="md-text">';
|
|
5
|
+
el += `<div class="preview"><img src="${topic.icon ? topic.icon : theme.default.topic}"/></div>`
|
|
6
|
+
el += '<div class="excerpt">';
|
|
7
|
+
el += '<h2 class="post-title">' + (topic.title || topic.name) + '</h2>';
|
|
8
|
+
if (topic.description) {
|
|
9
|
+
el += '<p>' + topic.description + '</p>';
|
|
10
|
+
}
|
|
11
|
+
el += '</div>';
|
|
12
|
+
el += '</article>';
|
|
13
|
+
return el;
|
|
14
|
+
}
|
|
15
|
+
%>
|
|
16
|
+
<%- layoutDiv() %>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div class='float-panel mobile-only blur' style='display:none'>
|
|
2
2
|
<button type='button' class='sidebar-toggle mobile' onclick='sidebar.toggle()'>
|
|
3
|
-
|
|
3
|
+
<%- icon('default:sidebar') %>
|
|
4
4
|
</button>
|
|
5
5
|
</div>
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
<% if (page.layout === 'post' || (page.
|
|
1
|
+
<% if (page.layout === 'post' || (page.wiki?.length > 0)) { %>
|
|
2
2
|
<script>
|
|
3
|
-
let tianliGPT_postSelector = '.
|
|
3
|
+
let tianliGPT_postSelector = 'article.content';
|
|
4
4
|
let tianliGPT_key = '<%= theme.plugins.tianli_gpt.api %>';
|
|
5
5
|
let tianliGPT_typingAnimate = '<%= theme.plugins.tianli_gpt.typingAnimate %>';
|
|
6
|
+
let tianliGPT_wordLimit = <%= theme.plugins.tianli_gpt.limit %>;
|
|
6
7
|
</script>
|
|
7
|
-
|
|
8
|
+
<script defer src="https://cdn1.tianli0.top/gh/zhheo/Post-Abstract-AI@0.15.2/tianli_gpt.min.js"></script>
|
|
8
9
|
<% } %>
|
|
@@ -11,7 +11,7 @@ function layoutDiv() {
|
|
|
11
11
|
el += ' ' + key + '="' + cfg[key] + '"';
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
el += '
|
|
14
|
+
el += `>${icon('default:loading')}</div>`
|
|
15
15
|
return el;
|
|
16
16
|
}
|
|
17
17
|
%>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
var artalk = Artalk.init({
|
|
12
12
|
el: '#artalk_container',
|
|
13
13
|
pageKey: path,
|
|
14
|
-
pageTitle: '<%= page.title
|
|
14
|
+
pageTitle: '<%= page.title %>',
|
|
15
15
|
server: '<%= theme.comments.artalk.server %>',
|
|
16
16
|
placeholder: '<%= theme.comments.artalk.placeholder %>',
|
|
17
17
|
site: '<%= config.title %>',
|
|
@@ -17,6 +17,6 @@ function layoutDiv() {
|
|
|
17
17
|
}
|
|
18
18
|
%>
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
<%- icon('default:loading') %>
|
|
21
21
|
|
|
22
22
|
<%- layoutDiv() %>
|
|
@@ -17,6 +17,6 @@ function layoutDiv() {
|
|
|
17
17
|
}
|
|
18
18
|
%>
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
<%- icon('default:loading') %>
|
|
21
21
|
|
|
22
22
|
<%- layoutDiv() %>
|
|
@@ -12,8 +12,8 @@ if (theme.comments.service && theme.comments.service.length > 0) {
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
// 合并项目评论
|
|
15
|
-
|
|
16
|
-
if (loadComment &&
|
|
15
|
+
const proj = theme.wiki.tree[page.wiki]
|
|
16
|
+
if (loadComment && (proj != null)) {
|
|
17
17
|
if (proj.comment_title != undefined && page.comment_title == undefined) {
|
|
18
18
|
if (['utterances', 'beaudar', 'giscus'].includes(theme.comments.service)) {
|
|
19
19
|
page.comment_title = proj.comment_title;
|
|
@@ -31,7 +31,7 @@ if (cmt.service && page[cmt.service]) {
|
|
|
31
31
|
page.cmt = cmt;
|
|
32
32
|
%>
|
|
33
33
|
<% if (loadComment) { %>
|
|
34
|
-
<div class=
|
|
34
|
+
<div class="related-wrap md-text<%- scrollreveal(' ') %>" id="comments">
|
|
35
35
|
<section class='header cmt-title cap theme'>
|
|
36
36
|
<%- page.comment_title != undefined ? markdown(page.comment_title) : __('meta.comment_title') %>
|
|
37
37
|
</section>
|
|
@@ -11,7 +11,7 @@ function layoutDiv() {
|
|
|
11
11
|
el += ' ' + key + '="' + cfg[key] + '"';
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
el += '
|
|
14
|
+
el += `>${icon('default:loading')}</div>`
|
|
15
15
|
return el;
|
|
16
16
|
}
|
|
17
17
|
%>
|
|
@@ -17,6 +17,6 @@ function layoutDiv() {
|
|
|
17
17
|
}
|
|
18
18
|
%>
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
<%- icon('default:loading') %>
|
|
21
21
|
|
|
22
22
|
<%- layoutDiv() %>
|
|
@@ -11,7 +11,7 @@ function layoutDiv() {
|
|
|
11
11
|
el += ' ' + key + '="' + cfg[key] + '"';
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
el += '
|
|
14
|
+
el += `>${icon('default:loading')}</div>`
|
|
15
15
|
return el;
|
|
16
16
|
}
|
|
17
17
|
%>
|