{{ $color := .Get "color" | default "primary" }}
{{ $page := .Get "page" }}
{{ $link := .Get "link" | default "#" }}
{{ $text := .Get "text" }}
{{ $newtab := .Get "newtab" | default "false" }}

{{- if $page -}}{{- $link = ref . $page -}}{{- end -}}

<a class="btn btn-{{ $color }}" href="{{ $link }}" role="button" {{- if eq $newtab "true" -}}target="_blank"{{- end -}}>{{ $text }}</a>
