From 283a7a52141b64663f6d5b270dd12fa12b6522de Mon Sep 17 00:00:00 2001 From: Ermin Zoronjic Date: Thu, 30 Apr 2026 09:39:32 +0200 Subject: [PATCH] add responsive and scroll behaviour changes --- parfum-shop/package-lock.json | 32 +++++ parfum-shop/package.json | 1 + parfum-shop/src/App.jsx | 5 +- .../src/components/ProductDetailPage.css | 110 +++--------------- .../src/components/ProductDetailPage.jsx | 54 +++++---- parfum-shop/src/components/SharedNavbar.jsx | 18 ++- parfum-shop/src/components/ShopDrawer.css | 2 +- parfum-shop/src/components/ShopDrawer.jsx | 6 +- parfum-shop/src/components/SupportChatbot.css | 21 ++-- parfum-shop/src/components/SupportChatbot.jsx | 7 +- parfum-shop/src/hooks/useLenisSmoothScroll.js | 79 +++++++++++++ parfum-shop/src/hooks/useScrollTextReveal.js | 38 +++--- parfum-shop/src/index.css | 2 +- parfum-shop/src/main.jsx | 1 + parfum-shop/src/pages/AboutPage.css | 2 +- parfum-shop/src/pages/DiscoverySetPage.css | 81 +++---------- parfum-shop/src/pages/DiscoverySetPage.jsx | 22 +--- parfum-shop/src/pages/LandingPage.css | 18 ++- parfum-shop/src/pages/SmallBatchPage.css | 2 +- parfum-shop/src/pages/SupportPage.css | 4 +- parfum-shop/src/style/navbar.css | 39 +++---- parfum-shop/src/style/textReveal.css | 18 +++ 22 files changed, 294 insertions(+), 268 deletions(-) create mode 100644 parfum-shop/src/hooks/useLenisSmoothScroll.js diff --git a/parfum-shop/package-lock.json b/parfum-shop/package-lock.json index a5de8c5..714dd3f 100644 --- a/parfum-shop/package-lock.json +++ b/parfum-shop/package-lock.json @@ -9,6 +9,7 @@ "version": "0.0.0", "dependencies": { "gsap": "^3.14.2", + "lenis": "^1.3.23", "react": "^19.2.4", "react-dom": "^19.2.4", "react-router": "^7.14.0" @@ -1778,6 +1779,37 @@ "json-buffer": "3.0.1" } }, + "node_modules/lenis": { + "version": "1.3.23", + "resolved": "https://registry.npmjs.org/lenis/-/lenis-1.3.23.tgz", + "integrity": "sha512-YxYq3TJqj9sJNv0V9SkyQHejt14xwyIwgDaaMK89Uf9SxQfIszu+gTQSSphh6BWlLTNVKvvXAGkg+Zf+oFIevg==", + "license": "MIT", + "workspaces": [ + "packages/*", + "playground", + "playground/*" + ], + "funding": { + "type": "github", + "url": "https://github.com/sponsors/darkroomengineering" + }, + "peerDependencies": { + "@nuxt/kit": ">=3.0.0", + "react": ">=17.0.0", + "vue": ">=3.0.0" + }, + "peerDependenciesMeta": { + "@nuxt/kit": { + "optional": true + }, + "react": { + "optional": true + }, + "vue": { + "optional": true + } + } + }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", diff --git a/parfum-shop/package.json b/parfum-shop/package.json index 6bb12c3..4fae9bf 100644 --- a/parfum-shop/package.json +++ b/parfum-shop/package.json @@ -13,6 +13,7 @@ }, "dependencies": { "gsap": "^3.14.2", + "lenis": "^1.3.23", "react": "^19.2.4", "react-dom": "^19.2.4", "react-router": "^7.14.0" diff --git a/parfum-shop/src/App.jsx b/parfum-shop/src/App.jsx index c2fcc0a..6532791 100644 --- a/parfum-shop/src/App.jsx +++ b/parfum-shop/src/App.jsx @@ -14,6 +14,7 @@ import ScrollToTop from "./components/ScrollToTop"; import ShopDrawer from "./components/ShopDrawer"; import CartToast from "./components/CartToast"; import { ProductTransitionProvider } from "./components/ProductTransition"; +import useLenisSmoothScroll from "./hooks/useLenisSmoothScroll"; import useScrollTextReveal from "./hooks/useScrollTextReveal"; import { ThemeProvider } from "./theme/ThemeContext"; import "./style/textReveal.css"; @@ -30,7 +31,9 @@ function App() { }); const shouldFlushFooter = location.pathname === "/" || location.pathname.startsWith("/duft/"); + const showSupportChatbot = location.pathname === "/"; + useLenisSmoothScroll(location.pathname); useScrollTextReveal(routeContentRef, location.pathname); useEffect(() => { @@ -72,7 +75,7 @@ function App() {