Add button shortcode.

This commit is contained in:
Fredrik Jonsson 2022-05-24 19:42:35 +02:00
commit f17836facc

View file

@ -0,0 +1,5 @@
{{ $class := .Get "class" -}}
{{ $newtab := .Get "newtab" | default false -}}
{{ $src := .Get "src" -}}
{{ $text := .Get "text" -}}
<a class="button{{ with $class }} {{ . }}{{ end }}" href="{{ $src }}"{{ if $newtab }} target="_blank" rel="noopener noreferrer"{{ end }}>{{ $text }}</a>