diff --git a/src/lib/components/DataProject.svelte b/src/lib/components/DataProject.svelte index 4331642..a6faa9b 100644 --- a/src/lib/components/DataProject.svelte +++ b/src/lib/components/DataProject.svelte @@ -4,6 +4,9 @@ import ImageGallery from './ImageGallery.svelte'; import { urlFor } from '$lib/sanityClient'; import { browser } from '$app/environment'; + import { slide } from 'svelte/transition'; + import { cubicInOut } from 'svelte/easing'; + const { project, corsoColor } = $props(); let showModal = $state(false); let currentMediaIndex = $state(0); @@ -22,7 +25,6 @@ } function handleImageClick(index) { - //console.log('handleImageClick'); showModal = true; isVideo = false; currentMediaIndex = index; @@ -33,7 +35,6 @@ } function nextMedia() { - //console.log('nextMedia'); if (isVideo) return; if (currentMediaIndex < project.immagini.length - 1) { currentMediaIndex++; @@ -41,7 +42,6 @@ } function prevMedia() { - //console.log('prevMedia'); if (isVideo) return; if (currentMediaIndex > 0) { currentMediaIndex--; @@ -61,10 +61,8 @@ }); $effect(() => { - //console.log(browser, showModal, !isVideo, modalContent, Hammer, 'check'); if (browser && showModal && !isVideo && modalContent && Hammer) { const hammer = new Hammer(modalContent); - //console.log('Hammer initialized'); hammer.on('swipeleft', nextMedia); hammer.on('swiperight', prevMedia); @@ -106,36 +104,14 @@ {#if showModal} -