From 22f5db7bdb3b6bdbdd594d6f9562c4dba1fd070c Mon Sep 17 00:00:00 2001 From: Morgan <103436411+MorganKryze@users.noreply.github.com> Date: Wed, 17 Apr 2024 19:07:13 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=9F=20make=20first=20image=20eager=20t?= =?UTF-8?q?o=20load?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/src/components/GalleryImage.astro | 7 ++++--- src/src/pages/collections/france.astro | 12 ++++++------ src/src/pages/collections/sardegna.astro | 12 ++++++------ src/src/pages/collections/tales.astro | 12 ++++++------ 4 files changed, 22 insertions(+), 21 deletions(-) diff --git a/src/src/components/GalleryImage.astro b/src/src/components/GalleryImage.astro index a1d5c56..e2b3bbe 100644 --- a/src/src/components/GalleryImage.astro +++ b/src/src/components/GalleryImage.astro @@ -4,14 +4,15 @@ import "../animations/hide.astro"; interface Props { image: string; + loading?: 'lazy' | 'eager'; } -const { image } = Astro.props; +const { image, loading = 'lazy' } = Astro.props; --- gallery + loading={loading} +/> \ No newline at end of file diff --git a/src/src/pages/collections/france.astro b/src/src/pages/collections/france.astro index f84435c..2b790d8 100644 --- a/src/src/pages/collections/france.astro +++ b/src/src/pages/collections/france.astro @@ -20,8 +20,8 @@ import GalleryImage from "../../components/GalleryImage.astro"; nextCollectionLink="sardegna" >
- - + + @@ -40,8 +40,8 @@ import GalleryImage from "../../components/GalleryImage.astro";
- - + + @@ -61,8 +61,8 @@ import GalleryImage from "../../components/GalleryImage.astro";
- - + + diff --git a/src/src/pages/collections/sardegna.astro b/src/src/pages/collections/sardegna.astro index 62fff25..7e9ff86 100644 --- a/src/src/pages/collections/sardegna.astro +++ b/src/src/pages/collections/sardegna.astro @@ -19,8 +19,8 @@ import CollectionLayout from "../../layouts/CollectionLayout.astro"; nextCollectionLink="ireland" >
- - + + @@ -28,16 +28,16 @@ import CollectionLayout from "../../layouts/CollectionLayout.astro";
- - + +
- - + + diff --git a/src/src/pages/collections/tales.astro b/src/src/pages/collections/tales.astro index 02e3b80..b871268 100644 --- a/src/src/pages/collections/tales.astro +++ b/src/src/pages/collections/tales.astro @@ -19,8 +19,8 @@ import GalleryImage from "../../components/GalleryImage.astro"; nextCollectionLink="france" >
- - + + @@ -29,8 +29,8 @@ import GalleryImage from "../../components/GalleryImage.astro";
- - + + @@ -39,8 +39,8 @@ import GalleryImage from "../../components/GalleryImage.astro";
- - + +