File tree Expand file tree Collapse file tree 4 files changed +33
-7
lines changed Expand file tree Collapse file tree 4 files changed +33
-7
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ params:
5151 link : /desktop/
5252 - title : Docker Hardened Images
5353 description : Secure, minimal base images for trusted software delivery.
54- icon : verified_user
54+ icon : /icons/dhi.svg
5555 link : /dhi/
5656 - title : Build Cloud
5757 description : Build your images faster in the cloud.
Original file line number Diff line number Diff line change 1- {{- $svg := resources.Get (fmt.Printf "icons/%s-fill.svg" .) }}
1+ {{- $icon := . -}}
2+
3+ {{- $svgPath := "" -}}
4+
5+ {{- if or (strings.HasSuffix $icon ".svg") (strings.HasPrefix $icon "icons/") }}
6+ {{- $svgPath = $icon -}}
7+ {{- else }}
8+ {{- $svgPath = printf "icons/%s-fill.svg" $icon -}}
9+ {{- end }}
10+
11+ {{- $svg := resources.Get $svgPath -}}
12+
213{{- if not $svg }}
3- {{- errorf "Failed to get icon: %v\n\n" . }}
4- {{ end }}
14+ {{- errorf "Failed to get icon: %v (resolved path: %s)\n\n" $icon $svgPath }}
15+ {{- end }}
16+
517{{- if not $svg.Content }}
6- {{- errorf "Failed to get icon: %v\n\n" . }}
18+ {{- errorf "Empty content for icon: %v (resolved path: %s) \n\n" $icon $svgPath }}
719{{- end }}
8- {{- safe.HTML $svg.Content -}}
20+
21+ {{- $svg.Content | safeHTML -}}
Original file line number Diff line number Diff line change 1010 "Pro" "person_add"
1111 "Personal" "person"
1212 "Available to all" "public"
13- "Docker Hardened Images" "security "
13+ "Docker Hardened Images" "/icons/dhi.svg "
1414 }}
1515 {{ $availabilityIcons := dict
1616 "Experimental" "science"
You can’t perform that action at this time.
0 commit comments