From 40232189a0314a72c4cb516bef4b6306ef24fd10 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 31 Oct 2023 15:55:18 +0100 Subject: [PATCH] feat: only show eintreten in beginning --- src/lib/components/button.svelte | 8 +++- src/lib/components/confetti.svelte | 2 +- src/lib/components/mask.svelte | 2 + src/routes/+page.svelte | 72 ++++++++++++++++++++++++------ 4 files changed, 68 insertions(+), 16 deletions(-) diff --git a/src/lib/components/button.svelte b/src/lib/components/button.svelte index b4eb613..5595dbe 100644 --- a/src/lib/components/button.svelte +++ b/src/lib/components/button.svelte @@ -1,7 +1,10 @@ - @@ -18,11 +21,12 @@ border-style: solid; border-width: 30px; border-image: url(/border.png); + border-color: transparent; border-image-repeat: stretch; border-image-slice: 24% 23%; transition: border-image-slice 0.3s ease, filter 0.3s ease; will-change: contents; - transform: translateZ(0); + transform: translateZ(1px); } button:hover { diff --git a/src/lib/components/confetti.svelte b/src/lib/components/confetti.svelte index ecb948d..a7d32a3 100644 --- a/src/lib/components/confetti.svelte +++ b/src/lib/components/confetti.svelte @@ -31,6 +31,6 @@ onMount(async () => { setTimeout(() => { frame(); - }, 5000); + }, 0); }); diff --git a/src/lib/components/mask.svelte b/src/lib/components/mask.svelte index 3498826..91c92d9 100644 --- a/src/lib/components/mask.svelte +++ b/src/lib/components/mask.svelte @@ -31,6 +31,8 @@ .wrapper > div > :global(svg) { overflow: visible; max-width: 100%; + will-change: contents; + transform: translateZ(1px); } .wrapper > div :global(path) { diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 3cf57a6..b03c908 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -3,31 +3,67 @@ import Confetti from '$lib/components/confetti.svelte'; import Mask from '$lib/components/mask.svelte'; import Maskenball from '$lib/components/maskenball.svelte'; + import { onMount } from 'svelte'; + let curtainsIn = false; + let curtainsOut = false; + + onMount(() => { + setTimeout(() => { + curtainsIn = true; + }, 2000); + }); -
+
curtain left curtain right
- +
- +
- +