mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 18:19:43 +00:00
- Add FAQ section with accordion-style questions - Enhance hero with stronger copy and App Store badge - Add hover animations to features and phone mockups - Add pricing display (£4.99/month) to Pro section - Add step icons to How It Works section - Improve accessibility with focus states and reduced-motion - Add exit animation to mobile navigation menu 🤖 Generated with [Claude Code](https://claude.com/claude-code)
128 lines
4.1 KiB
TypeScript
128 lines
4.1 KiB
TypeScript
'use client'
|
|
|
|
import { useState, useEffect } from 'react'
|
|
import Link from 'next/link'
|
|
import Image from 'next/image'
|
|
import { motion, AnimatePresence } from 'framer-motion'
|
|
import { Menu, X } from 'lucide-react'
|
|
|
|
export default function Navbar() {
|
|
const [isScrolled, setIsScrolled] = useState(false)
|
|
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false)
|
|
|
|
useEffect(() => {
|
|
const handleScroll = () => {
|
|
setIsScrolled(window.scrollY > 20)
|
|
}
|
|
window.addEventListener('scroll', handleScroll)
|
|
return () => window.removeEventListener('scroll', handleScroll)
|
|
}, [])
|
|
|
|
return (
|
|
<motion.nav
|
|
initial={{ y: -100 }}
|
|
animate={{ y: 0 }}
|
|
className={`fixed top-0 left-0 right-0 z-50 transition-all duration-300 ${
|
|
isScrolled ? 'glass py-4' : 'py-6'
|
|
}`}
|
|
>
|
|
<div className="max-w-7xl mx-auto px-6 flex items-center justify-between">
|
|
<Link href="/" className="flex items-center gap-3">
|
|
<Image
|
|
src="/logo.png"
|
|
alt="Sauci"
|
|
width={40}
|
|
height={40}
|
|
className="w-10 h-10"
|
|
/>
|
|
<span className="text-2xl font-bold gradient-text">Sauci</span>
|
|
</Link>
|
|
|
|
{/* Desktop Navigation */}
|
|
<div className="hidden md:flex items-center gap-8">
|
|
<a href="#features" className="text-white/70 hover:text-white transition-colors">
|
|
Features
|
|
</a>
|
|
<a href="#how-it-works" className="text-white/70 hover:text-white transition-colors">
|
|
How It Works
|
|
</a>
|
|
<a href="#pricing" className="text-white/70 hover:text-white transition-colors">
|
|
Pro
|
|
</a>
|
|
<a href="#faq" className="text-white/70 hover:text-white transition-colors">
|
|
FAQ
|
|
</a>
|
|
<a
|
|
href="https://apps.apple.com/app/sauci"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
className="btn-primary text-sm py-3 px-6"
|
|
>
|
|
Download App
|
|
</a>
|
|
</div>
|
|
|
|
{/* Mobile Menu Button */}
|
|
<button
|
|
className="md:hidden text-white"
|
|
onClick={() => setIsMobileMenuOpen(!isMobileMenuOpen)}
|
|
>
|
|
{isMobileMenuOpen ? <X size={24} /> : <Menu size={24} />}
|
|
</button>
|
|
</div>
|
|
|
|
{/* Mobile Menu */}
|
|
<AnimatePresence>
|
|
{isMobileMenuOpen && (
|
|
<motion.div
|
|
initial={{ opacity: 0, y: -20 }}
|
|
animate={{ opacity: 1, y: 0 }}
|
|
exit={{ opacity: 0, y: -20 }}
|
|
transition={{ duration: 0.2 }}
|
|
className="md:hidden glass mt-4 mx-6 p-6"
|
|
>
|
|
<div className="flex flex-col gap-4">
|
|
<a
|
|
href="#features"
|
|
className="text-white/70 hover:text-white transition-colors"
|
|
onClick={() => setIsMobileMenuOpen(false)}
|
|
>
|
|
Features
|
|
</a>
|
|
<a
|
|
href="#how-it-works"
|
|
className="text-white/70 hover:text-white transition-colors"
|
|
onClick={() => setIsMobileMenuOpen(false)}
|
|
>
|
|
How It Works
|
|
</a>
|
|
<a
|
|
href="#pricing"
|
|
className="text-white/70 hover:text-white transition-colors"
|
|
onClick={() => setIsMobileMenuOpen(false)}
|
|
>
|
|
Pro
|
|
</a>
|
|
<a
|
|
href="#faq"
|
|
className="text-white/70 hover:text-white transition-colors"
|
|
onClick={() => setIsMobileMenuOpen(false)}
|
|
>
|
|
FAQ
|
|
</a>
|
|
<a
|
|
href="https://apps.apple.com/app/sauci"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
className="btn-primary text-sm py-3 px-6 text-center"
|
|
>
|
|
Download App
|
|
</a>
|
|
</div>
|
|
</motion.div>
|
|
)}
|
|
</AnimatePresence>
|
|
</motion.nav>
|
|
)
|
|
}
|