mirror of
https://github.com/thegeeklab/hugo-geekblog.git
synced 2024-11-04 20:30:44 +00:00
18 lines
389 B
HTML
18 lines
389 B
HTML
|
{{ $ref := "" }}
|
||
|
{{ $target := "" }}
|
||
|
|
||
|
{{ with .Get "href" }}
|
||
|
{{ $ref = . }}
|
||
|
{{ $target = "_blank" }}
|
||
|
{{ end }}
|
||
|
|
||
|
{{ with .Get "relref" }}
|
||
|
{{ $ref = relref $ . }}
|
||
|
{{ end }}
|
||
|
|
||
|
<span class="gblog-button{{ with .Get "class" }} {{ . }}{{ end }}">
|
||
|
<a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" {{ end }} class="gblog-button__link">
|
||
|
{{ $.Inner }}
|
||
|
</a>
|
||
|
</span>
|