vanilla-hugo/layouts/partials/seriesnav.html
Danila Fedorin 9abee96bd2 Fix double-used navigation ID and odd centering issue
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-06-19 22:28:49 -07:00

15 lines
515 B
HTML

{{- $page := . -}}
{{ $term := index (.GetTerms "series") 0 }}
{{ with $term }}
{{- /* No idea why the 'Reverse' is needed? */ -}}
{{ $pages := (site.Taxonomies.series.Get .Data.Term).Pages.ByDate.Reverse }}
<nav class="series-navigation">
{{ with $pages.Prev $page }}
{{ partial "serieslink.html" (dict "direction" "previous" "link" .RelPermalink "page" .) }}
{{ end }}
{{ with $pages.Next $page }}
{{ partial "serieslink.html" (dict "direction" "next" "link" .RelPermalink "page" .) }}
{{ end }}
</nav>
{{ end }}