Files
website/layouts/shortcodes/blocks/feature.html
T
Chaitanya 6a4238aa71 Accessibility updates - main landmark roles (#17106)
* Removed multiple main tags from home page

Signed-off-by: chaitanyakaranam <chaitanya.karanam@yahoo.com>

* Removed multiple occurances of main in case-studies page

Signed-off-by: chaitanyakaranam <chaitanya.karanam@yahoo.com>

* Replaced css for main tag with .main-section class

Signed-off-by: ChaitanyaKaranam <karanam.krishna.25@gmail.com>

* Added main landmark role for all the pages

Signed-off-by: ChaitanyaKaranam <karanam.krishna.25@gmail.com>

* Force checks.

request-checks: true
2019-10-27 04:43:24 -07:00

16 lines
656 B
HTML

{{/*
This shortcode renders a main feature as seen on the top of the Kubernetes home page.
It can be given a "image" parameter with a name partially matching a file in the images folder of the _common-resources bundle.
*/}}
{{- $imageName := $.Get "image" | default "flower" -}}
{{ if $imageName }}{{- template "shortcodes-blocks_getimage" (dict "name" $imageName "ctx" . "target" "feature-image") -}}{{ end }}
{{- $image := $.Scratch.Get "feature-image" -}}
<div class="main-section">
{{ with $image }}<div class="image-wrapper"><img src="{{ .RelPermalink }}" alt="{{ .Title }}"></div>{{ end }}
<div class="content">
{{ $.Inner }}
</div>
</div>