{{ $featureName := .Get "feature_name" }} {{ $feature := index site.Data.summary $featureName }} {{ if not $feature }} {{ errorf "[summary-bar] invalid feature: %s %v" $featureName .Position }} {{ end }} {{ if $feature }} {{ $subscriptionIcons := dict "Business" "domain" "Team" "groups" "Pro" "person_add" "Personal" "person" "Available to all" "public" }} {{ $availabilityIcons := dict "Experimental" "science" "Beta" "bolt" "Early Access" "rocket_launch" "GA" "check_circle" "Retired" "package_2" }} {{ $requiresIcon := "browser_updated" }} {{ $forIcon := "admin_panel_settings" }}
{{ with $feature.subscription }}
Subscription: {{ range . }} {{ . }} {{ $icon := index $subscriptionIcons . }} {{ if $icon }} {{ partial "icon" $icon }} {{ else }} {{ partial "icon" "default_icon" }} {{ end }} {{ end }}
{{ end }} {{ with $feature.availability }} {{ $availabilityText := . }}
Availability: {{ $availabilityText }} {{ range $key, $icon := $availabilityIcons }} {{ if in $availabilityText $key }} {{ partial "icon" $icon }} {{ end }} {{ end }}
{{ end }} {{ with $feature.requires }}
Requires: {{ . | markdownify }} {{ partial "icon" $requiresIcon }}
{{ end }} {{ with $feature.for }}
For: {{ . }} {{ if eq . "Administrators" }} {{ partial "icon" $forIcon }} {{ end }}
{{ end }}
{{ end }}