From 2deb8aa53bf30cd532f2405a1fd7be229d4fc210 Mon Sep 17 00:00:00 2001 From: dumbmoron Date: Mon, 2 Sep 2024 14:16:21 +0000 Subject: [PATCH] web: add fade-in animation --- web/src/app.html | 47 ++++++++++++++++++++++++++++------- web/src/routes/+layout.svelte | 4 ++- 2 files changed, 41 insertions(+), 10 deletions(-) diff --git a/web/src/app.html b/web/src/app.html index 10e4a9a8..41455c77 100644 --- a/web/src/app.html +++ b/web/src/app.html @@ -17,17 +17,46 @@ - - + + + + + @media (prefers-color-scheme: light) { + body { + background-color: white; + } + } + + #cobalt { + opacity: 0; + } + + #cobalt.loaded { + opacity: 1; + transition: opacity .2s ease-out; + } + + +
%sveltekit.body% diff --git a/web/src/routes/+layout.svelte b/web/src/routes/+layout.svelte index 855b99a4..3c5b2c6a 100644 --- a/web/src/routes/+layout.svelte +++ b/web/src/routes/+layout.svelte @@ -1,6 +1,7 @@