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

31 lines
1021 B
Plaintext

<%
const { type: p_type, title: p_title, content: p_content, comment: p_comment } = page
const { menu: t_menu, links: t_links } = theme
%>
<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')
)
%>
<% if (isLoadFriendsLink) { %>
<%- partial('_partial/friends-link') %>
<% } %>
<div class="page-template-content keep-markdown-body">
<% if (isLoadFriendsLink || p_content) { %>
<%- p_content %>
<% } else { %>
<h1><%- p_title %></h1>
<% } %>
</div>
<% if (p_comment === true) { %>
<div class="page-template-comments">
<%- partial('_partial/comment/comment') %>
</div>
<% } %>
</div>
</div>