summaryrefslogtreecommitdiffstats
path: root/layouts/partials/docs-pager.html
blob: e44b5708acc44c1fb0adf374edd50a646db6ce5a (plain)
1
2
3
4
5
6
7
8
9
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 }}