44 lines
1.4 KiB
Plaintext
44 lines
1.4 KiB
Plaintext
<div class="home-content-container">
|
|
|
|
<ul class="home-article-list">
|
|
|
|
<% page.posts.forEach(post => { %>
|
|
<li class="home-article-item">
|
|
<h3 class="home-article-title">
|
|
<a class="article-title-hover-animation" href="<%- url_for(post.path) %>"><%= post.title %></a>
|
|
</h3>
|
|
|
|
<div class="home-article-content markdown">
|
|
<% if (post.excerpt) { %>
|
|
<%- post.excerpt %>
|
|
<% } else { %>
|
|
<%- truncate(strip_html(post.content), {length: 150}) %>
|
|
<% } %>
|
|
</div>
|
|
|
|
<div class="home-article-meta-info">
|
|
<span class="article-date">
|
|
<i class="fa fa-calendar-o"></i> <%= date(post.date, 'YYYY-MM-DD') %>
|
|
</span>
|
|
<hr>
|
|
<a href="<%- url_for(post.path) %>">阅读全文</a>
|
|
</div>
|
|
</li>
|
|
<% }) %>
|
|
</ul>
|
|
|
|
<div class="paginator">
|
|
<% if (page.prev) { %>
|
|
<a class="prev btn"
|
|
href="<%- url_for(page.prev == 1 ? '' : '/page/' + page.prev) %>"
|
|
><%- __('prev') %></a>
|
|
<% } %>
|
|
|
|
<% if (page.next) { %>
|
|
<a class="next btn"
|
|
href="<%- url_for('/page/' + page.next) %>"
|
|
><%- __('next') %></a>
|
|
<% } %>
|
|
</div>
|
|
</div>
|