mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
13 lines
410 B
HTML
13 lines
410 B
HTML
<a {{ with .Get "href"}} href="{{.}}" target="_blank" {{ end }} class="btn btn-default">
|
|
{{ $icon := .Get "icon" }}
|
|
{{ $iconposition := .Get "icon-position" }}
|
|
{{ if ($icon) }}
|
|
{{ if or (not ($iconposition)) (eq $iconposition "left") }}
|
|
<i class="{{$icon}}"></i>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ .Inner }}
|
|
{{ if and ($icon) (eq $iconposition "right")}}
|
|
<i class="{{$icon}}"></i>
|
|
{{ end }}
|
|
</a>
|