2020-01-12 15:33:02 +01:00
|
|
|
{{ $ref := "" }}
|
|
|
|
{{ $target := "" }}
|
2021-05-21 15:51:19 +02:00
|
|
|
{{ $size := default "regular" (.Get "size" | lower) }}
|
|
|
|
|
|
|
|
{{ if not (in (slice "regular" "large") $size) }}
|
|
|
|
{{ $size = "regular" }}
|
|
|
|
{{ end }}
|
2020-01-12 15:33:02 +01:00
|
|
|
|
|
|
|
{{ with .Get "href" }}
|
2020-04-15 01:09:53 +02:00
|
|
|
{{ $ref = . }}
|
|
|
|
{{ $target = "_blank" }}
|
2020-01-12 15:33:02 +01:00
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ with .Get "relref" }}
|
2020-04-15 01:09:53 +02:00
|
|
|
{{ $ref = relref $ . }}
|
2020-01-12 15:33:02 +01:00
|
|
|
{{ end }}
|
|
|
|
|
2021-05-21 15:51:19 +02:00
|
|
|
<span class="gdoc-button gdoc-button--{{ $size }}{{ with .Get "class" }} {{ . }}{{ end }}">
|
2020-02-05 00:41:13 +01:00
|
|
|
<a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" {{ end }} class="gdoc-button__link">
|
2020-04-15 01:09:53 +02:00
|
|
|
{{ $.Inner }}
|
2020-01-12 15:33:02 +01:00
|
|
|
</a>
|
2020-02-05 00:41:13 +01:00
|
|
|
</span>
|