{{ $featureName := .Get "feature_name" }} {{ $feature := index hugo.Data.summary $featureName }} {{ if not $feature }} {{ errorf "[summary-bar] invalid feature: %s %v" $featureName .Position }} {{ end }} {{ if $feature }} {{ $subscriptionIcons := dict "Business" "building-office" "Team" "user-group" "Pro" "user-plus" "Personal" "user" "Available to all" "globe-alt" "Docker Hardened Images Enterprise" "/icons/dhi.svg" "Docker Hardened Images Select or Enterprise" "/icons/dhi.svg" "Docker Offload" "cloud" }} {{ $availabilityIcons := dict "Experimental" "beaker" "Beta" "bolt" "Early Access" "rocket-launch" "GA" "check-circle" "Retired" "archive-box" }} {{ $requiresIcon := "arrow-down-circle" }} {{ $forIcon := "shield-check" }}
{{ with $feature.subscription }}
Subscription: {{ range . }} {{ . }} {{ $icon := index $subscriptionIcons . }} {{ if $icon }} {{ partialCached "icon" $icon $icon }} {{ else }} {{ partialCached "icon" "question-mark-circle" "question-mark-circle" }} {{ end }} {{ end }}
{{ end }} {{ with $feature.availability }} {{ $availabilityText := . }}
Availability: {{ $availabilityText }} {{ range $key, $icon := $availabilityIcons }} {{ if in $availabilityText $key }} {{ partialCached "icon" $icon $icon }} {{ end }} {{ end }}
{{ end }} {{ with $feature.requires }}
Requires: {{ . | markdownify }} {{ partialCached "icon" $requiresIcon $requiresIcon }}
{{ end }} {{ with $feature.for }}
For: {{ . }} {{ if eq . "Administrators" }} {{ partialCached "icon" $forIcon $forIcon }} {{ end }}
{{ end }}
{{ end }}