mirror of
https://github.com/docker/docs.git
synced 2026-10-23 18:09:02 +03:00
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>
11 lines
320 B
HTML
11 lines
320 B
HTML
{{- $name := . -}}
|
|
{{- $path := strings.TrimLeft "/" $name -}}
|
|
{{- if not (strings.Contains $path "/") -}}
|
|
{{- $path = printf "icons/%s.svg" $path -}}
|
|
{{- end -}}
|
|
{{- with resources.Get $path -}}
|
|
{{- .Content | safeHTML -}}
|
|
{{- else -}}
|
|
{{- errorf "Icon not found: %q (resolved to %q)" $name $path -}}
|
|
{{- end -}}
|