blog/src/index.njk

48 lines
1.1 KiB
Text
Raw Normal View History

{% extends "base.njk" %}
{%- block title -%}
<title>Z. Charles Dziura | Weblog</title>
{%- endblock -%}
{%- block body -%}
2025-04-22 23:15:46 -04:00
{%- import "header.njk" as header -%}
{{ header.header(page='home') }}
<main>
2025-04-23 00:12:42 -04:00
{%- for post in collections.all | reverse -%}
{%- if post.data.type == "thought" -%}
2025-04-24 21:34:23 -04:00
<div class="thought">
<header>
<img class="hash" src="/assets/hash.svg" type="image/svg+xml">
2025-04-23 00:12:42 -04:00
<span>An errant thought...</span>
<a href="{{ post.url }}" class="link">
<img src="/assets/link.svg" type="image/svg+xml">
2025-04-23 00:12:42 -04:00
</a>
</header>
<div class="content">
{{ post.content | safe }}
</div>
<footer>
Posted on {{ post.date | formatDate }}
</footer>
2025-04-24 21:34:23 -04:00
</div>
2025-04-24 10:19:45 -04:00
{%- elif post.data.type == "essay" -%}
2025-04-24 21:34:23 -04:00
<div class="essay">
2025-04-24 10:19:45 -04:00
<header>
<img class="hash" src="/assets/document.svg" type="image/svg+xml">
2025-04-24 21:34:23 -04:00
<a class="title" href="{{ post.url }}">{{ post.data.title }}</a>
2025-04-24 10:19:45 -04:00
</header>
<div class="content">
{{ post.page.excerpt | safe }}
2025-04-24 21:34:23 -04:00
<a class="read-more" href="{{ post.url }}">Read more...</a>
2025-04-24 10:19:45 -04:00
</div>
<footer>
Posted on {{ post.date | formatDate }}
</footer>
2025-04-24 21:34:23 -04:00
</div>
{%- endif -%}
{%- endfor -%}
</main>
{%- endblock -%}