summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorAlex Shpak <alex-shpak@users.noreply.github.com>2019-05-27 18:25:58 +0200
committerAlex Shpak <alex-shpak@users.noreply.github.com>2019-05-27 18:25:58 +0200
commita299a4b07b7d78559f70e03a2f0d00cbb205d6f1 (patch)
tree0940d0b0f4a94f4443556f1562921665935d0999 /layouts
parente452a7bedabdfe0c0d62aa4e948902d6632a889d (diff)
#39, Add button shortcode
Diffstat (limited to 'layouts')
-rw-r--r--layouts/shortcodes/button.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/layouts/shortcodes/button.html b/layouts/shortcodes/button.html
new file mode 100644
index 0000000..88b0f20
--- /dev/null
+++ b/layouts/shortcodes/button.html
@@ -0,0 +1,10 @@
+{{ $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="book-btn">{{ $.Inner }}</a>