This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
spdocker/themes/spd/layout/index.ejs

57 lines
1.5 KiB
Plaintext
Raw Permalink Normal View History

2018-03-07 04:58:54 +00:00
---
layout: page
---
<!-- Main Content -->
<% page.posts.each(function(post){ %>
<div class="post-preview">
<a href="<%- config.root %><%- post.path %>">
<h2 class="post-title">
<%- post.title || "Untitled" %>
</h2>
<h3 class="post-subtitle">
<%- post.subtitle || "" %>
</h3>
<div class="post-content-preview">
<%- truncate(strip_html(post.content), {length: 200, omission: '...'}) %>...
</div>
</a>
<% if (config.home_posts_tag){%>
<p class="post-meta" style="margin: 10px 0;">
Posted by <%- post.author || config.author %> on
<%= post.date.format(config.date_format) %>
</p>
<div class="tags">
<% post.tags.forEach(function(tag){ %>
<a href="<%= config.root %>tags/#<%= tag.name %>" title="<%= tag.name %>"><%= tag.name %></a>
<% }) %>
</div>
<%} else {%>
<p class="post-meta">
Posted by <%- post.author || config.author %> on
<%= post.date.format(config.date_format) %>
</p>
<%}%>
</div>
<hr>
<% }); %>
<!-- Pager -->
<ul class="pager">
<% if (page.prev){ %>
<li class="previous">
<a href="<%- config.root %><%- page.prev_link %>">&larr; Newer Posts</a>
</li>
<% } %>
<% if (page.next){ %>
<li class="next">
<a href="<%- config.root %><%- page.next_link %>">Older Posts &rarr;</a>
</li>
<% } %>
</ul>