2021-02-19 23:33:19 +08:00
|
|
|
<%
|
2021-07-26 22:26:46 +08:00
|
|
|
if (page.menu_id == undefined) {
|
2021-02-21 03:13:21 +08:00
|
|
|
page.menu_id = 'wiki';
|
2021-02-19 23:33:19 +08:00
|
|
|
}
|
2021-07-26 22:26:46 +08:00
|
|
|
if (page.layout == undefined) {
|
2021-02-19 23:33:19 +08:00
|
|
|
page.layout = 'index';
|
|
|
|
}
|
2021-07-26 22:26:46 +08:00
|
|
|
if (page.title == undefined) {
|
|
|
|
if (page.tagName) {
|
2022-11-21 21:44:18 +08:00
|
|
|
page.title = page.tagName;
|
2021-07-04 20:21:31 +08:00
|
|
|
} else {
|
2022-11-21 21:44:18 +08:00
|
|
|
page.title = __('btn.wiki');
|
2021-07-04 20:21:31 +08:00
|
|
|
}
|
2021-02-19 23:33:19 +08:00
|
|
|
}
|
2021-02-22 13:19:21 +08:00
|
|
|
function layoutTitle() {
|
|
|
|
const title = page.h1 || page.title;
|
|
|
|
if (title && title.length > 0) {
|
|
|
|
return '<h1 class="article-title"><span>' + title + '</span></h1>';
|
|
|
|
} else {
|
|
|
|
return '';
|
|
|
|
}
|
|
|
|
}
|
2021-02-19 23:33:19 +08:00
|
|
|
%>
|
2021-07-04 20:21:31 +08:00
|
|
|
<% if (page.layout === 'index') { %>
|
2021-02-19 23:33:19 +08:00
|
|
|
<%- partial('index') %>
|
|
|
|
<% } else { %>
|
2021-02-20 13:09:41 +08:00
|
|
|
<%
|
2021-07-26 22:26:46 +08:00
|
|
|
if (page.header == undefined) {
|
2022-10-05 23:00:52 +08:00
|
|
|
page.header = 'auto';
|
2021-02-20 13:09:41 +08:00
|
|
|
}
|
|
|
|
%>
|
|
|
|
<%- partial('_partial/main/navbar/breadcrumb') %>
|
2021-02-22 13:19:21 +08:00
|
|
|
<article class='content md <%- page.layout %><%- scrollreveal() %>'>
|
|
|
|
<%- layoutTitle() %>
|
2021-02-19 23:33:19 +08:00
|
|
|
<%- page.content %>
|
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') %>
|
2021-02-19 23:33:19 +08:00
|
|
|
<%- partial('_partial/plugins/comments/layout') %>
|
|
|
|
<% } %>
|