docs-v2/layouts/shortcodes/req.html

4 lines
293 B
HTML
Raw Normal View History

2020-11-25 22:39:25 +00:00
{{- $text := .Get 0 | default "Required" -}}
{{- $type := .Get "type" | default "text" -}}
{{- $class := cond (le (len $text) 2) "asterisk" "" -}}
{{- if ne $type "key" -}}<span class="req {{ $class }}">{{ $text | markdownify }}</span>{{ else }}<span class="req key">* Required</span>{{ end }}