Skip to content

Commit af366f0

Browse files
committed
feat: add animation to splashScreen
1 parent 1129736 commit af366f0

File tree

4 files changed

+29
-12
lines changed

4 files changed

+29
-12
lines changed

infrastructure/eid-wallet/src/app.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<meta charset="utf-8" />
55
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<link rel="preload" href="/fonts/Archivo-VariableFont_wdth,wght.ttf" as="font" type="truetype" crossorigin="anonymous">
78
<title>Tauri + SvelteKit + Typescript App</title>
89
%sveltekit.head%
910
</head>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<script lang="ts">
2+
import { cubicInOut, cubicOut } from "svelte/easing";
3+
import { fade, slide, scale } from "svelte/transition";
4+
</script>
5+
6+
<div out:fade={{duration: 150}} class="z-50 absolute w-screen h-screen overflow-hidden" >
7+
<div class="relative w-screen h-screen bg-primary overflow-hidden">
8+
9+
<img in:scale={{start: 0.8, duration: 500, easing: cubicOut, opacity: 1 }} class="absolute w-full bottom-[-80px] start-0" src="/images/Shape1.svg" alt="illustration">
10+
<img in:scale={{start: 0.8, duration: 500, easing: cubicOut, opacity: 1 }} class="absolute w-full top-[50px] end-[100px]" src="/images/Shape2.svg" alt="illustration">
11+
<div in:scale={{start: 0.9, duration: 500, easing: cubicOut, opacity: 1 }} class="absolute w-full top-[42%] start-[50%] translate-x-[-50%] translate-y-[-42%]">
12+
<h1 in:fade={{duration: 500}} class="text-center text-white text-[44px]">eAgency</h1>
13+
<p in:fade={{duration: 500}} class="text-center text-white">Your self-sovereign digital entity</p>
14+
</div>
15+
<img in:fade={{duration: 500}} class="absolute bottom-[116px] start-[50%] translate-x-[-50%]" src="/images/W3DSLogoWhite.svg" alt="logo">
16+
</div>
17+
</div>
18+
19+
<style>
20+
21+
</style>

infrastructure/eid-wallet/src/lib/ui/Drawer/Drawer.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts">
22
import { clickOutside, cn } from "$lib/utils";
33
import { CupertinoPane } from "cupertino-pane";
4-
import { type Snippet } from "svelte";
4+
import type { Snippet } from "svelte";
55
import { swipe } from "svelte-gestures";
66
import type { HTMLAttributes } from "svelte/elements";
77
Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,21 @@
11
<script lang="ts">
2+
import SplashScreen from "$lib/fragments/SplashScreen/SplashScreen.svelte";
3+
import ButtonAction from "$lib/ui/Button/ButtonAction.svelte";
24
import "../app.css";
35
const { children } = $props();
46
5-
let showSplashScreen = $state(true);
7+
let showSplashScreen = $state(false);
68
79
$effect(() => {
10+
showSplashScreen = true; // needs to happen this way to kickstart the animation
811
setTimeout(() => {
912
showSplashScreen = false;
10-
}, 500);
13+
}, 1000);
1114
});
1215
</script>
1316

1417
{#if showSplashScreen}
15-
<div class="relative w-full h-[100vh] bg-primary">
16-
<img class="absolute w-full bottom-[-80px] start-0" src="/images/Shape1.svg" alt="illustration">
17-
<img class="absolute w-full top-[50px] end-[100px]" src="/images/Shape2.svg" alt="illustration">
18-
<div class="absolute w-full top-[42%] start-[50%] translate-x-[-50%] translate-y-[-42%]">
19-
<h1 class="text-center text-white text-[44px]">eAgency</h1>
20-
<p class="text-center text-white">Your self-sovereign digital entity</p>
21-
</div>
22-
<img class="absolute bottom-[116px] start-[50%] translate-x-[-50%]" src="/images/W3DSLogoWhite.svg" alt="logo">
23-
</div>
18+
<SplashScreen />
2419
{:else}
2520
{@render children?.()}
2621
{/if}

0 commit comments

Comments
 (0)