From c67e79851fe9ac2683ed09adcda0ece61c926235 Mon Sep 17 00:00:00 2001 From: ksen0 Date: Wed, 15 Jan 2025 15:15:33 -0500 Subject: [PATCH] Only wrap hero image in a link if there is a link target --- src/components/PageHeader/HomePage.astro | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/PageHeader/HomePage.astro b/src/components/PageHeader/HomePage.astro index 38b680ef3e..05ddb0d9f2 100644 --- a/src/components/PageHeader/HomePage.astro +++ b/src/components/PageHeader/HomePage.astro @@ -7,6 +7,7 @@ interface Props { config: CollectionEntry<"homepage">; } const { config } = Astro.props; + ---
@@ -37,7 +38,8 @@ const { config } = Astro.props; { config.data.heroImages.map((im, i) => ( - + im.linkTarget ? + 0 ? "hidden" : ""}`} class={"hero-image"} @@ -47,6 +49,15 @@ const { config } = Astro.props; loading={i > 0 ? "lazy" : "eager"} /> + : + 0 ? "hidden" : ""}`} + class={"hero-image"} + aspectRatio="none" + src={im.image} + alt={im.altText} + loading={i > 0 ? "lazy" : "eager"} + /> )) }