misc: transition image actions

This commit is contained in:
Xylight committed 2024-09-06 17:58:49 -07:00
1 parent 345b12e232
commit 25d60a2acf
1 file changed
+9 -6
+9 -6
View File
@@ -19,8 +19,8 @@
Share,
XMark,
} from 'svelte-hero-icons'
import { backOut, expoOut } from 'svelte/easing'
import { fade, scale } from 'svelte/transition'
import { backOut, elasticOut, expoOut } from 'svelte/easing'
import { fade, fly, scale } from 'svelte/transition'
import { focusTrap } from 'svelte-focus-trap'
/**
@@ -52,13 +52,15 @@
src={$page.state.openImage}
class="w-full object-contain mx-auto my-auto overscroll-contain bg-white dark:bg-zinc-900"
class:max-w-screen-md={!zoomed}
transition:scale={{ start: 0.95, easing: backOut, duration: 250 }}
transition:scale={{ start: 0.95, easing: expoOut, duration: 250 }}
{alt}
/>
<div
class="sticky z-10 bottom-4 w-max mx-auto"
transition:fly={{ duration: 350, y: 14, easing: backOut }}
>
<Material
class="sticky z-10 bottom-4 w-max mx-auto bg-opacity-70 border-opacity-70
backdrop-blur-md gap-1 p-2
flex flex-row items-center"
class="gap-1 p-2 flex flex-row items-center"
rounding="full"
padding="none"
on:click={(e) => e.stopPropagation()}
@@ -107,6 +109,7 @@
</Button>
</Material>
</div>
</div>
{/if}
<button on:click={() => history.back()} class="contents {$$props.class}">