vanilla-hugo/layouts/partials/serieslink.html
Danila Fedorin e4dccd4f48 Add support for series navigation links
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-20 00:27:25 -07:00

17 lines
603 B
HTML

<div class="{{ .direction }} wrapper">
<a href="{{ .link }}">
{{ if eq .direction "previous" }}{{ partial "icon.html" "chevrons-left" }}{{ end }}
<div class="title-subtitle">
{{ title .direction }} in Series
{{ $divider := .term.Params.divider }}
{{ if $divider }}
{{ $rest := after 1 (split .page.Title $divider) }}
<div class="title">{{ delimit $rest $divider }}</div>
{{ else }}
<div class="title">{{ .page.Title }}</div>
{{ end }}
</div>
{{ if eq .direction "next" }}{{ partial "icon.html" "chevrons-right" }}{{ end }}
</a>
</div>