lewisdale.dev/src/blog/index.html

39 lines
1.2 KiB
HTML
Raw Normal View History

---
title: Blog
layout: base.njk
2023-02-13 13:35:44 +00:00
pagination:
data: collections.posts
2023-02-14 17:00:01 +00:00
size: 5
reverse: true
eleventyImport:
collections: ["posts"]
2023-02-13 13:35:44 +00:00
---
2024-04-07 08:53:18 +00:00
<main class="wrapper-lg stack-xl">
2023-02-14 17:00:01 +00:00
<h1>Blog posts</h1>
2023-02-13 13:35:44 +00:00
2023-12-30 21:55:36 +00:00
<aside class="inverse text-center">
2023-12-30 20:10:07 +00:00
<p>
Subscribe via <a href="/rss.xml">RSS</a>, <a href="/atom.xml">Atom</a>, or <a href="/feed.json">JSON</a>.
</p>
</aside>
2023-08-18 09:29:44 +00:00
<ol class="stack-xl" role='list'>
2023-02-14 17:00:01 +00:00
{% for item in pagination.items %}
<li class="stack-xs">
<h2><a href="{{ item.url }}">{{ item.data.title | safe }}</a></h2>
2023-12-30 15:38:09 +00:00
<time class="block" datetime="{{ item.date | dateToRfc3339 }}">{{ item.date | dateDisplay }}</time>
<p class="e-content p-summary">{{ item.content | excerpt }}</p>
<a href="{{ item.url }}" class="inline-block">Read more</a>
2023-02-14 17:00:01 +00:00
</li>
{% endfor %}
</ol>
<nav class="blog-nav row" data-spacing="between" aria-label="View more posts">
2023-02-14 17:00:01 +00:00
{% if pagination.href.next %}
<a href="{{ pagination.href.next }}">Older</a>
{% endif %}
{% if pagination.href.previous %}
<a href="{{ pagination.href.previous }}">Newer</a>
{% endif %}
</nav>
2023-11-29 08:34:39 +00:00
</main>