blog-hexo/themes/hexo-theme-cosy/layout/post.ejs
2023-11-17 11:02:45 +08:00

78 lines
2.2 KiB
Plaintext

<%- css("/css/e7914205.css")%>
<div class="post-container">
<div class="content">
<header>
<%- partial('breadcrumb') %>
</header>
<main class="scrollbar-obtrusive">
<div class="article-container">
<!-- 文章tags -->
<% if (page.tags && page.tags.length > 0) { %>
<ul class="tags">
<% page.tags.each(function(tag){ %>
<li>
<a># <%- tag.name %></a>
</li>
<% }) %>
</ul>
<% } %>
<!-- 渲染文章内容 -->
<article>
<h1><%- page.title %></h1>
<p class="post-info"><%- __('text-updated-time') %>: <%- page.updated.format('YYYY-MM-DD HH:mm:ss') %></p>
<%- page.content %>
</article>
<% if(theme.postCopyright !==undefined){ %>
<%- partial('postCopyright') %>
<% } %>
<!-- 评论 -->
<div id="vcomments"></div>
</div>
</main>
</div>
<% if (!!toc(page.content)) { %>
<div class="meta-container">
<div class="toc-wrapper content-dialog">
<p class="catalog">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24">
<g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M4 6h16"></path>
<path d="M4 12h16"></path>
<path d="M4 18h12"></path>
</g>
</svg>
<span><%- __('text-catalog') %></span>
</p>
<!-- 文章toc -->
<%- toc(page.content,{max_depth:3}) %>
</div>
</div>
<% } %>
</div>
<script>
window.page = {
use: '<%= page.use %>'
}
window.katex = {
enable: "<%= theme.katex.enable %>",
jsCdn: "<%= theme.katex.jsCdn %>",
cssCdn: "<%= theme.katex.cssCdn %>"
}
window.mermaid = {
enable: "<%= theme.mermaid.enable %>",
theme: "<%= theme.mermaid.theme %>",
cdn: "<%= theme.mermaid.cdn %>",
}
window.valine = {
enable: "<%= theme.valine.enable %>",
appId: '<%= theme.valine.appId %>',
appKey: '<%= theme.valine.appKey %>',
avatar: '<%= theme.valine.avatar %>',
cdn: '<%= theme.valine.cdn %>',
serverURLs: '<%= theme.valine.serverURLs %>'
};
</script>
<%- js("/js/d3872ea1.js")%>