File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ interface Props {
7
7
config: CollectionEntry <" homepage" >;
8
8
}
9
9
const { config } = Astro .props ;
10
+
10
11
---
11
12
12
13
<div class =" px-lg pt-5xl lg:pt-3xl pb-0 h-full" >
@@ -37,7 +38,8 @@ const { config } = Astro.props;
37
38
38
39
{
39
40
config .data .heroImages .map ((im , i ) => (
40
- <a href = { im .linkTarget || undefined } >
41
+ im .linkTarget ?
42
+ <a href = { im .linkTarget } >
41
43
<Image
42
44
containerClass = { ` relative hero-image-container ${i > 0 ? " hidden" : " " } ` }
43
45
class = { " hero-image" }
@@ -47,6 +49,15 @@ const { config } = Astro.props;
47
49
loading = { i > 0 ? " lazy" : " eager" }
48
50
/>
49
51
</a >
52
+ :
53
+ <Image
54
+ containerClass = { ` relative hero-image-container ${i > 0 ? " hidden" : " " } ` }
55
+ class = { " hero-image" }
56
+ aspectRatio = " none"
57
+ src = { im .image }
58
+ alt = { im .altText }
59
+ loading = { i > 0 ? " lazy" : " eager" }
60
+ />
50
61
))
51
62
}
52
63
</div >
You can’t perform that action at this time.
0 commit comments