Files
David Karlsson ee71c80562 chore: migrate icons from Material Symbols to Heroicons
Replaces @material-symbols/svg-400 (5.5 MB) with heroicons (488 KB) — an
11x reduction in icon asset size. Heroicons uses a single consistent
distribution format (24px solid SVGs, fill="currentColor") eliminating
the need for the separate utils/svg.html partial, the icon-svg-stroke CSS
utility, and the dual-path resolution logic in icon.html.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2026-05-18 12:05:54 +02:00

86 lines
2.5 KiB
HTML

{{ $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" }}
<div
class="not-prose summary-bar"
>
{{ with $feature.subscription }}
<div class="flex flex-wrap gap-1">
<span class="font-bold">Subscription:</span>
{{ range . }}
<span>{{ . }}</span>
<span class="icon-svg icon-sm">
{{ $icon := index $subscriptionIcons . }}
{{ if $icon }}
{{ partialCached "icon" $icon $icon }}
{{ else }}
{{ partialCached "icon" "question-mark-circle" "question-mark-circle" }}
{{ end }}
</span>
{{ end }}
</div>
{{ end }}
{{ with $feature.availability }}
{{ $availabilityText := . }}
<div class="flex flex-wrap gap-1">
<span class="font-bold">Availability:</span>
<span>
{{ $availabilityText }}
{{ range $key, $icon := $availabilityIcons }}
{{ if in $availabilityText $key }}
<span class="icon-svg icon-sm">{{ partialCached "icon" $icon $icon }}</span>
{{ end }}
{{ end }}
</span>
</div>
{{ end }}
{{ with $feature.requires }}
<div class="flex flex-wrap gap-1">
<span class="font-bold">Requires:</span>
<span>{{ . | markdownify }}</span>
<span class="icon-svg icon-sm">
{{ partialCached "icon" $requiresIcon $requiresIcon }}
</span>
</div>
{{ end }}
{{ with $feature.for }}
<div class="flex flex-wrap gap-1">
<span class="font-bold">For:</span>
<span>{{ . }}</span>
{{ if eq . "Administrators" }}
<span class="icon-svg icon-sm">
{{ partialCached "icon" $forIcon $forIcon }}
</span>
{{ end }}
</div>
{{ end }}
</div>
{{ end }}