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.astro22
1 files changed, 19 insertions, 3 deletions
diff --git a/apps/website/src/layouts/Layout.astro b/apps/website/src/layouts/Layout.astro
index a06cdd2..660083a 100644
--- a/apps/website/src/layouts/Layout.astro
+++ b/apps/website/src/layouts/Layout.astro
@@ -1,6 +1,7 @@
---
import Footer from '@components/base/Footer.astro';
import Favicon from '/media/polyfrost/minimal_bg.svg?url';
+import 'locomotive-scroll/dist/locomotive-scroll.min.css';
import Navbar from '../components/base/navbar/Navbar.astro';
import '../styles/global.css';
@@ -35,12 +36,27 @@ const {
</head>
<body class="bg-gray-50 overflow-x-hidden">
- <Navbar />
- <main class="min-h-screen h-auto flex flex-col gap-40" id="fullpage">
+ <main class="min-h-screen h-auto flex flex-col gap-40" data-scroll-container>
+ <Navbar data-scroll-section />
+
<slot/>
+
+ <Footer data-scroll-section />
</main>
- <Footer/>
</body>
</html>
+
+<script>
+import LocomotiveScroll from 'locomotive-scroll';
+
+// eslint-disable-next-line unused-imports/no-unused-vars
+const scroll = new LocomotiveScroll({
+ el: document.querySelector('[data-scroll-container]'),
+ smooth: true,
+ lerp: 0.05,
+ touchMultiplier: 0,
+ resetNativeScroll: false,
+});
+</script>