nanochat/services/frontend/components/LandingNav.tsx
Manmohan Sharma 634be4080b
feat(frontend): Next.js 14 frontend service for samosaChaat (#2)
Build services/frontend/ replacing the legacy nanochat/ui.html single-file UI.
Landing, login, and chat pages ported with full design system: Devanagari +
Great Vibes hero, samosa/chai/toran SVG animations, gold/cream palette.

- App Router pages: / (hero + floating illustrations), /login (split-screen
  OAuth with mandala motif), /chat (260px collapsible sidebar, suggestion
  chips, markdown + code-copy, auto-expanding input, slash commands)
- SSE streaming via useSSE hook and /api/chat/stream BFF route (proxies to
  CHAT_API_URL when set, falls back to mock echo for local dev)
- NextAuth.js v5 with Google + GitHub providers; middleware gates /chat/*
- Zustand store with localStorage persistence for conversations/settings
- Tailwind theme carries all ui.html tokens + keyframes (pendulum, float,
  wobble, steamFloat, steamType); SVG assets componentized under components/svg
- Multi-stage node:20-alpine Dockerfile with Next standalone output

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-16 11:26:57 -07:00

48 lines
1.9 KiB
XML

import Link from 'next/link';
import ToranSvg from './svg/ToranSvg';
export default function LandingNav() {
return (
<nav className="relative flex justify-between items-start px-4 md:px-9 pt-4 pb-2 z-10 flex-shrink-0">
<div className="flex items-center gap-2">
<Link href="/" aria-label="Home" className="transition-transform hover:scale-105">
<svg viewBox="0 0 30 30" width={30} height={30} fill="none" stroke="#444" strokeWidth={1.3} strokeLinecap="round" strokeLinejoin="round">
<path d="M4,16 L15.2,5 L26,16" />
<path d="M7,14.5 L7,26 L23,26 L23,14.5" />
<rect x="12" y="19" width="6" height="7" rx="0.5" />
<rect x="8.5" y="16" width="3" height="2.8" rx="0.3" />
<rect x="18.5" y="16" width="3" height="2.8" rx="0.3" />
</svg>
</Link>
<Link
href="/"
className="relative font-caveat text-[1.2rem] md:text-[1.35rem] font-semibold text-gray-800 after:content-[''] after:absolute after:-bottom-0.5 after:left-0 after:w-full after:h-[1.5px] after:bg-gray-500 after:rounded after:-rotate-[0.5deg]"
>
samosaChaat
</Link>
</div>
<div className="absolute left-1/2 top-0 origin-top transform -translate-x-1/2 animate-pendulum z-[5]">
<ToranSvg />
</div>
<div className="flex items-center gap-4 font-caveat text-[1.05rem] text-gray-600 pt-1">
<a
href="https://instagram.com/samosachaat.art"
target="_blank"
rel="noopener noreferrer"
className="hidden sm:inline hover:text-brown transition-colors"
>
@samosachaat
</a>
<Link
href="/login"
className="px-3 py-1 rounded-full border border-warm-grey text-brown bg-cream-light hover:bg-cream transition-colors"
>
Sign in
</Link>
</div>
</nav>
);
}