diff --git a/layouts/shortcodes/summary-bar.html b/layouts/shortcodes/summary-bar.html index 1075e61d696a..636c703a4114 100644 --- a/layouts/shortcodes/summary-bar.html +++ b/layouts/shortcodes/summary-bar.html @@ -4,74 +4,79 @@ {{ 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" }} + {{ $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: - +
+ {{ 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 }} + +
+ {{ end }} - {{ with $feature.requires }} -
- Requires: - {{ . | markdownify }} - + {{ with $feature.requires }} +
+ Requires: + {{ . | markdownify }} + {{ partial "icon" $requiresIcon }} - -
- {{ end }} +
+
+ {{ end }} - {{ with $feature.for }} -
- For: - {{ . }} - - {{ partial "icon" $forIcon }} - + {{ with $feature.for }} +
+ For: + {{ . }} + {{ if eq . "Administrators" }} + + {{ partial "icon" $forIcon }} + + {{ end }} +
+ {{ end }}
- {{ end }} -
{{ end }} \ No newline at end of file