{{ $error := false }} {{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "release" "args" .Params) }} {{ errorf "Invalid arguments: %s" .Position -}} {{ $error = true }} {{ end }} {{- $version := .Get "version" | default "" -}} {{- $state := .Get "state" | default "new" -}} {{- $short := false -}} {{ with .Get "short" }}{{ $short = partial "utilities/CastBool.html" . }}{{ end -}} {{- $inline := false -}} {{ with .Get "inline" }}{{ $inline = partial "utilities/CastBool.html" . }}{{ end -}} {{- $title := $version -}} {{- $color := "primary" -}} {{- if eq $state "deprecated" -}} {{- $color = "secondary" -}} {{- end -}} {{- $size := .Get "size" | default "md" -}} {{- $class := .Get "class" | default "" -}} {{- $icon := "" -}} {{- $tooltip := "" -}} {{- if eq $state "deprecated" -}} {{- if $short -}} {{- $icon = "fas trash-can" -}} {{- $tooltip = T "deprecatedFeature" $version -}} {{ else }} {{- $title = T "deprecatedFeature" $version -}} {{- end -}} {{- else -}} {{- if $short -}} {{- $icon = "fas rocket" -}} {{- $tooltip = T "addedFeature" $version -}} {{ else }} {{- $title = T "addedFeature" $version -}} {{- end -}} {{- end -}} {{- if not $short -}} {{- if eq $state "deprecated" -}} {{- $title = T "deprecatedFeature" $version -}} {{- else -}} {{- $title = T "addedFeature" $version -}} {{- end -}} {{- end -}} {{- if not $error -}} {{- if not $inline }}