hugo-geekdoc/layouts/shortcodes/button.html

18 lines
395 B
HTML
Raw Normal View History

2020-01-12 14:33:02 +00:00
{{ $ref := "" }}
{{ $target := "" }}
{{ with .Get "href" }}
{{ $ref = . }}
{{ $target = "_blank" }}
{{ end }}
{{ with .Get "relref" }}
{{ $ref = relref $ . }}
{{ end }}
2020-02-04 23:41:13 +00:00
<span class="gdoc-button{{ with .Get "class" }} {{ . }}{{ end }}">
<a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" {{ end }} class="gdoc-button__link">
2020-01-12 14:33:02 +00:00
{{ $.Inner }}
</a>
2020-02-04 23:41:13 +00:00
</span>