Add new tab be configurable

This commit is contained in:
Aaron Crawfis 2021-11-02 14:49:57 -07:00
parent 9660b6d469
commit e01c925821
1 changed files with 2 additions and 1 deletions

View File

@ -2,7 +2,8 @@
{{ $page := .Get "page" }}
{{ $link := .Get "link" | default "#" }}
{{ $text := .Get "text" }}
{{ $opentab := .Get "newtab" | default False }}
{{- if $page -}}{{- $link = ref . $page -}}{{- end -}}
<a class="btn btn-{{ $color }}" href="{{ $link }}" role="button" target="_blank">{{ $text }}</a>
<a class="btn btn-{{ $color }}" href="{{ $link }}" role="button" {{- if $opentab -}}target="_blank"{{- end -}}>{{ $text }}</a>