Add a placeholder for "next in series" if the series is ongoing
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
@@ -5,10 +5,13 @@
|
||||
{{- $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" .) -}}
|
||||
{{- partial "serieslink.html" (dict "direction" "previous" "page" .) -}}
|
||||
{{- end -}}
|
||||
{{- with $pages.Next $page -}}
|
||||
{{- partial "serieslink.html" (dict "direction" "next" "link" .RelPermalink "page" .) -}}
|
||||
{{- $nextPage := $pages.Next $page -}}
|
||||
{{- if $nextPage -}}
|
||||
{{- partial "serieslink.html" (dict "direction" "next" "page" $nextPage) -}}
|
||||
{{- else if eq $term.Params.status "ongoing" -}}
|
||||
{{- partial "serieslinkplaceholder.html" (dict "direction" "next") -}}
|
||||
{{- end -}}
|
||||
</nav>
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user