diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-10-06 21:44:28 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-10-06 21:44:28 +0200 |
| commit | 9a29017390e5b9ceaf0e247652e5d5b657268909 (patch) | |
| tree | 1641db0af46c3a971e924ac47a03ad881277de43 /layouts/posts | |
| parent | 2796e991325d9da5b0dfb4d3cf0315f825f082a0 (diff) | |
Remove pagination by default
Diffstat (limited to 'layouts/posts')
| -rw-r--r-- | layouts/posts/list.html | 30 |
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 }} |
