human-anatomy-3d/src/index.ejs

33 lines
1,000 B
Text
Raw Normal View History

2020-06-20 18:16:50 +00:00
---
pagination:
data: collections.posts
size: 5
alias: list
reverse: true
permalink: '<% if (pagination.pageNumber > 0) { %><%= `page${pagination.pageNumber + 1}/index.html` %><% } else { %>index.html<% } %>'
eleventyComputed:
title: '<% if (pagination.pageNumber > 0) { %><%= `Page ${pagination.pageNumber + 1} | ${site.title}` %><% } else { %><%= site.title %><% } %>'
---
<ul>
<% list.forEach((post) => { %>
2020-10-04 21:50:01 +00:00
<li class="mb-3 flex justify-between">
2020-06-20 18:16:50 +00:00
<a href="<%= post.url %>"><%= post.data.title %></a>
2020-10-04 21:50:01 +00:00
<div><%= this.dateFns.format(new Date(post.data.date), 'LLLL d, yyyy') %></div>
2020-06-20 18:16:50 +00:00
</li>
<% }) %>
</ul>
2020-10-04 21:50:01 +00:00
<div class="text-sm flex justify-between">
2020-06-20 18:16:50 +00:00
<% if (pagination.previous) { %>
2020-10-04 21:50:01 +00:00
<div>
<a href="<%= pagination.previous.replace(/index.html$/, "") %>">← Newer Posts</a>
</div>
2020-06-20 18:16:50 +00:00
<% } %> <% if (pagination.next) { %>
2020-10-04 21:50:01 +00:00
<div class="text-right ml-auto">
<a href="<%= pagination.next.replace(/index.html$/, "") %>">Older Posts →</a>
</div>
2020-06-20 18:16:50 +00:00
<% } %>
</div>