diff options
Diffstat (limited to 'layouts/partials/docs-pager.html')
| -rw-r--r-- | layouts/partials/docs-pager.html | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/layouts/partials/docs-pager.html b/layouts/partials/docs-pager.html new file mode 100644 index 0000000..e44b570 --- /dev/null +++ b/layouts/partials/docs-pager.html @@ -0,0 +1,10 @@ +{{/* Pages.Next steps toward index 0, so reversing makes "next" the following page. */}} +{{ $pages := (site.GetPage "/hardenedpass").RegularPagesRecursive.ByWeight.Reverse }} +{{ $prev := $pages.Prev . }} +{{ $next := $pages.Next . }} +{{ if or $prev $next }} +<nav class="flex justify-between gap-4 border-t border-border pt-6 font-mono text-sm" aria-label="{{ i18n "docsPager" }}"> + <span>{{ with $prev }}<a href="{{ .RelPermalink }}" rel="prev" class="text-accent">◄ {{ .Title }}</a>{{ end }}</span> + <span class="text-right">{{ with $next }}<a href="{{ .RelPermalink }}" rel="next" class="text-accent">{{ .Title }} ►</a>{{ end }}</span> +</nav> +{{ end }} |
