Add button shortcode

This commit is contained in:
Aaron Crawfis 2021-04-05 13:28:22 -07:00
parent b02ea5a11d
commit eace5730f1
1 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1,7 @@
{{ $color := .Get "color" | default "primary" }}
{{ $page := .Get "page" }}
{{ $link := .Get "link" | default "#" }}
{{- if $page -}}{{- $link = ref . $page -}}{{- end -}}
<a class="btn btn-{{ $color }}" href="{{ $link }}" role="button">{{ .Inner }}</a>