Use SVGs instead of PNGs in the case studies page (#17095)
* favor svg over png for logos on case studies page * added svgs for all case studies * favor svg over png for logos on case studies page * added svgs for all case studies * duplicating the jd logo so both are svg * switch to svgs in the case studies block on the homepage
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
5ab1671aa3
commit
6e2683269a
@@ -45,11 +45,18 @@
|
||||
<h3>{{ .Title }}</h3>
|
||||
<div id="usersGrid">
|
||||
{{ range $pages.ByTitle }}
|
||||
{{ $logo := .Resources.GetMatch "**logo*.png" }}
|
||||
{{ $logo := .Resources.GetMatch "**{feature,logo}*.svg" }}
|
||||
{{ if not $logo }}
|
||||
{{ $logo = .Resources.GetMatch "**logo*.png" }}
|
||||
{{ end }}
|
||||
{{ $p := . }}
|
||||
<a target="_blank" href="{{ with $p.Params.content_url }}{{ . | safeURL }}{{ else }}{{ .RelPermalink }}{{ end }}">{{ with $logo }}<img src="{{ .RelPermalink }}" alt="{{ $p.LinkTitle }}">{{ else }}
|
||||
{{ errorf "Case Studies: Missing logo for %s. Put a PNG with the word 'logo' in the filename into %q" $p.LinkTitle $p.File.Dir }}
|
||||
{{ end }}</a>
|
||||
<a target="_blank" href="{{ with $p.Params.content_url }}{{ . | safeURL }}{{ else }}{{ .RelPermalink }}{{ end }}">
|
||||
{{ with $logo }}
|
||||
<img src="{{ .RelPermalink }}" height="127px" alt="{{ $p.LinkTitle }}">
|
||||
{{ else }}
|
||||
{{ errorf "Case Studies: Missing logo for %s. Put a PNG or SVG with the word 'logo' in the filename into %q" $p.LinkTitle $p.File.Dir }}
|
||||
{{ end }}
|
||||
</a>
|
||||
{{ end }}
|
||||
<a target="_blank" href="https://docs.google.com/a/google.com/forms/d/e/1FAIpQLScuI7Ye3VQHQTwBASrgkjQDSS5TP0g3AXfFhwSM9YpHgxRKFA/viewform" class="tell-your-story"><img src="/images/case_studies/story.png" alt="{{ T "layouts_case_studies_list_tell" }}"></a>
|
||||
</div>
|
||||
@@ -59,9 +66,12 @@
|
||||
{{ end }}
|
||||
{{ define "case-study-featured-block" }}
|
||||
{{ $isForeignLanguage := (ne .page.Lang .ctx.Lang)}}
|
||||
{{ $logo := .page.Resources.GetMatch "**{feature,logo}*.png" }}
|
||||
{{ $logo := .page.Resources.GetMatch "**{feature,logo}*.svg" }}
|
||||
{{ if not $logo }}
|
||||
{{ $logo = .page.Resources.GetMatch "**{feature,logo}*.png" }}
|
||||
{{ end }}
|
||||
<div class="case-study">
|
||||
{{ with $logo }}<img src="{{ .RelPermalink }}" alt="{{ .Title }}">{{ end }}
|
||||
{{ with $logo }}<img src="{{ .RelPermalink }}" height="127px" alt="{{ .Title }}">{{ end }}
|
||||
<p class="quote">"{{ .page.Params.quote | html }}"</p>
|
||||
<a href="{{ .page.RelPermalink }}"{{ if $isForeignLanguage }} target="_blank"{{ end }}>{{ T "main_read_about"}} {{ .page.LinkTitle }}</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user