aboutsummaryrefslogtreecommitdiff
path: root/layouts/posts/list.html
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2025-10-06 21:44:28 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2025-10-06 21:44:28 +0200
commit9a29017390e5b9ceaf0e247652e5d5b657268909 (patch)
tree1641db0af46c3a971e924ac47a03ad881277de43 /layouts/posts/list.html
parent2796e991325d9da5b0dfb4d3cf0315f825f082a0 (diff)
Remove pagination by default
Diffstat (limited to 'layouts/posts/list.html')
-rw-r--r--layouts/posts/list.html30
1 files changed, 30 insertions, 0 deletions
diff --git a/layouts/posts/list.html b/layouts/posts/list.html
new file mode 100644
index 0000000..77f3b99
--- /dev/null
+++ b/layouts/posts/list.html
@@ -0,0 +1,30 @@
+{{ define "main" }}
+
+{{ $pages := .Pages }}
+{{ $paginator := .Paginate $pages }}
+
+<div class="flex flex-col gap-1">
+ <h1 class="text-2xl font-extrabold">
+ {{ if .Params.header }}
+ {{ .Params.header }}
+ {{ else }}
+ {{ .Title }}
+ {{ end }}
+ </h1>
+
+ {{ with .Content }}
+ {{ . }}
+ {{ end }}
+</div>
+
+<section class="flex flex-col gap-10">
+ {{ range $index, $pages := $paginator.Pages }}
+ {{ partial "list/default" . }}
+ {{ end }}
+</section>
+
+{{ if gt $paginator.TotalPages 1 }}
+ {{ partial "list/pagination" . }}
+{{ end }}
+
+{{ end }}