tab: format correctly when called as partial #550

This commit is contained in:
Sören Weber 2023-06-07 21:04:47 +02:00
parent a5e6a30493
commit f52639c9df
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D

View file

@ -11,8 +11,8 @@
{{- $tab = merge $tab (dict "title" .name) }}
{{- end }}
{{- with $tab }}
{{- $color := .color | default $color }}
{{- $style := .style | default $style | default (cond (ne .color "") "filled" "initial") }}
{{- $color := .color | default $color | default "" }}
{{- $style := .style | default $style | default (cond (ne $color "") "filled" "initial") }}
{{- $title := .title | default ($style | T) }}
{{- $title = trim $title " " }}
{{- $icon := .icon | default "" }}
@ -37,7 +37,7 @@
{{- end }}
{{- end }}
{{- $color = .color | default "" }}
{{- $style = .style | default (cond (ne .color "") "filled" "initial") }}
{{- $style = .style | default (cond (ne $color "") "filled" "initial") }}
{{- $title = .title | default ($style | T) }}
{{- $title = trim $title " " }}
{{- $icon = .icon | default "" }}