github.com/choria-io/go-choria@v0.28.1-0.20240416190746-b3bf9c7d5a45/docs/themes/hugo-theme-relearn/layouts/partials/topbar/button/next.html (about)

     1  {{- $onwidths := cond (isset . "onwidths") .onwidths "show" }}
     2  {{- $onwidthm := cond (isset . "onwidthm") .onwidthm "show" }}
     3  {{- $onwidthl := cond (isset . "onwidthl") .onwidthl "show" }}
     4  {{- with .page }}
     5  	{{- $format := partial "get-format.hugo" . }}
     6  	{{- $outputFormat := partial "output-format.hugo" (dict "page" . "format" $format) }}
     7  	{{- $showPrevNext := (and (not .Params.disableNextPrev) (not .Site.Params.disableNextPrev)) }}
     8  	{{- if $showPrevNext }}
     9  		{{- $endarrow := "🡒" }}
    10  		{{- if eq (.Language.LanguageDirection | default (T "Reading-direction") | default "ltr") "rtl" }}
    11  			{{- $endarrow = "🡐" }}
    12  		{{- end }}
    13  		{{- $next := .Scratch.Get "relearnNextPage" }}
    14  		{{- if eq $outputFormat "searchpage" }}
    15  			{{- $next = "" }}
    16  		{{- else if eq .Page.Kind "term" }}
    17  			{{- /* go to next term page */}}
    18  			{{- $taxonomy_page := .Site.GetPage .Data.Plural }}
    19  			{{- $pages := partialCached "partials/pageHelper/taxonomyPages.html" $taxonomy_page $taxonomy_page }}
    20  			{{- $next = partial "partials/pageHelper/next.html" (dict "collection" $pages "item" .) }}
    21  		{{- else if eq .Page.Kind "taxonomy" }}
    22  			{{- /* go to first term page */}}
    23  			{{- $pages := partialCached "partials/pageHelper/taxonomyPages.html" . . }}
    24  			{{- $next = (index $pages 0).Page }}
    25  		{{- end }}
    26  		{{- $nextTitle := partial "pageHelper/title.hugo" (dict "page" $next "format" $format "outputFormat" $outputFormat) }}
    27  		{{- partial "topbar/func/button.html" (dict
    28  			"page" .
    29  			"class" "topbar-button-next"
    30  			"href" (partial "relLangPrettyUglyURL.hugo" (dict "to" $next))
    31  			"icon" "chevron-right"
    32  			"onwidths" $onwidths
    33  			"onwidthm" $onwidthm
    34  			"onwidthl" $onwidthl
    35  			"hint" (printf "%s (%s)" $nextTitle ($endarrow | safeHTML))
    36  		)}}
    37  	{{- end }}
    38  {{- end }}