Welcome to mirror list, hosted at ThFree Co, Russian Federation.

button.html « shortcodes « layouts - github.com/marketempower/axiom.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a2b9de7f0e28602019d3705f4d9686bce3ab18e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{{- $text := "" -}}
{{- $type := "" -}}
{{- $icon := "" -}}
{{- $href := "" -}}
{{- if .IsNamedParams }}
{{- $text = .Get "text" -}}
{{- $type = .Get "type" -}}
{{- $icon = .Get "icon" -}}
{{- $href = .Get "href" -}}
{{- else }}
{{- $text = .Get 0 -}}
{{- $type = .Get 1 -}}
{{- $icon = .Get 2 -}}
{{- $href = .Get 3 -}}
{{- end }}
{{- if not $text }}
{{- errorf "Missing required 'text'. Shortcode: 'button'." -}}
{{- end }}
{{- partial "button" (dict "Site" $.Site "Page" . "text" $text "type" $type "icon" $icon "href" $href) -}}