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