fix: remove alt in decorative images

This commit is contained in:
ZhenShuo Leo
2025-11-24 08:20:15 +08:00
parent 1be60f89da
commit ec942b013a
7 changed files with 7 additions and 8 deletions

View File

@@ -85,7 +85,7 @@
<div class="flex-none relative overflow-hidden {{ $imgWrapperClasses }} thumbnail">
<img
src="{{ . }}"
alt="{{ with $target.Params.featuredImageAlt }}{{ . }}{{ else }}{{ $target.Title | emojify }}{{ end }}"
role="presentation"
loading="lazy"
decoding="async"
class="not-prose absolute inset-0 w-full h-full object-cover">

View File

@@ -56,7 +56,7 @@
<div class="flex-none relative overflow-hidden thumbnail_card_related">
<img
src="{{ . }}"
alt="{{ $page.Title }}"
role="presentation"
loading="lazy"
decoding="async"
fetchpriority="low"

View File

@@ -60,7 +60,7 @@
<div class="flex-none relative overflow-hidden thumbnail_card">
<img
src="{{ . }}"
alt="{{ $page.Title | plainify }}"
role="presentation"
loading="lazy"
decoding="async"
class="not-prose absolute inset-0 w-full h-full object-cover">

View File

@@ -78,7 +78,7 @@
<div class="flex-none relative overflow-hidden {{ $imgWrapperClasses }} thumbnail">
<img
src="{{ . }}"
alt="{{ $.Params.featuredImageAlt | default ($.Title | emojify) }}"
role="presentation"
loading="lazy"
decoding="async"
class="not-prose absolute inset-0 w-full h-full object-cover">

View File

@@ -69,7 +69,7 @@
<img
id="background-image"
src="{{ . }}"
alt="{{ $.Title }}"
role="presentation"
loading="eager"
decoding="async"
fetchpriority="high"

View File

@@ -53,7 +53,7 @@
<div class="overflow-hidden h-36 md:h-56 lg:h-72">
<img
src="{{ . }}"
alt="{{ with $.Params.featureimagealt }}{{ . }}{{ else }}{{ with $.Title }}Featured image for {{ . }}{{ else }}Featured image{{ end }}{{ end }}"
role="presentation"
loading="eager"
decoding="async"
fetchpriority="high"

View File

@@ -87,7 +87,7 @@
<div class="overflow-hidden rounded-md h-36 md:h-56 lg:h-72 nozoom">
<img
src="{{ . }}"
alt="{{ $.Title }}"
role="presentation"
loading="eager"
decoding="async"
fetchpriority="high"
@@ -107,7 +107,6 @@
<img
id="background-image-main"
src="{{ . }}"
alt=""
role="presentation"
loading="eager"
decoding="async"