hexo-theme-keep/layout/_partial/home-article-meta-info.ejs

41 lines
1.8 KiB
Plaintext
Raw Normal View History

<div class="home-article-meta-info-container">
<div class="home-article-meta-info">
<span>
<i class="fas fa-history"></i>&nbsp;
2023-01-13 10:19:04 +08:00
<span class="home-article-date" data-updated="<%= post.updated %>">
<%= date(post.updated, 'YYYY-MM-DD') %>
</span>
</span>
<% if (post.categories.length && theme.home_article.category.enable === true) { %>
2021-01-21 20:05:30 +08:00
<span class="home-article-category"><i class="fas fa-folder"></i>&nbsp;
<ul>
<% post.categories.forEach((category, i) => {
if (theme.home_article.category.limit === 0 || i + 1 <= theme.home_article.category.limit) { %>
<li>
<%= i === 0 ? '' : '> ' %>
2021-01-21 20:05:30 +08:00
<a href="<%- url_for(category.path) %>"><%= category.name %></a>&nbsp;
</li>
<% } %>
<% }); %>
</ul>
</span>
<% } %>
<% if (post.tags.length && theme.home_article.tag.enable === true) { %>
<span class="home-article-tag">
2021-01-21 20:05:30 +08:00
<i class="fas fa-tags"></i>&nbsp;
<ul>
<% post.tags.forEach((tag, i) => {
if (theme.home_article.tag.limit === 0 || i + 1 <= theme.home_article.tag.limit) { %>
<li>
<%= i === 0 ? '' : '| ' %>
2021-01-21 20:05:30 +08:00
<a href="<%- url_for(tag.path) %>"><%= tag.name %></a>&nbsp;
</li>
<% }}); %>
</ul>
</span>
<% } %>
</div>
2022-10-20 17:38:05 +08:00
<a class="read-more" href="<%- url_for(post.path) %>"><%- __('read_more') %>&nbsp;<i class="fas fa-angle-right"></i></a>
</div>