aboutsummaryrefslogtreecommitdiff
path: root/apps/website/src/layouts/Layout.astro
diff options
context:
space:
mode:
authorLynithDev <61880709+LynithDev@users.noreply.github.com>2023-12-30 12:53:40 +0100
committerLynithDev <61880709+LynithDev@users.noreply.github.com>2023-12-30 12:53:40 +0100
commit5b5bc9e0d79877f0554278ab6a609ef688858d8f (patch)
treec7f0d36d052b04e66a0edb84d5e08cb17ce1dafd /apps/website/src/layouts/Layout.astro
parentd568fe0235de920f2b97f70777bab94c114d5654 (diff)
downloadNexus-5b5bc9e0d79877f0554278ab6a609ef688858d8f.tar.gz
Nexus-5b5bc9e0d79877f0554278ab6a609ef688858d8f.tar.bz2
Nexus-5b5bc9e0d79877f0554278ab6a609ef688858d8f.zip
Add locomotive
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>