aboutsummaryrefslogtreecommitdiff
path: root/layouts/shortcodes/button.html
blob: 8ac2d7e82d0e188cd29ac8069e59184a2c77e522 (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 | markdownify }}
</a>