2023-09-18 18:24:49 +00:00
|
|
|
{{- $onwidths := cond (isset . "onwidths") .onwidths "show" }}
|
|
|
|
{{- $onwidthm := cond (isset . "onwidthm") .onwidthm "show" }}
|
|
|
|
{{- $onwidthl := cond (isset . "onwidthl") .onwidthl "show" }}
|
|
|
|
{{- with .page }}
|
|
|
|
{{- $showPrevNext := (and (not .Params.disableNextPrev) (not .Site.Params.disableNextPrev)) }}
|
2024-04-07 19:41:06 +00:00
|
|
|
{{- if $showPrevNext }}
|
2023-09-18 18:24:49 +00:00
|
|
|
{{- $endarrow := "🡒" }}
|
2023-11-28 20:39:50 +00:00
|
|
|
{{- if eq (.Language.LanguageDirection | default (T "Reading-direction") | default "ltr") "rtl" }}
|
2023-09-18 18:24:49 +00:00
|
|
|
{{- $endarrow = "🡐" }}
|
|
|
|
{{- end }}
|
2024-04-07 19:41:06 +00:00
|
|
|
{{- $next := .Scratch.Get "relearnNextPage" }}
|
2024-07-21 22:15:38 +00:00
|
|
|
{{- if eq .Page.Kind "home" }}
|
|
|
|
{{- $format := partial "get-format.hugo" .Page }}
|
|
|
|
{{- $outputFormat := partial "output-format.hugo" (dict "page" .Page "format" $format) }}
|
|
|
|
{{- if eq $outputFormat "searchpage" }}
|
|
|
|
{{- $next = "" }}
|
|
|
|
{{- end }}
|
2023-12-01 00:03:51 +00:00
|
|
|
{{- else if eq .Page.Kind "term" }}
|
|
|
|
{{- /* go to next term page */}}
|
|
|
|
{{- $taxonomy_page := .Site.GetPage .Data.Plural }}
|
|
|
|
{{- $pages := partialCached "partials/pageHelper/taxonomyPages.html" $taxonomy_page $taxonomy_page }}
|
|
|
|
{{- $next = partial "partials/pageHelper/next.html" (dict "collection" $pages "item" .) }}
|
2024-04-07 19:41:06 +00:00
|
|
|
{{- else if eq .Page.Kind "taxonomy" }}
|
|
|
|
{{- /* go to first term page */}}
|
|
|
|
{{- $pages := partialCached "partials/pageHelper/taxonomyPages.html" . . }}
|
|
|
|
{{- $next = (index $pages 0).Page }}
|
2023-09-18 18:24:49 +00:00
|
|
|
{{- end }}
|
2024-07-21 22:15:38 +00:00
|
|
|
{{- $nextTitle := partial "pageHelper/title.hugo" (dict "page" $next "outputFormat" "html") }}
|
2023-09-18 18:24:49 +00:00
|
|
|
{{- partial "topbar/func/button.html" (dict
|
|
|
|
"page" .
|
|
|
|
"class" "topbar-button-next"
|
|
|
|
"href" (partial "relLangPrettyUglyURL.hugo" (dict "to" $next))
|
|
|
|
"icon" "chevron-right"
|
|
|
|
"onwidths" $onwidths
|
|
|
|
"onwidthm" $onwidthm
|
|
|
|
"onwidthl" $onwidthl
|
2024-02-14 22:16:08 +00:00
|
|
|
"hint" (printf "%s (%s)" $nextTitle ($endarrow | safeHTML))
|
2023-09-18 18:24:49 +00:00
|
|
|
)}}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|