summaryrefslogtreecommitdiff
path: root/layouts/shortcodes/button.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/shortcodes/button.html')
-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>