mirror of
https://github.com/thegeeklab/hugo-geekblog.git
synced 2024-11-25 06:20:40 +00:00
26 lines
496 B
HTML
26 lines
496 B
HTML
{{ $ref := "" }}
|
|
{{ $size := default "regular" (.Get "size" | lower) }}
|
|
|
|
{{ if not (in (slice "regular" "large") $size) }}
|
|
{{ $size = "regular" }}
|
|
{{ end }}
|
|
|
|
{{ with .Get "href" }}
|
|
{{ $ref = . }}
|
|
{{ end }}
|
|
|
|
{{ with .Get "relref" }}
|
|
{{ $ref = relref $ . }}
|
|
{{ end }}
|
|
|
|
|
|
<span
|
|
class="gblog-button gblog-button--{{ $size }}{{ with .Get "class" }}
|
|
{{ printf " %s" . }}
|
|
{{ end }}"
|
|
>
|
|
<a {{ with $ref }}href="{{ . }}"{{ end }} class="gblog-button__link">
|
|
{{ $.Inner }}
|
|
</a>
|
|
</span>
|