mirror of
https://github.com/McShelby/hugo-theme-relearn
synced 2025-04-30 06:22:03 +08:00
tree: use correct color for found styles #1067
This commit is contained in:
parent
c5d591c514
commit
64c314c654
@ -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 }}
|
||||
|
@ -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 `<li><i class="fa-fw fas fa-%s cstyle %s"></i><span>%s</span>%s` $icon $color $name $rest }}
|
||||
{{- else }}
|
||||
{{- $replacement = printf `<li><i class="fa-fw fas fa-%s" style="color: %s;"></i><span>%s</span>%s` $icon $color $name $rest }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- $boxStyle := partial "_relearn/boxStyle.gotmpl" (dict "style" $color) }}
|
||||
{{- if $boxStyle.identifier }}
|
||||
{{- if $boxStyle.style }}
|
||||
{{- $replacement = printf `<li><i class="%s cstyle %s"></i><span>%s</span>%s` $icon $color $name $rest }}
|
||||
{{- else }}
|
||||
{{- $replacement = printf `<li><i class="%s" style="color: %s;"></i><span>%s</span>%s` $icon $color $name $rest }}
|
||||
|
@ -1 +1 @@
|
||||
7.5.0+c062fd1ed2a28faac56d4693a8f6e236345f9706
|
||||
7.5.0+c5d591c5149619f251e2a6de0392c513b10b31d1
|
Loading…
x
Reference in New Issue
Block a user