mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2024-11-24 20:33:00 +00:00
13 lines
340 B
HTML
13 lines
340 B
HTML
{{ $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>
|