hugo-theme-hilfe/layouts/shortcodes/button.html

18 lines
387 B
HTML
Raw Normal View History

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