2020-03-19 18:11:13 +08:00
|
|
|
<div class="home-container">
|
|
|
|
<% if (is_home()) { %>
|
2020-03-18 23:14:09 +08:00
|
|
|
<ul class="article-post-list">
|
|
|
|
<% page.posts.forEach(post => { %>
|
|
|
|
<li class="article-post-item">
|
|
|
|
<div class="article-post-title">
|
|
|
|
<h3>
|
2020-03-21 23:04:01 +08:00
|
|
|
<a class="article-title-hover-animation" href="<%- url_for(post.path) %>"><%= post.title %></a>
|
2020-03-18 23:14:09 +08:00
|
|
|
</h3>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="article-post-content">
|
2020-03-26 11:37:10 +08:00
|
|
|
<%- truncate(strip_html(post.content), {length: 150}) %>
|
2020-03-18 23:14:09 +08:00
|
|
|
</div>
|
|
|
|
|
2020-03-22 20:31:13 +08:00
|
|
|
<div class="article-post-meta-info">
|
2020-03-21 23:04:01 +08:00
|
|
|
<%- partial('common/article-meta-info', {articleObject: post, index: true}) %>
|
2020-03-18 23:14:09 +08:00
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<% }) %>
|
|
|
|
</ul>
|
|
|
|
|
2020-03-20 16:31:20 +08:00
|
|
|
<div class="paginator">
|
|
|
|
<% if (page.prev) { %>
|
|
|
|
<a class="prev btn"
|
2020-03-21 23:04:01 +08:00
|
|
|
href="<%- url_for(page.prev == 1 ? '' : '/page/' + page.prev) %>"
|
2020-03-20 16:31:20 +08:00
|
|
|
><%- __('prev') %></a>
|
|
|
|
<% } %>
|
|
|
|
|
|
|
|
<% if (page.next) { %>
|
|
|
|
<a class="next btn"
|
|
|
|
href="<%- url_for('/page/' + page.next) %>"
|
|
|
|
><%- __('next') %></a>
|
|
|
|
<% } %>
|
|
|
|
</div>
|
|
|
|
<% } %>
|
2020-03-18 23:14:09 +08:00
|
|
|
|
|
|
|
</div>
|