From f29b4c3bb05c7fe3885bf4af6a05ebc29e62d675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Pe=CC=81ault?= Date: Sun, 17 Oct 2021 22:17:52 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Use=20Directus=20Storage=20Asset?= =?UTF-8?q?s=20Presets=20only=20for=20images?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Block the generation of other image sizes from the URL TODO: Block the access to root asset url as it still displays the original file --- src/components/atoms/Image.svelte | 34 +++++++------ src/components/molecules/Location.svelte | 14 ++++-- src/components/molecules/PhotoCard.svelte | 2 + src/components/molecules/PostCard.svelte | 8 ++- src/components/organisms/Shop.svelte | 10 +++- .../[country]/[location]/[photo].svelte | 5 +- src/routes/[country]/[location]/index.svelte | 50 +++++++++++-------- src/routes/photos.svelte | 9 +++- src/routes/subscribe.svelte | 7 ++- src/utils/helpers.ts | 11 ++++ 10 files changed, 103 insertions(+), 47 deletions(-) diff --git a/src/components/atoms/Image.svelte b/src/components/atoms/Image.svelte index 78df214..999876c 100644 --- a/src/components/atoms/Image.svelte +++ b/src/components/atoms/Image.svelte @@ -1,14 +1,13 @@ {alt} diff --git a/src/components/molecules/Location.svelte b/src/components/molecules/Location.svelte index fda8b23..e2d37f6 100644 --- a/src/components/molecules/Location.svelte +++ b/src/components/molecules/Location.svelte @@ -55,7 +55,13 @@ on:mouseleave={handleMouseLeave} sveltekit-noscroll > - Flag of {location.country.name} + Flag of {location.country.name}
@@ -75,8 +81,10 @@ {#each location.photos as { image }, index} {image.title} {/each}
diff --git a/src/components/molecules/PhotoCard.svelte b/src/components/molecules/PhotoCard.svelte index 3156e11..6fe81d8 100644 --- a/src/components/molecules/PhotoCard.svelte +++ b/src/components/molecules/PhotoCard.svelte @@ -17,6 +17,7 @@ {alt} Stamp - Flag of {country} + Flag of {country}