aboutsummaryrefslogtreecommitdiff
path: root/layouts/shortcodes/button.html
blob: df50d782f1346655a2ddf370dc40b485b0c662c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
{{ $ref := "" }}
{{ $target := "" }}
{{ with .Get "href" }}
  {{ $ref = . }}
  {{ $target = "_blank" }}
{{ end }}
{{ with .Get "relref" }}
  {{ $ref = relref $ . }}
{{ end }}
<a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" rel="noopener" {{ end }} class="book-btn{{ with .Get "class" }} {{ . }}{{ end }}">
  {{ .Inner | .Page.RenderString }}
</a>