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