diff --git a/src/animations/transitions.ts b/src/animations/transitions.ts new file mode 100644 index 0000000..350c4e4 --- /dev/null +++ b/src/animations/transitions.ts @@ -0,0 +1,25 @@ +import { animate } from 'motion' +import { quartOut } from './easings' + +export const scaleFade = (node: HTMLElement, { + delay = 0, + duration = 1, + scale = [0.7, 1], + opacity = [1, 0], + x = null, +}) => { + return { + css: () => { + animate(node, { + scale, + opacity, + x, + z: 0, + }, { + easing: quartOut, + duration, + delay, + }) + } + } +} \ No newline at end of file diff --git a/src/components/molecules/ProcessStep.svelte b/src/components/molecules/ProcessStep.svelte index c18a362..9652a3e 100644 --- a/src/components/molecules/ProcessStep.svelte +++ b/src/components/molecules/ProcessStep.svelte @@ -3,53 +3,60 @@ -
-
- {#if image || video} -
- {#if image} - {image.title} - {:else if video} - - {/if} -
+{#if visible} +
+ {#if image || video} +
+ {#if image} + {image.title} + {:else if video} + {/if} - -
-

{title}

-
- {@html text} -
-
- -
-
\ No newline at end of file + {/if} + +
+ {@html text} +
+
+{/if} \ No newline at end of file diff --git a/src/routes/about/+page.svelte b/src/routes/about/+page.svelte index 9455f0c..3e089c5 100644 --- a/src/routes/about/+page.svelte +++ b/src/routes/about/+page.svelte @@ -3,10 +3,10 @@