hexo-theme-stellar/layout/page.ejs

33 lines
851 B
Plaintext
Executable File

<%
function layoutTitle() {
const title = page.h1 || page.title;
if (title && title.length > 0) {
return '<h1 class="article-title"><span>' + title + '</span></h1>';
} else {
return '';
}
}
function layoutDiv() {
var el = '';
if (page.post_list) {
el += partial('_partial/main/navbar/list_post');
}
if (page.mermaid == true) {
el += partial('mermaid');
}
if (page.h1 || page.title || (page.content && page.content.length > 0)) {
el += partial('_partial/main/navbar/breadcrumb');
}
el += '<article class="md-text content ' + page.layout + (page.indent ? ' indent' : '') + scrollreveal() + '">';
el += layoutTitle();
if (page.content && page.content.length > 0) {
el += page.content;
}
el += '</article>';
el += partial('_partial/plugins/comments/layout');
return el;
}
%>
<%- layoutDiv() %>