From f89c3de8261eefdfad9d2f74308bb0156456186f Mon Sep 17 00:00:00 2001 From: keyhan Date: Tue, 23 Jun 2026 11:36:27 +0330 Subject: [PATCH] feat(landing): glass header nav with side drawer + blog section - Header: full glassmorphism navigation (services, pricing, estimator, learn, blog). Desktop shows an inline glass pill; mobile opens a side drawer that slides in from the inline-start edge (right in RTL, left in LTR) over a blurred backdrop. - Nav links smooth-scroll via the shared Lenis instance (exposed through scroll-store: setLenis/scrollToId), with an 80px offset under the header. - "Learn" links to the existing how-it-works steps (id="learn"); add a lightweight Blog teaser section (id="blog", "coming soon" cards). - i18n: fa/en strings for nav and blog. Co-Authored-By: Claude Opus 4.8 --- .../src/components/landing/LandingPage.tsx | 6 +- .../src/components/landing/scroll-store.ts | 22 +++ .../src/components/landing/sections/Blog.tsx | 56 +++++++ .../landing/sections/HowItWorks.tsx | 2 +- .../landing/sections/SiteHeader.tsx | 158 ++++++++++++++++-- frontend/src/i18n/dictionaries/en.ts | 20 +++ frontend/src/i18n/dictionaries/fa.ts | 20 +++ 7 files changed, 266 insertions(+), 18 deletions(-) create mode 100644 frontend/src/components/landing/sections/Blog.tsx diff --git a/frontend/src/components/landing/LandingPage.tsx b/frontend/src/components/landing/LandingPage.tsx index da762d3..088cacc 100644 --- a/frontend/src/components/landing/LandingPage.tsx +++ b/frontend/src/components/landing/LandingPage.tsx @@ -4,7 +4,7 @@ import { useEffect, useRef, useState } from 'react'; import dynamic from 'next/dynamic'; import Lenis from 'lenis'; -import { setScroll, setPointer, flashState } from './scroll-store'; +import { setScroll, setPointer, flashState, setLenis } from './scroll-store'; import { SiteHeader } from './sections/SiteHeader'; import { Hero } from './sections/Hero'; import { ServicesBar } from './sections/ServicesBar'; @@ -14,6 +14,7 @@ import { HowItWorks } from './sections/HowItWorks'; import { Pricing } from './sections/Pricing'; import { Estimator } from './sections/Estimator'; import { Trust } from './sections/Trust'; +import { Blog } from './sections/Blog'; import { FinalCta } from './sections/FinalCta'; import { Footer } from './sections/Footer'; @@ -67,6 +68,7 @@ export function LandingPage() { } const lenis = new Lenis({ duration: 1.15, smoothWheel: true }); + setLenis(lenis); let raf = 0; const loop = (time: number) => { lenis.raf(time); @@ -79,6 +81,7 @@ export function LandingPage() { return () => { cancelAnimationFrame(raf); lenis.destroy(); + setLenis(null); }; }, [reduced]); @@ -104,6 +107,7 @@ export function LandingPage() { +