#39, Add button shortcode

This commit is contained in:
Alex Shpak
2019-05-27 18:25:58 +02:00
parent e452a7beda
commit a299a4b07b
6 changed files with 35 additions and 3 deletions
+10
View File
@@ -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>