button: fix whitespace on minify #737

the resulting html must be on one line; otherwise the minifier runs havok
This commit is contained in:
Sören Weber 2023-11-29 10:33:48 +01:00
parent 13822f44a2
commit 9ef0c1f8b1
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D

View file

@ -45,9 +45,9 @@
{{- $icon = printf "fa-fw fas fa-%s" $icon }}
{{- end }}
{{- $iconposition := .iconposition | default "left" }}
{{- with $page }}
{{- with $page -}}
<span class="btn cstyle {{ $style }}"{{ if $color }} style="--VARIABLE-BOX-color: {{ $color }};"{{ end }}>
{{- if $isButton }}
{{- if $isButton -}}
<button{{ if $href }} onclick="{{ $href | safeJS }}"{{ end }}{{ if gt (len $type) 0 }} type="{{ $type }}"{{ end }}>
{{- else -}}
<a{{ if $href }} href="{{ $href }}"{{ if gt (len $target) 0 }} target="{{ $target }}"{{ end }}{{ end }}>
@ -61,6 +61,6 @@
</button>
{{- else -}}
</a>
{{- end }}
{{- end -}}
</span>
{{- end }}