diff options
author | Fredrik Jonsson <frjo@xdeb.org> | 2022-05-24 20:42:35 +0300 |
---|---|---|
committer | Fredrik Jonsson <frjo@xdeb.org> | 2022-05-24 20:42:35 +0300 |
commit | f17836facc890a89231fc4c6cf316bc8ec637f02 (patch) | |
tree | 1148ccb74013fb1ff5aeaab0d443137c5bde90c2 | |
parent | fa45566cb505f6e7575ec297aa276e6195946198 (diff) |
Add button shortcode.
-rw-r--r-- | layouts/shortcodes/button.html | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/layouts/shortcodes/button.html b/layouts/shortcodes/button.html new file mode 100644 index 0000000..a733166 --- /dev/null +++ b/layouts/shortcodes/button.html @@ -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> |