blog/themes/typing/layout/_partial/article.ejs

50 lines
1.6 KiB
Plaintext

<article id="<%= post.layout %>-<%= post.slug %>" class="h-entry article article-type-<%= post.layout %>" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<%- partial('_partial/header') %>
<hr class="header-hr">
<div class="article-inner">
<%- partial('post/gallery') %>
<% if (post.link || post.title) { %>
<header class="article-header">
<%- partial('post/title', {class_name: 'p-name entry-title article-title'}) %>
</header>
<% } %>
<% if (post.excerpt) { %>
<p class="p-summary"><%- post.excerpt %></p>
<% } %>
<div class="e-content article-entry" itemprop="articleBody">
<%- toc(page.content, {list_number: false}) %>
<%- post.more %>
</div>
<footer class="article-footer">
<ul class="article-meta">
<% if (post.lastUpdated) { %>
<li>
<span class="label"><%= __('date_updated') %>:</span>
<%- partial('post/updated-date') %>
</li>
<% } %>
<li>
<span class="label"><%= __('date_published') %>:</span>
<%- partial('post/date') %>
</li>
<% if (post.categories && post.categories.length) { %>
<li>
<span class="label"><%= __('category') %>:</span>
<%- partial('post/category') %>
</li>
<% } %>
<% if (post.tags && post.tags.length) { %>
<li>
<span class="label"><%= __('tag') %>:</span>
<%- partial('post/tag') %>
</li>
<% } %>
<hr/>
</ul>
</footer>
</div>
<% if (!index) { %>
<%- partial('post/nav') %>
<% } %>
</article>