hugo-theme-relearn/layouts/partials/topbar/button/next.html

28 lines
991 B
HTML
Raw Normal View History

2023-09-18 20:24:49 +02:00
{{- $onwidths := cond (isset . "onwidths") .onwidths "show" }}
{{- $onwidthm := cond (isset . "onwidthm") .onwidthm "show" }}
{{- $onwidthl := cond (isset . "onwidthl") .onwidthl "show" }}
{{- with .page }}
{{- $show := not (.Param "disableNextPrev") }}
{{- if $show }}
2023-09-18 20:24:49 +02:00
{{- $endarrow := "🡒" }}
{{- if eq (.Language.LanguageDirection | default (T "Reading-direction") | default "ltr") "rtl" }}
2023-09-18 20:24:49 +02:00
{{- $endarrow = "🡐" }}
{{- end }}
2024-09-08 00:12:10 +02:00
{{- $next := partialCached "_relearn/pageNext.gotmpl" . .Path }}
{{- $nextTitle := partial "title.gotmpl" (dict "page" $next "outputFormat" "html") }}
{{- $href := "" }}
{{- with (and $next $next.Path) }}
{{- $href = . }}
{{- end }}
2023-09-18 20:24:49 +02:00
{{- partial "topbar/func/button.html" (dict
"page" .
"class" "topbar-button-next"
"href" $href
2023-09-18 20:24:49 +02:00
"icon" "chevron-right"
"onwidths" $onwidths
"onwidthm" $onwidthm
"onwidthl" $onwidthl
"hint" (printf "%s (%s)" $nextTitle ($endarrow | safeHTML))
2023-09-18 20:24:49 +02:00
)}}
{{- end }}
{{- end }}