From cd281a0d7d0aba8fc4f7dce7b486e3adee1340de Mon Sep 17 00:00:00 2001 From: EETagent Date: Sun, 20 Nov 2022 15:13:13 +0100 Subject: [PATCH] feat: add transitions --- frontend/src/lib/components/PageTransition.svelte | 14 ++++++++++++++ frontend/src/routes/+layout.js | 6 ++++++ frontend/src/routes/+layout.svelte | 10 +++++++++- 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 frontend/src/lib/components/PageTransition.svelte create mode 100644 frontend/src/routes/+layout.js diff --git a/frontend/src/lib/components/PageTransition.svelte b/frontend/src/lib/components/PageTransition.svelte new file mode 100644 index 0000000..4f7de6e --- /dev/null +++ b/frontend/src/lib/components/PageTransition.svelte @@ -0,0 +1,14 @@ + + +{#key url} +
+ +
+{/key} diff --git a/frontend/src/routes/+layout.js b/frontend/src/routes/+layout.js new file mode 100644 index 0000000..25b03d3 --- /dev/null +++ b/frontend/src/routes/+layout.js @@ -0,0 +1,6 @@ +/** @type {import('./$types').PageLoad} */ +export const load = async ({ url }) => { + return { + url: url.pathname + }; +}; diff --git a/frontend/src/routes/+layout.svelte b/frontend/src/routes/+layout.svelte index 9c092a1..ec662d8 100644 --- a/frontend/src/routes/+layout.svelte +++ b/frontend/src/routes/+layout.svelte @@ -1,3 +1,9 @@ + + - + + +