vanilla-hugo/layouts/partials/serieslink.html
Danila Fedorin b282843b40 Add a 'name in series' helper to re-use logic
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-06-16 19:35:31 -07:00

13 lines
508 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
{{ $scratch := newScratch -}}
{{- partial "nameinseries.html" (dict "page" .page "scratch" $scratch) -}}
<div class="title">{{ $scratch.Get "name" }}</div>
</div>
{{ if eq .direction "next" }}{{ partial "icon.html" "chevrons-right" }}{{ end }}
</a>
</div>