44 lines
1.9 KiB
Plaintext
44 lines
1.9 KiB
Plaintext
<%
|
|
const target_date = post.date !== post.updated ? post.updated : post.date
|
|
%>
|
|
<div class="home-article-meta-info-container">
|
|
<div class="home-article-meta-info">
|
|
<span>
|
|
<i class="fas fa-history"></i>
|
|
<span class="home-article-date" data-date="<%= target_date %>">
|
|
<%= date(target_date, 'YYYY-MM-DD') %>
|
|
</span>
|
|
</span>
|
|
<% if (post.categories.length && theme.home_article.category.enable === true) { %>
|
|
<span class="home-article-category"><i class="fas fa-folder"></i>
|
|
<ul>
|
|
<% post.categories.forEach((category, i) => {
|
|
if (theme.home_article.category.limit === 0 || i + 1 <= theme.home_article.category.limit) { %>
|
|
<li>
|
|
<%= i === 0 ? '' : '> ' %>
|
|
<a href="<%- url_for(category.path) %>"><%= category.name %></a>
|
|
</li>
|
|
<% } %>
|
|
<% }); %>
|
|
</ul>
|
|
</span>
|
|
<% } %>
|
|
<% if (post.tags.length && theme.home_article.tag.enable === true) { %>
|
|
<span class="home-article-tag">
|
|
<i class="fas fa-tags"></i>
|
|
<ul>
|
|
<% post.tags.forEach((tag, i) => {
|
|
if (theme.home_article.tag.limit === 0 || i + 1 <= theme.home_article.tag.limit) { %>
|
|
<li>
|
|
<%= i === 0 ? '' : '| ' %>
|
|
<a href="<%- url_for(tag.path) %>"><%= tag.name %></a>
|
|
</li>
|
|
<% }}); %>
|
|
</ul>
|
|
</span>
|
|
<% } %>
|
|
</div>
|
|
|
|
<a class="read-more" href="<%- url_for(post.path) %>"><%- __('read_more') %> <i class="fas fa-angle-right"></i></a>
|
|
</div>
|