From de759e1b58fac310877706a8b68162f3fa772ff0 Mon Sep 17 00:00:00 2001 From: Sean Morley Date: Mon, 19 Aug 2024 08:43:43 -0400 Subject: [PATCH 1/2] Image display modal --- .../src/lib/components/AdventureCard.svelte | 11 ++++- .../lib/components/ImageDisplayModal.svelte | 42 +++++++++++++++++++ 2 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 frontend/src/lib/components/ImageDisplayModal.svelte diff --git a/frontend/src/lib/components/AdventureCard.svelte b/frontend/src/lib/components/AdventureCard.svelte index 7ea900c2..5083b6bf 100644 --- a/frontend/src/lib/components/AdventureCard.svelte +++ b/frontend/src/lib/components/AdventureCard.svelte @@ -18,6 +18,7 @@ import CollectionLink from './CollectionLink.svelte'; import DotsHorizontal from '~icons/mdi/dots-horizontal'; import DeleteWarning from './DeleteWarning.svelte'; + import ImageDisplayModal from './ImageDisplayModal.svelte'; export let type: string; @@ -27,7 +28,7 @@ let isWarningModalOpen: boolean = false; let keyword: string = ''; - + let image_url: string | null = null; export let adventure: Adventure; if (adventure.type == 'visited') { @@ -155,6 +156,10 @@ /> {/if} +{#if image_url} + (image_url = null)} {adventure} /> +{/if} +
@@ -166,7 +171,9 @@ class="carousel-item w-full" style="display: {i === currentSlide ? 'block' : 'none'}" > - {adventure.name} + (image_url = image.image)} + >{adventure.name}
{#each adventure.images as _, i} +
+ From 39fb4ad1ca2a650028da3e230e9f523b5e50c241 Mon Sep 17 00:00:00 2001 From: Sean Morley Date: Mon, 19 Aug 2024 08:44:00 -0400 Subject: [PATCH 2/2] Image display modal --- frontend/src/lib/components/AdventureCard.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/components/AdventureCard.svelte b/frontend/src/lib/components/AdventureCard.svelte index 5083b6bf..4bf99ca9 100644 --- a/frontend/src/lib/components/AdventureCard.svelte +++ b/frontend/src/lib/components/AdventureCard.svelte @@ -171,7 +171,8 @@ class="carousel-item w-full" style="display: {i === currentSlide ? 'block' : 'none'}" > - (image_url = image.image)} + + (image_url = image.image)} >{adventure.name}