diff options
Diffstat (limited to 'layouts/posts/list.html')
| -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 }} |
