github.com/square/finch@v0.0.0-20240412205204-6530c03e2b96/docs/themes/hugo-geekdoc/layouts/shortcodes/button.html (about) 1 {{- $ref := "" }} 2 {{- $class := "" }} 3 {{- $size := default "regular" (.Get "size" | lower) }} 4 5 {{- if not (in (slice "regular" "large") $size) }} 6 {{- $size = "regular" }} 7 {{- end }} 8 9 {{- with .Get "href" }} 10 {{- $ref = . }} 11 {{- end }} 12 13 {{- with .Get "relref" }} 14 {{- $ref = relref $ . }} 15 {{- end }} 16 17 {{- with .Get "class" }} 18 {{- $class = . }} 19 {{- end }} 20 21 22 <span class="gdoc-button gdoc-button--{{ $size }}{{ with $class }}{{ printf " %s" . }}{{ end }}"> 23 <a 24 class="gdoc-button__link" 25 {{- with $ref }}{{ printf " href=\"%s\"" . | safeHTMLAttr }}{{ end }} 26 > 27 {{ $.Inner }} 28 </a> 29 </span>