From 6a1933178985e23825d8453449ca99bb0e5cfcb6 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Sat, 13 Jan 2024 18:56:25 -0800
Subject: refactor(home): move layout to home

---
 src/lib/Home/Root.svelte | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 src/lib/Home/Root.svelte

(limited to 'src/lib/Home/Root.svelte')

diff --git a/src/lib/Home/Root.svelte b/src/lib/Home/Root.svelte
new file mode 100644
index 00000000..d65a9832
--- /dev/null
+++ b/src/lib/Home/Root.svelte
@@ -0,0 +1,26 @@
+<script lang="ts">
+	import settings from '$stores/settings';
+	import { fly } from 'svelte/transition';
+
+	export let data: any;
+	export let way: number;
+
+	const animationDelay = 100;
+</script>
+
+{#if $settings.displayDisableAnimations}
+	<slot />
+{:else}
+	{#key data.url}
+		<div
+			in:fly={{
+				x: way,
+				duration: animationDelay,
+				delay: animationDelay
+			}}
+			out:fly={{ x: -way, duration: animationDelay }}
+		>
+			<slot />
+		</div>
+	{/key}
+{/if}
-- 
cgit v1.2.3

