hugo-theme-relearn/layouts/shortcodes/button.html
Sören Weber 8b70bdf31a
Some checks failed
docs-build-deployment / Run deploy (push) Has been cancelled
docs-build / Run build (push) Has been cancelled
theme: guard access to page.File.Filename #1005
2025-01-31 14:57:16 +01:00

17 lines
No EOL
809 B
HTML

{{- $_hugo_config := `{ "version": 1 }` }}
{{- if (.Get "icon-position") }}
{{- $filepath := "[virtual file]" }}{{ with and .Page .Page.File .Page.File.Filename }}{{ $filepath = . }}{{ end }}
{{- warnf "%q: DEPRECATED parameter 'icon-position' for shortcode 'button' found, use 'iconposition' instead; see https://mcshelby.github.io/hugo-theme-relearn/shortcodes/button#parameter" $filepath }}
{{- end }}
{{- partial "shortcodes/button.html" (dict
"page" .Page
"color" (.Get "color")
"content" .Inner
"href" (.Get "href")
"icon" (.Get "icon")
"iconposition" ((.Get "iconposition") | default (.Get "icon-position"))
"style" (.Get "style")
"title" (.Get "title")
"target" (.Get "target")
"type" (.Get "type")
) }}