2022-06-24 08:54:16 +00:00
|
|
|
{{- $ref := "" }}
|
2022-06-27 07:14:24 +00:00
|
|
|
{{- $class := "" }}
|
2022-06-24 08:54:16 +00:00
|
|
|
{{- $size := default "regular" (.Get "size" | lower) }}
|
2021-05-21 13:51:19 +00:00
|
|
|
|
2022-06-24 08:54:16 +00:00
|
|
|
{{- if not (in (slice "regular" "large") $size) }}
|
|
|
|
{{- $size = "regular" }}
|
|
|
|
{{- end }}
|
2020-01-12 14:33:02 +00:00
|
|
|
|
2022-06-24 08:54:16 +00:00
|
|
|
{{- with .Get "href" }}
|
|
|
|
{{- $ref = . }}
|
|
|
|
{{- end }}
|
2020-01-12 14:33:02 +00:00
|
|
|
|
2022-06-24 08:54:16 +00:00
|
|
|
{{- with .Get "relref" }}
|
|
|
|
{{- $ref = relref $ . }}
|
|
|
|
{{- end }}
|
2020-01-12 14:33:02 +00:00
|
|
|
|
2022-06-27 07:14:24 +00:00
|
|
|
{{- with .Get "class" }}
|
|
|
|
{{- $class = . }}
|
|
|
|
{{- end }}
|
|
|
|
|
2022-01-06 12:58:10 +00:00
|
|
|
|
2022-06-27 07:14:24 +00:00
|
|
|
<span class="gdoc-button gdoc-button--{{ $size }}{{ with $class }}{{ printf " %s" . }}{{ end }}">
|
2022-01-06 12:58:10 +00:00
|
|
|
<a
|
|
|
|
class="gdoc-button__link"
|
2022-06-24 08:54:16 +00:00
|
|
|
{{- with $ref }}{{ printf " href=\"%s\"" . | safeHTMLAttr }}{{ end }}
|
2022-01-06 12:58:10 +00:00
|
|
|
>
|
|
|
|
{{ $.Inner }}
|
|
|
|
</a>
|
2020-02-04 23:41:13 +00:00
|
|
|
</span>
|