From 36bcc27d7f8287225c81ec45a7827861088bf4d7 Mon Sep 17 00:00:00 2001 From: Xevion Date: Thu, 29 Jan 2026 14:59:47 -0600 Subject: [PATCH] feat: setup smart page transitions, fix laggy theme-aware element transitions --- web/src/app.html | 2 +- web/src/lib/components/PageTransition.svelte | 47 ++++++++++++++++++++ web/src/lib/components/Pagination.svelte | 30 +++++++------ web/src/lib/stores/navigation.svelte.ts | 45 +++++++++++++++++++ web/src/routes/+layout.svelte | 19 ++++---- web/src/routes/admin/+layout.svelte | 10 +++-- web/src/routes/layout.css | 10 +---- 7 files changed, 129 insertions(+), 34 deletions(-) create mode 100644 web/src/lib/components/PageTransition.svelte create mode 100644 web/src/lib/stores/navigation.svelte.ts diff --git a/web/src/app.html b/web/src/app.html index e3aee7b..e4ce37a 100644 --- a/web/src/app.html +++ b/web/src/app.html @@ -1,5 +1,5 @@ - + diff --git a/web/src/lib/components/PageTransition.svelte b/web/src/lib/components/PageTransition.svelte new file mode 100644 index 0000000..fab59b3 --- /dev/null +++ b/web/src/lib/components/PageTransition.svelte @@ -0,0 +1,47 @@ + + +
+ {#key key} +
+ {@render children()} +
+ {/key} +
diff --git a/web/src/lib/components/Pagination.svelte b/web/src/lib/components/Pagination.svelte index 087eea7..367e0ac 100644 --- a/web/src/lib/components/Pagination.svelte +++ b/web/src/lib/components/Pagination.svelte @@ -1,7 +1,19 @@ @@ -30,5 +31,7 @@ onMount(() => { - {@render children()} + + {@render children()} + diff --git a/web/src/routes/admin/+layout.svelte b/web/src/routes/admin/+layout.svelte index 6114ab7..35d9f35 100644 --- a/web/src/routes/admin/+layout.svelte +++ b/web/src/routes/admin/+layout.svelte @@ -1,8 +1,10 @@