{{- $style := or (.Get "style") (.Get 0) "default" -}} {{- $attributes := partial "docs/text/mapper" (dict "attributes" (cond .IsNamedParams .Params dict) "merge" (dict "class" (slice "book-badge" $style) ) ) -}} {{- with or (.Get "title") (.Get 1) -}}{{ . | plainify }}{{- end -}} {{- with or (.Get "value") (.Get 2) -}}{{ . | plainify }}{{- end -}} {{- /* remove whitespaces */ -}}