github.com/mweagle/Sparta@v1.15.0/docs_source/themes/hugo-theme-learn/layouts/shortcodes/button.html (about) 1 {{ $_hugo_config := `{ "version": 1 }` }} 2 <a {{ with .Get "href"}} href="{{.}}" target="_blank" {{ end }} class="btn btn-default"> 3 {{ $icon := .Get "icon" }} 4 {{ $iconposition := .Get "icon-position" }} 5 {{ if ($icon) }} 6 {{ if or (not ($iconposition)) (eq $iconposition "left") }} 7 <i class="{{$icon}}"></i> 8 {{ end }} 9 {{ end }} 10 {{ .Inner }} 11 {{ if and ($icon) (eq $iconposition "right")}} 12 <i class="{{$icon}}"></i> 13 {{ end }} 14 </a>