feat: 🎉 initial commit

This commit is contained in:
Sebin Nyshkim 2024-10-11 21:47:59 +02:00
commit b3003321c9
35 changed files with 9015 additions and 0 deletions

58
src/layouts/postlist.njk Normal file
View file

@ -0,0 +1,58 @@
---
layout: base.njk
---
<section class="blogpost">
<h1>{{ title }}</h1>
<p>Everything I have written, from newest to oldest.</p>
</section>
{{ content | safe }}
{% if pagination.pages.length > 1 %}
<nav>
<ol class="pagination">
<li>
{% if page.url != pagination.href.first %}
<a href="{{ pagination.href.first }}">{% lucide "chevron-first" %}</a>
{% else %}
<span>{% lucide "chevron-first" %}</span>
{% endif %}
</li>
<li>
{% if pagination.href.previous %}
<a href="{{ pagination.href.previous }}">{% lucide "chevron-left" %}</a>
{% else %}
<span>{% lucide "chevron-left" %}</span>
{% endif %}
</li>
{%- for pageEntry in pagination.pages %}
<li>
<a
href="{{ pagination.hrefs[ loop.index0 ] }}"
{% if page.url == pagination.hrefs[ loop.index0 ] %}
aria-current="page"
{% endif %}
>
{{ loop.index }}
</a>
</li>
{%- endfor %}
<li>
{% if pagination.href.next %}
<a href="{{ pagination.href.next }}">{% lucide "chevron-right" %}</a>
{% else %}
<span>{% lucide "chevron-right" %}</span>
{% endif %}
</li>
<li>
{% if page.url != pagination.href.last %}
<a href="{{ pagination.href.last }}">{% lucide "chevron-last" %}</a>
{% else %}
<span>{% lucide "chevron-last" %}</span>
{% endif %}
</li>
</ol>
</nav>
{% endif %}