From f762efde93abe3adf1a9c7ae38013eed6b8ecd1c Mon Sep 17 00:00:00 2001 From: Nicolas Lorin Date: Sat, 11 Mar 2023 11:00:18 +0100 Subject: [PATCH 1/3] Accessibility: no alt text for bg img --- layouts/partials/home/background.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/home/background.html b/layouts/partials/home/background.html index 8bce94c0..e5859b73 100644 --- a/layouts/partials/home/background.html +++ b/layouts/partials/home/background.html @@ -8,7 +8,7 @@ {{ with .Site.Params.defaultBackgroundImage }}{{ $homepageImage = resources.Get . }}{{ end }} {{ with .Site.Params.homepage.homepageImage }}{{ $homepageImage = resources.Get . }}{{ end }} {{ if not (eq $homepageImage "") }} - +
From 6af086dd65fafaf4eeafe9ed21d249a78ce6820c Mon Sep 17 00:00:00 2001 From: Nicolas Lorin Date: Sat, 11 Mar 2023 11:03:26 +0100 Subject: [PATCH 2/3] Perf: add fixed image ratio --- layouts/partials/hero/big.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/hero/big.html b/layouts/partials/hero/big.html index f6287df4..bb96c345 100644 --- a/layouts/partials/hero/big.html +++ b/layouts/partials/hero/big.html @@ -6,11 +6,11 @@ {{- with $featured -}} {{ if $disableImageOptimization }} {{ with . }} - + {{ end }} {{ else }} {{ with .Resize "1200x" }} - + {{ end }} {{ end }} {{- end -}} \ No newline at end of file From b00813ad26e85b86693d2ab4e2890ba3bdacd6b9 Mon Sep 17 00:00:00 2001 From: Nicolas Lorin Date: Sat, 11 Mar 2023 11:04:40 +0100 Subject: [PATCH 3/3] Accessibility: add alt text for big hero --- layouts/partials/hero/big.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/layouts/partials/hero/big.html b/layouts/partials/hero/big.html index bb96c345..cbdce5d5 100644 --- a/layouts/partials/hero/big.html +++ b/layouts/partials/hero/big.html @@ -3,14 +3,16 @@ {{- $images := .Resources.ByType "image" -}} {{- $featured := $images.GetMatch "*feature*" -}} {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} +{{- $alt := .Page.Title -}} +{{- with .Page.Params.alt }}{{ $alt = . }}{{ end -}} {{- with $featured -}} {{ if $disableImageOptimization }} {{ with . }} - + {{ $alt }} {{ end }} {{ else }} {{ with .Resize "1200x" }} - + {{ $alt }} {{ end }} {{ end }} {{- end -}} \ No newline at end of file