mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
button: fix whitespace on minify #737
the resulting html must be on one line; otherwise the minifier runs havok
This commit is contained in:
parent
13822f44a2
commit
9ef0c1f8b1
1 changed files with 3 additions and 3 deletions
|
@ -45,9 +45,9 @@
|
||||||
{{- $icon = printf "fa-fw fas fa-%s" $icon }}
|
{{- $icon = printf "fa-fw fas fa-%s" $icon }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $iconposition := .iconposition | default "left" }}
|
{{- $iconposition := .iconposition | default "left" }}
|
||||||
{{- with $page }}
|
{{- with $page -}}
|
||||||
<span class="btn cstyle {{ $style }}"{{ if $color }} style="--VARIABLE-BOX-color: {{ $color }};"{{ end }}>
|
<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 }}>
|
<button{{ if $href }} onclick="{{ $href | safeJS }}"{{ end }}{{ if gt (len $type) 0 }} type="{{ $type }}"{{ end }}>
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
<a{{ if $href }} href="{{ $href }}"{{ if gt (len $target) 0 }} target="{{ $target }}"{{ end }}{{ end }}>
|
<a{{ if $href }} href="{{ $href }}"{{ if gt (len $target) 0 }} target="{{ $target }}"{{ end }}{{ end }}>
|
||||||
|
@ -61,6 +61,6 @@
|
||||||
</button>
|
</button>
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
</a>
|
</a>
|
||||||
{{- end }}
|
{{- end -}}
|
||||||
</span>
|
</span>
|
||||||
{{- end }}
|
{{- end }}
|
Loading…
Reference in a new issue