1
1
Fork 0
portfolio/_includes/blog-list.njk
2025-05-05 21:53:25 -06:00

45 lines
1.5 KiB
Text

{% include "base-header.html" %}
<main class="max-w-4xl mx-auto sm:px-6 lg:px-8">
<div class="max-w-3x1 mx-auto mb-4 px-2 py-1 sm:rounded contrast-more:bg-base">
<div>
<h1 class="text-6xl tracking-tight text-pink font-serif">
{{ page.fileSlug | capitalize }}
</h1>
<div class="mt-3 text-xl text-subtext1 sm:mt-4">
{{ description | markdown | safe }}
</div>
</div>
<div class="mx-2 bg-base dark:bg-base/85 rounded contrast-more:bg-crust shadow border-l-2 border-yellow">
<div class="flex flex-col gap-12 p-4 sm:p-6 contrast-more:contrast-150">
{%- for post in collections.posts | reverse -%}
<div class="flex flex-col gap-1">
<a href="{{ post.url }}" class="link text-2xl flex flex-col gap-2">
<h2 class="text-2xl order-last font-serif">{{ post.data.title }}</h2>
<div class="order-first bg-mauve rounded">
<img
class="
contrast-50 saturate-0 opacity-50
motion-safe:transition-all
"
src="{{ post.data.coverImage }}"
alt="{{ post.data.imageDescription }}"
/>
</div>
</a>
<p class="text-text">
{{ post.data.description }}
</p>
<p class="text-xs text-mauve">
<time datetime="{{ post.data.date | date('YYYY-MM-DD') }}">{{ post.data.date | date }}</time>
</p>
</div>
{%- endfor -%}
</div>
</div>
</main>
{% include "base-footer.html" %}