diff options
author | Juraj Bubniak <juraj.bubniak@exponea.com> | 2020-04-19 12:09:39 +0300 |
---|---|---|
committer | Juraj Bubniak <juraj.bubniak@exponea.com> | 2020-04-19 12:09:39 +0300 |
commit | fd753c3ed3ef3bad35681af001574a3b3964e272 (patch) | |
tree | 0802f313bc57500c2bc1d157b978fa62131202cb | |
parent | abc7a6c4fa9c59e75469af43dc0b46277fe5e908 (diff) |
Make tag list page customizable.
-rw-r--r-- | layouts/partials/tag-pagination.html | 12 | ||||
-rw-r--r-- | layouts/tag/list.html | 18 |
2 files changed, 30 insertions, 0 deletions
diff --git a/layouts/partials/tag-pagination.html b/layouts/partials/tag-pagination.html new file mode 100644 index 0000000..6f14541 --- /dev/null +++ b/layouts/partials/tag-pagination.html @@ -0,0 +1,12 @@ +{{ $pag := $.Paginator }} +{{ if gt $pag.TotalPages 1 }} + <nav class="pagination" role="navigation"> + <span class="page-number">Page {{ $pag.PageNumber }} of {{ $pag.TotalPages }}</span> + {{ if $pag.HasPrev }} + <a class="newer-posts" href="{{ $pag.Prev.URL }}">← Newer Tags</a> + {{ end }} + {{ if $pag.HasNext }} + <a class="older-posts" href="{{ $pag.Next.URL }}">Older Tags →</a> + {{ end }} + </nav> +{{ end }}
\ No newline at end of file diff --git a/layouts/tag/list.html b/layouts/tag/list.html new file mode 100644 index 0000000..eee85ad --- /dev/null +++ b/layouts/tag/list.html @@ -0,0 +1,18 @@ +{{ partial "header.html" . }} + +<div id="post-index" class="container"> + {{ partial "intro.html" . }} + + <ol class="post-list tag-list"> + {{ $pag := .Paginate .Pages }} + {{ range $pag.Pages }} + {{ partial "page-stub.html" . }} + {{ end }} + </ol> + + <div class="post-navigation tag-navigation"> + {{ partial "tag-pagination.html" . }} + </div> +</div> + +{{ partial "footer.html" . }}
\ No newline at end of file |