This repository has been archived on 2022-07-17. You can view files and clone it, but cannot push or open issues or pull requests.
arsenm-dev-site/layouts/partials/main/docs-navigation.html

24 lines
630 B
HTML

{{ if or .Prev .Next -}}
<div class="docs-navigation d-flex justify-content-between">
<!-- https://www.feliciano.tech/blog/custom-sort-hugo-single-pages/ -->
{{ $pages := where site.RegularPages "Section" .Section -}}
{{ with $pages.Next . -}}
<a href="{{ .Permalink }}">
<div class="card my-1">
<div class="card-body py-2">
&Leftarrow; {{ .Title }}
</div>
</div>
</a>
{{ end -}}
{{ with $pages.Prev . -}}
<a class="ml-auto" href="{{ .Permalink }}">
<div class="card my-1">
<div class="card-body py-2">
{{ .Title }} &Rightarrow;
</div>
</div>
</a>
{{ end -}}
</div>
{{ end -}}