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

16 lines
351 B
HTML
Raw Normal View History

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