15 lines
711 B
HTML
15 lines
711 B
HTML
{{ $icon := resources.Get (printf "icons/%s.svg" ($.Get "icon")) }}
|
|
{{ $text := .Get "text" -}}
|
|
{{ $link := .Get "link" -}}
|
|
|
|
<a href="{{ $link }}" class="bg-primary-600 w-40 h-12 hover:bg-primary-900 shadow-md hover:shadow-xl hover:!rounded-full text-neutral-300 rounded-full fixed bottom-4 inset-x-1/2 text-center">
|
|
<i class="hover:rounded-full">{{ $text }}</i>
|
|
{{ if $icon }}
|
|
<span class="relative inline-block align-sub icon">
|
|
{{ $icon.Content | safeHTML }}
|
|
</span>
|
|
{{ else }}
|
|
{{ errorf `[BLOWFISH] Shortcode "icon" error in "%s": Resource "%s" not found. Check the path is correct or remove the shortcode.` .Page.Path (printf "icons/%s.svg" ($.Get 0)) }}
|
|
{{ end }}
|
|
</a>
|