Add support for series navigation links
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
16
layouts/partials/serieslink.html
Normal file
16
layouts/partials/serieslink.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user