Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jbub/ghostwriter.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuraj Bubniak <juraj.bubniak@exponea.com>2020-04-19 12:09:39 +0300
committerJuraj Bubniak <juraj.bubniak@exponea.com>2020-04-19 12:09:39 +0300
commitfd753c3ed3ef3bad35681af001574a3b3964e272 (patch)
tree0802f313bc57500c2bc1d157b978fa62131202cb
parentabc7a6c4fa9c59e75469af43dc0b46277fe5e908 (diff)
Make tag list page customizable.
-rw-r--r--layouts/partials/tag-pagination.html12
-rw-r--r--layouts/tag/list.html18
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 }}">&larr; Newer Tags</a>
+ {{ end }}
+ {{ if $pag.HasNext }}
+ <a class="older-posts" href="{{ $pag.Next.URL }}">Older Tags &rarr;</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