blog-hexo/themes/hexo-theme-cosy/layout/post.ejs

78 lines
2.2 KiB
Plaintext
Raw Normal View History

2023-11-15 16:42:39 +08:00
<%- css("/css/31c5cea6.css")%>
2023-10-24 09:50:42 +08:00
<div class="post-container">
<div class="content">
<header>
<%- partial('breadcrumb') %>
</header>
<main class="scrollbar-obtrusive">
<div class="article-container">
<!-- 文章tags -->
2023-10-30 10:58:06 +08:00
<% if (page.tags && page.tags.length > 0) { %>
2023-10-24 09:50:42 +08:00
<ul class="tags">
<% page.tags.each(function(tag){ %>
<li>
<a># <%- tag.name %></a>
</li>
<% }) %>
</ul>
<% } %>
<!-- 渲染文章内容 -->
2023-11-08 13:45:34 +08:00
<article>
<h1><%- page.title %></h1>
2023-11-15 16:42:39 +08:00
<p class="post-info"><%- __('text-updated-time') %>: <%- page.updated.format('YYYY-MM-DD HH:mm:ss') %></p>
2023-11-08 13:45:34 +08:00
<%- page.content %>
</article>
2023-10-24 09:50:42 +08:00
<% if(theme.postCopyright !==undefined){ %>
<%- partial('postCopyright') %>
<% } %>
<!-- 评论 -->
<div id="vcomments"></div>
</div>
</main>
</div>
2023-11-06 15:01:24 +08:00
<% if (!!toc(page.content)) { %>
2023-10-24 09:50:42 +08:00
<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>
2023-11-06 15:01:24 +08:00
<% } %>
2023-10-24 09:50:42 +08:00
</div>
<script>
2023-11-08 10:11:56 +08:00
window.page = {
use: '<%= page.use %>'
}
2023-10-24 09:50:42 +08:00
window.katex = {
enable: "<%= theme.katex.enable %>",
jsCdn: "<%= theme.katex.jsCdn %>",
cssCdn: "<%= theme.katex.cssCdn %>"
}
window.mermaid = {
enable: "<%= theme.mermaid.enable %>",
2023-11-15 10:21:41 +08:00
theme: "<%= theme.mermaid.theme %>",
2023-10-24 09:50:42 +08:00
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>
2023-11-15 16:42:39 +08:00
<%- js("/js/8fc499db.js")%>