topbar: streamline button configuration #978

This commit is contained in:
Sören Weber 2024-12-31 14:12:39 +01:00
parent 2cd8baa02f
commit 7807445527
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
4 changed files with 7 additions and 8 deletions

View file

@ -2,8 +2,8 @@
{{- $onwidthm := cond (isset . "onwidthm") .onwidthm "show" }} {{- $onwidthm := cond (isset . "onwidthm") .onwidthm "show" }}
{{- $onwidthl := cond (isset . "onwidthl") .onwidthl "show" }} {{- $onwidthl := cond (isset . "onwidthl") .onwidthl "show" }}
{{- with .page }} {{- with .page }}
{{- $showPrevNext := (and (not .Params.disableNextPrev) (not .Site.Params.disableNextPrev)) }} {{- $show := not (.Param "disableNextPrev") }}
{{- if $showPrevNext }} {{- if $show }}
{{- $endarrow := "🡒" }} {{- $endarrow := "🡒" }}
{{- if eq (.Language.LanguageDirection | default (T "Reading-direction") | default "ltr") "rtl" }} {{- if eq (.Language.LanguageDirection | default (T "Reading-direction") | default "ltr") "rtl" }}
{{- $endarrow = "🡐" }} {{- $endarrow = "🡐" }}

View file

@ -2,8 +2,8 @@
{{- $onwidthm := cond (isset . "onwidthm") .onwidthm "show" }} {{- $onwidthm := cond (isset . "onwidthm") .onwidthm "show" }}
{{- $onwidthl := cond (isset . "onwidthl") .onwidthl "show" }} {{- $onwidthl := cond (isset . "onwidthl") .onwidthl "show" }}
{{- with .page }} {{- with .page }}
{{- $showPrevNext := (and (not .Params.disableNextPrev) (not .Site.Params.disableNextPrev)) }} {{- $show := not (.Param "disableNextPrev") }}
{{- if $showPrevNext }} {{- if $show }}
{{- $startarrow := "🡐" }} {{- $startarrow := "🡐" }}
{{- if eq (.Language.LanguageDirection | default (T "Reading-direction") | default "ltr") "rtl" }} {{- if eq (.Language.LanguageDirection | default (T "Reading-direction") | default "ltr") "rtl" }}
{{- $startarrow = "🡒" }} {{- $startarrow = "🡒" }}

View file

@ -3,9 +3,8 @@
{{- $onwidthm := cond (isset . "onwidthm") .onwidthm "show" }} {{- $onwidthm := cond (isset . "onwidthm") .onwidthm "show" }}
{{- $onwidthl := cond (isset . "onwidthl") .onwidthl "show" }} {{- $onwidthl := cond (isset . "onwidthl") .onwidthl "show" }}
{{- with .page }} {{- with .page }}
{{- $defaultDisableToc := .Site.Params.disableToc | default false }} {{- $show := not (.Param "disableToc") }}
{{- $currentDisableToc := .Params.disableToc | default $defaultDisableToc }} {{- if $show }}
{{- if not $currentDisableToc }}
{{- $content := partial "toc-class.html" . }} {{- $content := partial "toc-class.html" . }}
{{- $hascontent := not (eq 0 (int (len (trim ($content | plainify) "\n\r\t ")))) }} {{- $hascontent := not (eq 0 (int (len (trim ($content | plainify) "\n\r\t ")))) }}
{{- if not $hascontent }} {{- if not $hascontent }}

View file

@ -1 +1 @@
7.2.1+d9152f9abaf57fec38d9a8ede67ebbf94303b9e3 7.2.1+2cd8baa02f811124d580c519d95b3f977a1972f6