aboutsummaryrefslogtreecommitdiff
path: root/apps/website/src/layouts/Layout.astro
diff options
context:
space:
mode:
Diffstat (limited to 'apps/website/src/layouts/Layout.astro')
-rw-r--r--apps/website/src/layouts/Layout.astro26
1 files changed, 23 insertions, 3 deletions
diff --git a/apps/website/src/layouts/Layout.astro b/apps/website/src/layouts/Layout.astro
index d5b61cd..32cebed 100644
--- a/apps/website/src/layouts/Layout.astro
+++ b/apps/website/src/layouts/Layout.astro
@@ -16,6 +16,26 @@ const {
description = 'Official website for Polyfrost.',
favicon = Favicon,
} = Astro.props;
+
+const fadeAnimation = {
+ old: {
+ name: 'fadeOut',
+ duration: '0.1s',
+ easing: 'linear',
+ fillMode: 'forwards',
+ },
+ new: {
+ name: 'fadeIn',
+ duration: '0.1s',
+ easing: 'linear',
+ fillMode: 'backwards',
+ },
+};
+
+const fade = {
+ forwards: fadeAnimation,
+ backwards: fadeAnimation,
+};
---
<!doctype html>
@@ -36,10 +56,10 @@ const {
<ViewTransitions />
</head>
- <body class="bg-gray-50 overflow-x-hidden">
- <Navbar/>
+ <body class="bg-gray-50 overflow-x-hidden" transition:animate={fade}>
+ <Navbar transition:animate="none" transition:persist />
- <main class="min-h-screen h-auto" transition:animate="fade">
+ <main class="min-h-screen h-auto">
<slot/>
</main>