Added some support for tags and categories

This commit is contained in:
2026-03-25 09:44:46 +01:00
parent 604d301a1c
commit 9adf6f55a2
2 changed files with 56 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
{{ define "main" }}
<section class="layout-page">
<div class="page-int section-stack">
<header class="space-y-2">
<h1 class="heading-page text-2xl sm:text-3xl">{{ .Title }}</h1>
</header>
{{ $paginator := .Paginate .Pages }}
<div class="grid gap-4 md:grid-cols-2">
{{ range $paginator.Pages.ByDate.Reverse }}
{{ partial "components/post-card.html" (dict "Page" . "Root" $) }}
{{ end }}
</div>
{{ if gt $paginator.TotalPages 1 }}
<nav class="mt-6 flex items-center justify-between text-xs text-muted">
{{ if $paginator.HasPrev }}
<a href="{{ $paginator.Prev.URL }}" class="link-underline">
← Novější
</a>
{{ else }}
<span></span>
{{ end }}
{{ if $paginator.HasNext }}
<a href="{{ $paginator.Next.URL }}" class="link-underline">
Starší →
</a>
{{ else }}
<span></span>
{{ end }}
</nav>
{{ end }}
</div>
</section>
{{ end }}