diff options
| author | Arne Rief <riearn@proton.me> | 2025-08-16 22:42:03 +0200 |
|---|---|---|
| committer | Arne Rief <riearn@proton.me> | 2025-08-16 22:42:03 +0200 |
| commit | f0506acd6f70da636b8fdb23439c85bbf2392b40 (patch) | |
| tree | d9c4082aafa3e20a37174beecadcab54286f9cd9 /layouts/_default/list.html | |
| parent | 1bf4d8aca6f81f2dddd0262e74b278cd9985b53d (diff) | |
HTML templates done
Diffstat (limited to 'layouts/_default/list.html')
| -rw-r--r-- | layouts/_default/list.html | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index e69de29..8ff9b18 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -0,0 +1,33 @@ +{{- define "main" }} +<section class="section-list"> + <header class="section-list__header"> + <h1 class="section-list__headline"> + {{ .Title }} + </h1> + {{- $description := or .Description .Summary (lang.Translate "list.default_description" .Title | default (printf "All posts in %s" .Title)) }} + <p class="section-list__description"> + {{ $description }} + </p> + </header> + + <section class="section-list__content" aria-label="{{ lang.Translate "posts.name" | default "Posts" }}"> + {{- /* 20 posts per site */ -}} + {{- $paginator := .Paginate .Pages 20 }} + {{- with $paginator.Pages }} + <ul class="section-list__posts"> + {{- range . }} + <li class="section-list__post"> + {{- partial "list/post-card.html" . }} + </li> + {{- end }} + </ul> + {{- else }} + <p class="section-list__empty-message"> + {{ lang.Translate "list.empty" | default "No posts found in this section." }} + </p> + {{- end }} + </section> + + {{- partial "list/pagination.html" $paginator }} +</section> +{{- end }} |
