diff --git a/layouts/partials/_relearn/boxStyle.gotmpl b/layouts/partials/_relearn/boxStyle.gotmpl index 61eb190d77..913c95206f 100644 --- a/layouts/partials/_relearn/boxStyle.gotmpl +++ b/layouts/partials/_relearn/boxStyle.gotmpl @@ -18,7 +18,29 @@ ) }} {{- if eq .identifier $style }} {{- $title := .identifier | T }} - {{- $set = dict "identifier" .identifier "style" $style "title" $title "icon" .icon }} + {{- $set = dict "style" $style "title" $title "icon" .icon }} + {{- break }} + {{- end }} + {{- end }} +{{- end }} +{{- if not $set }} + {{- range (slice + (dict "identifier" "primary") + (dict "identifier" "secondary") + (dict "identifier" "accent") + (dict "identifier" "blue") + (dict "identifier" "cyan") + (dict "identifier" "green") + (dict "identifier" "grey") + (dict "identifier" "magenta") + (dict "identifier" "orange") + (dict "identifier" "red") + (dict "identifier" "default") + (dict "identifier" "transparent") + (dict "identifier" "code") + ) }} + {{- if eq .identifier $style }} + {{- $set = dict "style" $style "title" "" "icon" "" }} {{- break }} {{- end }} {{- end }} diff --git a/layouts/partials/shortcodes/tree.html b/layouts/partials/shortcodes/tree.html index 46b43c0161..151c4490f7 100644 --- a/layouts/partials/shortcodes/tree.html +++ b/layouts/partials/shortcodes/tree.html @@ -13,14 +13,14 @@ {{- $classes := split $icon " " }} {{- if eq (len $classes) 1 }} {{- $boxStyle := partial "_relearn/boxStyle.gotmpl" (dict "style" $color) }} - {{- if $boxStyle.identifier }} + {{- if $boxStyle.style }} {{- $replacement = printf `