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-10-28 22:58:20 +08:00
|
|
|
function layoutDiv() {
|
|
|
|
var el = '';
|
|
|
|
if (page.post_list) {
|
|
|
|
el += partial('_partial/main/navbar/list_post');
|
|
|
|
}
|
2023-07-18 22:17:14 +08:00
|
|
|
if (page.mermaid == true) {
|
|
|
|
el += partial('mermaid');
|
|
|
|
}
|
2022-10-28 22:58:20 +08:00
|
|
|
if (page.h1 || page.title || (page.content && page.content.length > 0)) {
|
|
|
|
el += partial('_partial/main/navbar/breadcrumb');
|
|
|
|
}
|
2022-11-23 22:44:11 +08:00
|
|
|
el += '<article class="md-text content ' + page.layout + (page.indent ? ' indent' : '') + scrollreveal() + '">';
|
2022-10-28 22:58:20 +08:00
|
|
|
el += layoutTitle();
|
|
|
|
if (page.content && page.content.length > 0) {
|
|
|
|
el += page.content;
|
|
|
|
}
|
|
|
|
el += '</article>';
|
|
|
|
el += partial('_partial/plugins/comments/layout');
|
|
|
|
return el;
|
|
|
|
}
|
2021-02-22 13:19:21 +08:00
|
|
|
%>
|
2022-10-28 22:58:20 +08:00
|
|
|
|
|
|
|
<%- layoutDiv() %>
|