Replaced logo names with link titles for images alt text (#16691)

Signed-off-by: ChaitanyaKaranam <karanam.krishna.25@gmail.com>
pull/18287/head
Chaitanya 2019-12-24 10:37:29 +05:30 committed by Kubernetes Prow Robot
parent 9f42b6b743
commit 891814d1d6
1 changed files with 5 additions and 6 deletions

View File

@ -23,13 +23,14 @@
{{ $featuredVideos := where .Pages ".Params.video" "!=" nil }}
{{ with $featuredVideos }}
{{ with index $featuredVideos 0 }}
{{ $altText := .LinkTitle }}
<section id="video">
<div class="main-section">
<div>
<h4><i>"{{ .Params.quote | html }}"</i></h4>
{{ $img := .Resources.GetMatch "video.png" }}
{{ $small := .Resources.GetMatch "**small*.svg" }}
{{ with $small }}<img height="60px" src="{{ .RelPermalink }}" alt="{{ .Title }}">{{ end }}
{{ with $small }}<img height="60px" src="{{ .RelPermalink }}" alt="{{ $altText }}">{{ end }}
</div>
<div style= "padding-left: 40px;"><button onclick="kub.showVideo()">{{ with $img }}<img src="{{ .RelPermalink }}" alt="Box video">{{ end }}<h6>Kubernetes at Box</h6></button></div>
</div>
@ -66,12 +67,10 @@
{{ end }}
{{ define "case-study-featured-block" }}
{{ $isForeignLanguage := (ne .page.Lang .ctx.Lang)}}
{{ $logo := .page.Resources.GetMatch "**{feature,logo}*.svg" }}
{{ if not $logo }}
{{ $logo = .page.Resources.GetMatch "**{feature,logo}*.png" }}
{{ end }}
{{ $logo := .page.Resources.GetMatch "**{feature,logo}*.png" }}
{{ $altText := .page.LinkTitle}}
<div class="case-study">
{{ with $logo }}<img src="{{ .RelPermalink }}" height="127px" alt="{{ .Title }}">{{ end }}
{{ with $logo }}<img src="{{ .RelPermalink }}" alt="{{ $altText }}">{{ 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>