hugo-theme-relearn/layouts/shortcodes/button.html
Sören Weber fe7eb1d432
theme: wildspace
in shortcodes and shortcode output
2021-09-12 09:44:34 +02:00

14 lines
463 B
HTML

{{- $_hugo_config := `{ "version": 1 }` }}
<a{{ with .Get "href"}} href="{{ . }}" target="_blank"{{ end }} class="btn btn-default">
{{- $icon := .Get "icon" }}
{{- $iconposition := .Get "icon-position" }}
{{- if ($icon) }}
{{- if or (not ($iconposition)) (eq $iconposition "left") }}
<i class="{{ $icon }}"></i>
{{- end }}
{{- end }}
{{ .Inner }}
{{- if and ($icon) (eq $iconposition "right")}}
<i class="{{$icon}}"></i>
{{- end }}
</a>