Compare commits

..

2 Commits

Author SHA1 Message Date
acf86b8d76 Add a placeholder for "next in series" if the series is ongoing
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-06-26 19:48:55 -07:00
a5cda19e5e Remove unused whitespace in seriesnav.html
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-06-26 19:35:23 -07:00
4 changed files with 29 additions and 12 deletions

View File

@ -381,7 +381,7 @@ figure {
}
a {
a, .ongoing-placeholder {
@include bordered-block;
padding: 0.5em 1em 0.5em 1em;
font-size: 1.1em;
@ -398,6 +398,10 @@ figure {
}
}
.ongoing-placeholder {
border-style: dashed;
}
div.title {
font-weight: bold;
}

View File

@ -1,5 +1,5 @@
<div class="{{ .direction }} wrapper">
<a href="{{ .link }}">
<a href="{{ .page.RelPermalink }}">
{{ if eq .direction "previous" }}{{ partial "icon.html" "chevrons-left" }}{{ end }}
<div class="title-subtitle">
{{ title .direction }} in Series

View File

@ -0,0 +1,10 @@
<div class="{{ .direction }} wrapper">
<div class="ongoing-placeholder">
{{ if eq .direction "previous" }}{{ partial "icon.html" "chevrons-left" }}{{ end }}
<div class="title-subtitle">
{{ title .direction }} in Series
<div class="title">Coming soon!</div>
</div>
{{ if eq .direction "next" }}{{ partial "icon.html" "chevrons-right" }}{{ end }}
</a>
</div>

View File

@ -1,14 +1,17 @@
{{- $page := . -}}
{{ $term := index (.GetTerms "series") 0 }}
{{ with $term }}
{{- $term := index (.GetTerms "series") 0 -}}
{{- with $term -}}
{{- /* No idea why the 'Reverse' is needed? */ -}}
{{ $pages := (site.Taxonomies.series.Get .Data.Term).Pages.ByDate.Reverse }}
{{- $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 }}
{{- with $pages.Prev $page -}}
{{- partial "serieslink.html" (dict "direction" "previous" "page" .) -}}
{{- end -}}
{{- $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 }}
{{- end -}}