69 lines
3.1 KiB
Plaintext
69 lines
3.1 KiB
Plaintext
<div class="home-content-container fade-in-down-animation">
|
|
<ul class="home-article-list">
|
|
<% page.posts.forEach(post => { %>
|
|
<li class="home-article-item">
|
|
|
|
<h3 class="home-article-title">
|
|
<a href="<%- url_for(post.path) %>">
|
|
<% if (post.top) { %>
|
|
<i class="fa fa-thumb-tack"></i>
|
|
<% } %>
|
|
<%= post.title %>
|
|
</a>
|
|
</h3>
|
|
|
|
<div class="home-article-content markdown-body">
|
|
<% if (post.excerpt) { %>
|
|
<%- post.excerpt %>
|
|
<% } else { %>
|
|
<%- truncate(strip_html(post.content), {length: 150}) %>
|
|
<% } %>
|
|
</div>
|
|
|
|
<div class="home-article-meta-info">
|
|
<div class="article-date">
|
|
<span><i class="fa fa-pencil-square-o"></i> <%= date(post.date, 'YYYY-MM-DD') %></span>
|
|
<% if (theme.magic.enable === true) { %>
|
|
<% if (post.categories.length && theme.home_article.category.enable === true) { %>
|
|
<span>
|
|
<i class="fa 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>
|
|
<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>
|
|
<% } %>
|
|
<% } %>
|
|
</div>
|
|
<% if (theme.magic.enable === false) { %>
|
|
<hr>
|
|
<% } %>
|
|
<a href="<%- url_for(post.path) %>"><%- __('read_more') %> <i class="fa fa-angle-right"></i></a>
|
|
</div>
|
|
</li>
|
|
<% }) %>
|
|
</ul>
|
|
|
|
<div class="home-paginator">
|
|
<%- partial('_partial/paginator', {pageObject: page}) %>
|
|
</div>
|
|
</div>
|