Build a high-conversion, story-driven marketing site for Bay Area Affiliates, Inc. The site will feature a scroll-narrative experience with pinned hero, section pinning, subtle parallax, and neon accents. It prioritizes performance, accessibility, and clear CTAs, targeting small to mid-sized businesses in the Coastal Bend. Key features include: - Pinned hero section with headline, subcopy, and CTAs. - Value pillars section with alternating media layouts. - "How We Work" section with a pinned timeline. - Services overview with cards linking to detail pages. - Local focus section with client logos and testimonials. - CTA footer band with micro-FAQ. - Dedicated Services, About, Blog, and Contact pages. The design will adhere to the specified brand guidelines, including a deep teal/near-black base with neon lime accents. Interactions will respect `prefers-reduced-motion`. Performance and SEO best practices will be followed, including metadata, lazy loading, and local SEO keywords. Accessibility standards (WCAG AA) will be met.
111 lines
3.6 KiB
TypeScript
111 lines
3.6 KiB
TypeScript
import { useState, useEffect } from 'react';
|
|
import { Link, useLocation } from 'react-router-dom';
|
|
import { Menu, X } from 'lucide-react';
|
|
|
|
const Navigation = () => {
|
|
const [isOpen, setIsOpen] = useState(false);
|
|
const [isScrolled, setIsScrolled] = useState(false);
|
|
const location = useLocation();
|
|
|
|
useEffect(() => {
|
|
const handleScroll = () => {
|
|
setIsScrolled(window.scrollY > 50);
|
|
};
|
|
|
|
window.addEventListener('scroll', handleScroll);
|
|
return () => window.removeEventListener('scroll', handleScroll);
|
|
}, []);
|
|
|
|
const navItems = [
|
|
{ name: 'Home', path: '/' },
|
|
{ name: 'Services', path: '/services' },
|
|
{ name: 'About', path: '/about' },
|
|
{ name: 'Blog', path: '/blog' },
|
|
{ name: 'Contact', path: '/contact' },
|
|
];
|
|
|
|
const isActive = (path: string) => location.pathname === path;
|
|
|
|
return (
|
|
<nav className={`fixed top-0 left-0 right-0 z-50 transition-all duration-300 ${
|
|
isScrolled ? 'bg-background/90 backdrop-blur-md border-b border-border' : 'bg-transparent'
|
|
}`}>
|
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
<div className="flex items-center justify-between h-16">
|
|
{/* Logo */}
|
|
<Link to="/" className="flex items-center space-x-2">
|
|
<div className="w-8 h-8 bg-neon rounded-lg flex items-center justify-center">
|
|
<span className="text-neon-foreground font-bold text-sm">BA</span>
|
|
</div>
|
|
<span className="font-heading font-bold text-lg text-foreground">
|
|
Bay Area Affiliates
|
|
</span>
|
|
</Link>
|
|
|
|
{/* Desktop Navigation */}
|
|
<div className="hidden md:flex items-center space-x-8">
|
|
{navItems.map((item) => (
|
|
<Link
|
|
key={item.name}
|
|
to={item.path}
|
|
className={`font-medium transition-colors duration-200 ${
|
|
isActive(item.path)
|
|
? 'text-neon'
|
|
: 'text-foreground-muted hover:text-neon'
|
|
}`}
|
|
>
|
|
{item.name}
|
|
</Link>
|
|
))}
|
|
<Link
|
|
to="/contact"
|
|
className="btn-neon ml-4"
|
|
>
|
|
Get Started
|
|
</Link>
|
|
</div>
|
|
|
|
{/* Mobile menu button */}
|
|
<button
|
|
onClick={() => setIsOpen(!isOpen)}
|
|
className="md:hidden text-foreground hover:text-neon transition-colors"
|
|
aria-label="Toggle navigation menu"
|
|
>
|
|
{isOpen ? <X size={24} /> : <Menu size={24} />}
|
|
</button>
|
|
</div>
|
|
|
|
{/* Mobile Navigation */}
|
|
{isOpen && (
|
|
<div className="md:hidden bg-background/95 backdrop-blur-md border-t border-border">
|
|
<div className="px-2 pt-2 pb-3 space-y-1">
|
|
{navItems.map((item) => (
|
|
<Link
|
|
key={item.name}
|
|
to={item.path}
|
|
onClick={() => setIsOpen(false)}
|
|
className={`block px-3 py-2 rounded-md text-base font-medium transition-colors ${
|
|
isActive(item.path)
|
|
? 'text-neon bg-neon/10'
|
|
: 'text-foreground-muted hover:text-neon hover:bg-neon/5'
|
|
}`}
|
|
>
|
|
{item.name}
|
|
</Link>
|
|
))}
|
|
<Link
|
|
to="/contact"
|
|
onClick={() => setIsOpen(false)}
|
|
className="block w-full text-center btn-neon mt-4"
|
|
>
|
|
Get Started
|
|
</Link>
|
|
</div>
|
|
</div>
|
|
)}
|
|
</div>
|
|
</nav>
|
|
);
|
|
};
|
|
|
|
export default Navigation; |