hugo-theme-relearn/layouts/shortcodes/icon.html
Sören Weber 1f07a0f256
shortcodes: let style fallback to color if not found
this makes the parameter behave similar to the `tree` shortcodes item syntax,
where we had no other choice in handling style/color values without introducing
just another variable and making it overcomplicated
2025-03-24 19:47:12 +01:00

7 lines
No EOL
225 B
HTML

{{- $_hugo_config := `{ "version": 1 }` }}
{{- partial "shortcodes/icon.html" (dict
"page" .Page
"icon" (.Get "icon" | default (.Get 0))
"color" (.Get "color" )
"style" (.Get "style" | default (.Get 1))
) }}