2020-04-29 18:46:33 +08:00
|
|
|
<div class="home-content-container fade-in-down-animation">
|
2020-04-01 15:28:01 +08:00
|
|
|
<ul class="home-article-list">
|
|
|
|
<% page.posts.forEach(post => { %>
|
|
|
|
<li class="home-article-item">
|
2020-04-24 22:49:10 +08:00
|
|
|
|
2020-10-29 18:12:50 +08:00
|
|
|
<% if (post.sticky) { %>
|
2020-10-28 00:20:32 +08:00
|
|
|
<i class="fa fa-thumb-tack top-icon"></i>
|
|
|
|
<% } %>
|
|
|
|
|
2020-04-01 16:41:30 +08:00
|
|
|
<h3 class="home-article-title">
|
2020-04-24 22:49:10 +08:00
|
|
|
<a href="<%- url_for(post.path) %>">
|
2020-04-29 10:44:47 +08:00
|
|
|
<%= post.title %>
|
2020-04-13 18:27:16 +08:00
|
|
|
</a>
|
2020-04-01 16:41:30 +08:00
|
|
|
</h3>
|
2020-04-01 10:14:18 +08:00
|
|
|
|
2020-04-03 18:18:42 +08:00
|
|
|
<div class="home-article-content markdown-body">
|
2020-04-01 16:41:30 +08:00
|
|
|
<% if (post.excerpt) { %>
|
|
|
|
<%- post.excerpt %>
|
|
|
|
<% } else { %>
|
2020-10-28 18:01:59 +08:00
|
|
|
<%- truncate(strip_html(post.content), {length: 168}) %>
|
2020-04-01 16:41:30 +08:00
|
|
|
<% } %>
|
2020-04-01 10:14:18 +08:00
|
|
|
</div>
|
|
|
|
|
2020-10-28 18:01:59 +08:00
|
|
|
<div class="home-article-meta-info-container">
|
|
|
|
<div class="home-article-meta-info">
|
2020-04-24 22:49:10 +08:00
|
|
|
<span><i class="fa fa-pencil-square-o"></i> <%= date(post.date, 'YYYY-MM-DD') %></span>
|
2020-11-13 14:43:22 +08:00
|
|
|
<% if (post.categories.length && theme.home_article.category.enable === true) { %>
|
|
|
|
<span class="home-article-category"><i class="fa fa-folder"></i>
|
2020-10-28 18:01:59 +08:00
|
|
|
<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>
|
2020-11-13 14:43:22 +08:00
|
|
|
<% } %>
|
|
|
|
<% if (post.tags.length && theme.home_article.tag.enable === true) { %>
|
|
|
|
<span class="home-article-tag">
|
2020-10-28 18:01:59 +08:00
|
|
|
<i class="fa 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>
|
2020-04-26 18:34:51 +08:00
|
|
|
<% } %>
|
2020-04-24 22:49:10 +08:00
|
|
|
</div>
|
2020-11-13 14:43:22 +08:00
|
|
|
|
2020-04-25 10:21:09 +08:00
|
|
|
<a href="<%- url_for(post.path) %>"><%- __('read_more') %> <i class="fa fa-angle-right"></i></a>
|
2020-04-01 15:28:01 +08:00
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<% }) %>
|
|
|
|
</ul>
|
|
|
|
|
2020-09-02 13:11:09 +08:00
|
|
|
<div class="home-paginator">
|
|
|
|
<%- partial('_partial/paginator', {pageObject: page}) %>
|
2020-04-01 10:14:18 +08:00
|
|
|
</div>
|
2020-04-01 15:28:01 +08:00
|
|
|
</div>
|