aboutsummaryrefslogtreecommitdiff
path: root/layouts/shortcodes/button.html
blob: 98d2cdda4ba757661f6624386606bdd3908912b8 (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="{{.}}" {{ end }} class="book-btn{{ with .Get "class" }} {{ . }}{{ end }}">
  {{ $.Inner }}
</a>