hexo-theme-stellar/layout/post.ejs

34 lines
1.0 KiB
Plaintext
Raw Normal View History

2021-02-19 23:33:19 +08:00
<%
2021-02-21 03:13:21 +08:00
if (page.menu_id == undefined) {
page.menu_id = 'post';
2021-02-19 23:33:19 +08:00
}
2021-02-20 13:09:41 +08:00
if (page.header == undefined) {
2024-01-17 14:07:30 +08:00
page.header = false;
2021-02-20 13:09:41 +08:00
}
2021-02-22 13:19:21 +08:00
function layoutTitle() {
2024-01-04 10:16:03 +08:00
const title = page.h1 != null ? page.h1 : page.title;
2021-02-22 13:19:21 +08:00
if (title && title.length > 0) {
return '<h1 class="article-title"><span>' + title + '</span></h1>';
} else {
return '';
}
}
2022-03-02 14:50:45 +08:00
let post = page;
let heti = '';
if (theme.plugins.heti && theme.plugins.heti.enable) {
heti = ' heti';
}
2021-02-19 23:33:19 +08:00
%>
2021-02-20 13:09:41 +08:00
<%- partial('_partial/main/navbar/breadcrumb') %>
2022-11-23 22:44:11 +08:00
<article class='md-text content<%- heti %> <%- post.layout %><%- post.indent ? ' indent' : '' %><%- scrollreveal() %>'>
2021-02-22 13:19:21 +08:00
<%- layoutTitle() %>
2021-02-19 23:33:19 +08:00
<%- post.content %>
2023-05-09 13:09:05 +08:00
<% if (theme.plugins.tianli_gpt.enable && ['all', 'post'].includes(theme.plugins.tianli_gpt.field)) { %>
2023-12-18 12:34:56 +08:00
<%- partial('_partial/plugins/ai/tianli_gpt') %>
<% } %>
2021-03-06 20:44:17 +08:00
<%- partial('_partial/main/article/article_footer') %>
2021-02-25 20:49:43 +08:00
</article>
2021-02-20 13:09:41 +08:00
<%- partial('_partial/main/article/read_next') %>
<%- partial('_partial/main/article/related_posts') %>
2021-02-19 23:33:19 +08:00
<%- partial('_partial/plugins/comments/layout') %>