mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-02-14 15:53:31 +00:00
button: cleanup #1008
This commit is contained in:
parent
109d094dc2
commit
881931eb11
2 changed files with 9 additions and 11 deletions
|
@ -24,8 +24,6 @@
|
|||
{{- else if not $href }}
|
||||
{{- else }}
|
||||
{{- $isLink = true }}
|
||||
{{- /* target will be boolean false if no user defined value was set and effect default should be applied */}}
|
||||
{{- $target := false }}
|
||||
{{- $u := urls.Parse .href }}
|
||||
{{- if $u.IsAbs }}
|
||||
{{- partialCached "_relearn/urlExists.gotmpl" (dict "url" .href "page" $page "type" "link") $u.String }}
|
||||
|
@ -58,15 +56,15 @@
|
|||
<button onclick="{{ $href | safeJS }}"{{ if gt (len $type) 0 }} type="{{ $type }}"{{ end }}>
|
||||
{{- else if $isLink -}}
|
||||
<a
|
||||
{{- range $k, $v := $attributes }}
|
||||
{{- if $v }}
|
||||
{{- if eq (printf "%T" $v) "bool" }}
|
||||
{{- printf " %s" $k | safeHTMLAttr }}
|
||||
{{- else }}
|
||||
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
|
||||
{{- range $k, $v := $attributes }}
|
||||
{{- if $v }}
|
||||
{{- if eq (printf "%T" $v) "bool" }}
|
||||
{{- printf " %s" $k | safeHTMLAttr }}
|
||||
{{- else }}
|
||||
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}>
|
||||
{{- end }}>
|
||||
{{- else -}}
|
||||
<span>
|
||||
{{- end }}
|
||||
|
|
|
@ -1 +1 @@
|
|||
7.3.2+72099590d4409d0086ea4b9f6f3188e6847028e6
|
||||
7.3.2+109d094dc2ee4e311e20da415bc8d18c1424dc75
|
Loading…
Add table
Reference in a new issue