hexo-theme-keep/layout/_partial/page-template.ejs

31 lines
1021 B
Plaintext
Raw Normal View History

<%
const { type: p_type, title: p_title, content: p_content, comment: p_comment } = page
const { menu: t_menu, links: t_links } = theme
%>
2021-01-29 15:06:06 +08:00
<div class="fade-in-down-animation">
<div class="page-template-container">
<%
const isLoadFriendsLink = (
t_menu?.Links
&& t_links
&& (p_type === 'links' || p_type === 'link' || p_title === 'links' || p_title === 'link')
)
2021-01-29 15:06:06 +08:00
%>
<% if (isLoadFriendsLink) { %>
<%- partial('_partial/friends-link') %>
<% } %>
<div class="page-template-content keep-markdown-body">
<% if (isLoadFriendsLink || p_content) { %>
<%- p_content %>
2021-01-29 15:06:06 +08:00
<% } else { %>
<h1><%- p_title %></h1>
2021-01-29 15:06:06 +08:00
<% } %>
</div>
<% if (p_comment === true) { %>
<div class="page-template-comments">
2021-01-29 15:06:06 +08:00
<%- partial('_partial/comment/comment') %>
</div>
<% } %>
2021-01-29 15:06:06 +08:00
</div>
</div>