leilukin-site/src/blog/posts.njk

40 lines
999 B
Plaintext
Raw Normal View History

2024-04-15 17:39:56 +00:00
---
title: Blog Archive
layout: main/content
tags: blog pages
2024-04-17 18:08:32 +00:00
eleventyComputed:
desc: Archive of blog posts on {{ sitemeta.siteName | safe }}
eleventyNavigation:
key: Blog Archive
parent: Blog
2024-04-16 09:09:38 +00:00
---
<ul class="blog__postlist">
2024-04-17 18:37:10 +00:00
{% for post in collections.posts | reverse %}
2024-04-17 12:20:20 +00:00
<li class="blog__postlist--item">
<h2 class="blog__postlist--title">
2024-04-16 09:09:38 +00:00
<a href="{{ post.url }}">
{% if post.data.title %}{{ post.data.articleTitle }}
{% else %}
<code>{{ post.url }}</code>
{% endif %}
2024-04-16 09:09:38 +00:00
</a>
</h2>
<time datetime="{{ post.date }}">{{ post.date | formatDate }}</time>
2024-04-16 09:09:38 +00:00
</li>
{% endfor %}
</ul>
2024-07-18 13:08:32 +00:00
{%- css %}
2024-04-17 12:20:20 +00:00
.blog__postlist {
display: grid;
gap: 1em;
padding-left: 1em;
}
.blog__postlist--title {
font-size: clamp(1.55rem, 1rem + 3vw, 1.3rem);
line-height: 1.3;
margin-bottom: 0.2em;
}
2024-07-18 13:08:32 +00:00
{% endcss %}