button: allow for empty href #288

This commit is contained in:
Sören Weber 2022-07-02 14:13:13 +02:00
parent b1547e945f
commit 5e0771f2c4
No known key found for this signature in database
GPG key ID: 07D17FF580AE7589

View file

@ -17,7 +17,7 @@
{{- $iconposition := .iconposition | default "left" }}
{{- with $context }}
<span class="btn cstyle {{ $style }}">
<a href="{{ $href }}" target="_blank">
<a{{ if $href }} href="{{ $href }}" target="_blank"{{ end }}>
{{- if and $icon (eq $iconposition "left") }}
<i class="{{ $icon }}"></i>
{{- end }}