From 710de49545f121abf64498ed549c88a77b831945 Mon Sep 17 00:00:00 2001 From: xu675693517-hue Date: Sat, 25 Jul 2026 09:21:40 +0800 Subject: [PATCH] fix: mobile responsive landing page --- frontend/src/pages/LandingPage.tsx | 178 +++++++++++++++++------------ frontend/tailwind.config.js | 5 +- 2 files changed, 111 insertions(+), 72 deletions(-) diff --git a/frontend/src/pages/LandingPage.tsx b/frontend/src/pages/LandingPage.tsx index baede37..8e6420d 100644 --- a/frontend/src/pages/LandingPage.tsx +++ b/frontend/src/pages/LandingPage.tsx @@ -1,4 +1,5 @@ -import { Link } from 'react-router-dom' +import { useState } from "react" +import { Link } from "react-router-dom" import { Scissors, Shield, @@ -14,29 +15,33 @@ import { Gem, Pen, FileOutput, -} from 'lucide-react' + Menu, + X, +} from "lucide-react" const tools = [ - { icon: Merge, name: 'Merge', desc: 'Combine multiple documents into one' }, - { icon: Scissors, name: 'Split', desc: 'Extract pages or divide by range' }, - { icon: Minimize2, name: 'Compress', desc: 'Shrink file size, keep quality' }, - { icon: Shield, name: 'Protect', desc: 'Encrypt with password protection' }, - { icon: ScanText, name: 'OCR', desc: 'Extract text from scanned pages' }, - { icon: Image, name: 'Convert', desc: 'PDF to image, image to PDF' }, - { icon: Pen, name: 'Annotate', desc: 'Draw, highlight, and add text' }, - { icon: FileOutput, name: 'Export', desc: 'Word, image, and format tools' }, + { icon: Merge, name: "Merge", desc: "Combine multiple documents into one" }, + { icon: Scissors, name: "Split", desc: "Extract pages or divide by range" }, + { icon: Minimize2, name: "Compress", desc: "Shrink file size, keep quality" }, + { icon: Shield, name: "Protect", desc: "Encrypt with password protection" }, + { icon: ScanText, name: "OCR", desc: "Extract text from scanned pages" }, + { icon: Image, name: "Convert", desc: "PDF to image, image to PDF" }, + { icon: Pen, name: "Annotate", desc: "Draw, highlight, and add text" }, + { icon: FileOutput, name: "Export", desc: "Word, image, and format tools" }, ] const steps = [ - { num: '01', icon: Upload, title: 'Upload', body: 'Drop any PDF into your workspace. Stored securely under your account.' }, - { num: '02', icon: Wand2, title: 'Process', body: 'Pick a tool — merge, split, compress, protect, annotate, convert, and more.' }, - { num: '03', icon: Download, title: 'Download', body: 'Every operation creates a new file. Your originals are never modified.' }, + { num: "01", icon: Upload, title: "Upload", body: "Drop any PDF into your workspace. Stored securely under your account." }, + { num: "02", icon: Wand2, title: "Process", body: "Pick a tool \u2014 merge, split, compress, protect, annotate, convert, and more." }, + { num: "03", icon: Download, title: "Download", body: "Every operation creates a new file. Your originals are never modified." }, ] export default function LandingPage() { + const [mobileMenuOpen, setMobileMenuOpen] = useState(false) + return (
- {/* ── CSS ─────────────────────────────────────────────── */} + {/* CSS */} - {/* ── Ambient glow ───────────────────────────────────── */} + {/* Ambient glow */}
-
-
- {/* ── Nav ────────────────────────────────────────────── */} + {/* Nav */} - {/* ── Hero ───────────────────────────────────────────── */} -
{/* Text column */}
-

- Every
PDF tool
you'll ever{' '} +

+ Every
PDF tool
you{"'"}ll ever{" "} need.

-

Merge, split, compress, protect, convert, and annotate — from one elegant workspace. No subscriptions, no upload limits.

-
+
Sign in to workspace @@ -214,37 +250,37 @@ export default function LandingPage() {
- {/* ── Tools grid ─────────────────────────────────────── */} + {/* Tools grid */}
-
+
{/* Section header */} -
-

+

+

Toolkit

-

Everything in
one workspace

-

- Every operation produces a new file — your originals stay untouched. +

+ Every operation produces a new file \u2014 your originals stay untouched.

{/* Grid */} -
+
{tools.map((t) => ( -
+
-

+

{t.name}

-

+

{t.desc}

@@ -253,16 +289,16 @@ export default function LandingPage() {
- {/* ── How it works ───────────────────────────────────── */} + {/* How it works */}
-
-
-

+

+
+

How it works

-

- Three steps, that's it + Three steps, that{"'"}s it

@@ -270,24 +306,24 @@ export default function LandingPage() { {steps.map((s, i) => (
{/* Step row */} -
+
{/* Left: number + icon */}
-
- +
{/* Right: text */}
-

+

Step {s.num}

-

+

{s.title}

-

+

{s.body}

@@ -295,8 +331,8 @@ export default function LandingPage() { {/* Connector between steps */} {i < steps.length - 1 && ( -
-
+
+
@@ -307,24 +343,24 @@ export default function LandingPage() {
- {/* ── CTA ────────────────────────────────────────────── */} + {/* CTA */}
-
+
{/* Soft top glow */}
-

+

Free to use. No credit card required.

-

- Start working with
+

+ Start working with
your PDFs today.

-
+
or sign in @@ -340,13 +376,13 @@ export default function LandingPage() {
- {/* ── Footer ─────────────────────────────────────────── */} + {/* Footer */}