Self-hosted fitness tracker. Log workouts, track nutrition, and monitor progress. Docker deployment, mobile-friendly.
Enhance user menu component in header
Cawlumm177c41169e8c
diff --git a/web/public/barbell-logo.svg b/web/public/barbell-logo.svgnew file mode 100644index 0000000..1cb8931--- /dev/null+++ b/web/public/barbell-logo.svg@@ -0,0 +1,48 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 120" width="240" height="120">+ <defs>+ <linearGradient id="barGrad" x1="0%" y1="0%" x2="0%" y2="100%">+ <stop offset="0%" style="stop-color:#38d8fb;stop-opacity:1" />+ <stop offset="60%" style="stop-color:#00b8d9;stop-opacity:1" />+ <stop offset="100%" style="stop-color:#007a96;stop-opacity:1" />+ </linearGradient>+ <filter id="barGlow">+ <feGaussianBlur stdDeviation="2" result="coloredBlur"/>+ <feMerge>+ <feMergeNode in="coloredBlur"/>+ <feMergeNode in="SourceGraphic"/>+ </feMerge>+ </filter>+ </defs>++ <!-- Left upright -->+ <rect x="30" y="10" width="4" height="70" rx="2" fill="#1c2f50"/>+ <!-- Left J-hook ticks -->+ <rect x="24" y="38" width="10" height="2" rx="1" fill="#1c2f50"/>+ <rect x="24" y="58" width="10" height="2" rx="1" fill="#1c2f50"/>++ <!-- Right upright -->+ <rect x="206" y="10" width="4" height="70" rx="2" fill="#1c2f50"/>+ <!-- Right J-hook ticks -->+ <rect x="206" y="38" width="10" height="2" rx="1" fill="#1c2f50"/>+ <rect x="206" y="58" width="10" height="2" rx="1" fill="#1c2f50"/>++ <!-- Bar assembly -->+ <g>+ <!-- Left plates -->+ <rect x="44" y="38" width="8" height="20" rx="2" fill="#0d1629" stroke="#00b8d9" stroke-width="1.5"/>+ <rect x="54" y="32" width="7" height="28" rx="2" fill="#0d1629" stroke="#00b8d9" stroke-width="1.5"/>+ <rect x="62" y="26" width="6" height="36" rx="2" fill="#0d1629" stroke="#00b8d9" stroke-width="1.5"/>++ <!-- Bar -->+ <rect x="74" y="50" width="92" height="6" rx="3" fill="url(#barGrad)" filter="url(#barGlow)"/>++ <!-- Right plates -->+ <rect x="188" y="38" width="8" height="20" rx="2" fill="#0d1629" stroke="#00b8d9" stroke-width="1.5"/>+ <rect x="179" y="32" width="7" height="28" rx="2" fill="#0d1629" stroke="#00b8d9" stroke-width="1.5"/>+ <rect x="172" y="26" width="6" height="36" rx="2" fill="#0d1629" stroke="#00b8d9" stroke-width="1.5"/>++ <!-- Collars -->+ <rect x="68" y="52" width="4" height="22" rx="1" fill="#00b8d9"/>+ <rect x="168" y="52" width="4" height="22" rx="1" fill="#00b8d9"/>+ </g>+</svg>diff --git a/web/public/logo.svg b/web/public/logo.svgnew file mode 100644index 0000000..e7b1a33--- /dev/null+++ b/web/public/logo.svg@@ -0,0 +1,46 @@+<svg width="128" height="128" viewBox="0 0 128 128" fill="none" xmlns="http://www.w3.org/2000/svg">+ <!-- Background -->+ <rect width="128" height="128" rx="24" fill="#00b8d9"/>++ <!-- Left upright -->+ <rect x="16" y="20" width="3" height="54" rx="1" fill="#1c2f50"/>+ <rect x="10" y="36" width="8" height="2" rx="1" fill="#1c2f50"/>+ <rect x="10" y="56" width="8" height="2" rx="1" fill="#1c2f50"/>++ <!-- Right upright -->+ <rect x="109" y="20" width="3" height="54" rx="1" fill="#1c2f50"/>+ <rect x="110" y="36" width="8" height="2" rx="1" fill="#1c2f50"/>+ <rect x="110" y="56" width="8" height="2" rx="1" fill="#1c2f50"/>++ <!-- Bar -->+ <rect x="22" y="56" width="84" height="4" rx="2" fill="url(#barGradient)" filter="url(#glow)"/>++ <!-- Left plates -->+ <rect x="4" y="40" width="8" height="20" rx="2" fill="#0d1629" stroke="#00b8d9" stroke-width="1"/>+ <rect x="10" y="32" width="7" height="28" rx="2" fill="#0d1629" stroke="#00b8d9" stroke-width="1"/>+ <rect x="16" y="24" width="6" height="36" rx="2" fill="#0d1629" stroke="#00b8d9" stroke-width="1"/>++ <!-- Right plates -->+ <rect x="116" y="40" width="8" height="20" rx="2" fill="#0d1629" stroke="#00b8d9" stroke-width="1"/>+ <rect x="111" y="32" width="7" height="28" rx="2" fill="#0d1629" stroke="#00b8d9" stroke-width="1"/>+ <rect x="106" y="24" width="6" height="36" rx="2" fill="#0d1629" stroke="#00b8d9" stroke-width="1"/>++ <!-- Collars -->+ <rect x="18" y="58" width="3" height="14" rx="1" fill="#00b8d9"/>+ <rect x="107" y="58" width="3" height="14" rx="1" fill="#00b8d9"/>++ <defs>+ <linearGradient id="barGradient" x1="0%" y1="0%" x2="0%" y2="100%">+ <stop offset="0%" stopColor="#38d8fb"/>+ <stop offset="60%" stopColor="#00b8d9"/>+ <stop offset="100%" stopColor="#007a96"/>+ </linearGradient>+ <filter id="glow">+ <feGaussianBlur stdDeviation="2" result="coloredBlur"/>+ <feMerge>+ <feMergeNode in="coloredBlur"/>+ <feMergeNode in="SourceGraphic"/>+ </feMerge>+ </filter>+ </defs>+</svg>diff --git a/web/src/components/BarbellMark.tsx b/web/src/components/BarbellMark.tsxnew file mode 100644index 0000000..acfecc2--- /dev/null+++ b/web/src/components/BarbellMark.tsx@@ -0,0 +1,60 @@+// Small barbell icon mark for favicon/small contexts+export default function BarbellMark({+ size = 32,+ className = ''+}: {+ size?: number+ className?: string+}) {+ return (+ <svg+ width={size}+ height={size}+ viewBox="0 0 240 120"+ xmlns="http://www.w3.org/2000/svg"+ className={className}+ >+ <defs>+ <linearGradient id="barGrad" x1="0%" y1="0%" x2="0%" y2="100%">+ <stop offset="0%" stopColor="#38d8fb" />+ <stop offset="60%" stopColor="#00b8d9" />+ <stop offset="100%" stopColor="#007a96" />+ </linearGradient>+ <filter id="barGlow">+ <feGaussianBlur stdDeviation="2" result="coloredBlur" />+ <feMerge>+ <feMergeNode in="coloredBlur" />+ <feMergeNode in="SourceGraphic" />+ </feMerge>+ </filter>+ </defs>++ {/* Left upright */}+ <rect x="30" y="10" width="4" height="70" rx="2" fill="#1c2f50" />+ <rect x="24" y="38" width="10" height="2" rx="1" fill="#1c2f50" />+ <rect x="24" y="58" width="10" height="2" rx="1" fill="#1c2f50" />++ {/* Right upright */}+ <rect x="206" y="10" width="4" height="70" rx="2" fill="#1c2f50" />+ <rect x="206" y="38" width="10" height="2" rx="1" fill="#1c2f50" />+ <rect x="206" y="58" width="10" height="2" rx="1" fill="#1c2f50" />++ {/* Left plates */}+ <rect x="44" y="38" width="8" height="20" rx="2" fill="#0d1629" stroke="#00b8d9" strokeWidth="1.5" />+ <rect x="54" y="32" width="7" height="28" rx="2" fill="#0d1629" stroke="#00b8d9" strokeWidth="1.5" />+ <rect x="62" y="26" width="6" height="36" rx="2" fill="#0d1629" stroke="#00b8d9" strokeWidth="1.5" />++ {/* Bar */}+ <rect x="74" y="50" width="92" height="6" rx="3" fill="url(#barGrad)" filter="url(#barGlow)" />++ {/* Right plates */}+ <rect x="188" y="38" width="8" height="20" rx="2" fill="#0d1629" stroke="#00b8d9" strokeWidth="1.5" />+ <rect x="179" y="32" width="7" height="28" rx="2" fill="#0d1629" stroke="#00b8d9" strokeWidth="1.5" />+ <rect x="172" y="26" width="6" height="36" rx="2" fill="#0d1629" stroke="#00b8d9" strokeWidth="1.5" />++ {/* Collars */}+ <rect x="68" y="52" width="4" height="22" rx="1" fill="#00b8d9" />+ <rect x="168" y="52" width="4" height="22" rx="1" fill="#00b8d9" />+ </svg>+ )+}diff --git a/web/src/components/BarbellSVG.tsx b/web/src/components/BarbellSVG.tsxnew file mode 100644index 0000000..1010ce9--- /dev/null+++ b/web/src/components/BarbellSVG.tsx@@ -0,0 +1,25 @@+// Bent barbell from brand-logo.html design system+export default function BarbellSVG() {+ return (+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" width="40" height="40">+ {/* Bent bar (under load) */}+ <path d="M4 16 Q20 25 36 16" fill="none" stroke="#f1f5f9" strokeWidth="2.6" strokeLinecap="round" />++ {/* Collar dots */}+ <circle cx="10.2" cy="18.8" r="1" fill="#475569" />+ <circle cx="29.8" cy="18.8" r="1" fill="#475569" />++ {/* Left plates */}+ <rect x="3" y="10" width="3" height="18" rx="0.8" fill="#0891b2" />+ <rect x="6" y="8" width="4" height="22" rx="1" fill="#00b8d9" />++ {/* Right plates */}+ <rect x="34" y="10" width="3" height="18" rx="0.8" fill="#0891b2" />+ <rect x="30" y="8" width="4" height="22" rx="1" fill="#00b8d9" />++ {/* Highlights */}+ <rect x="7.2" y="10.5" width="1.2" height="17" rx="0.5" fill="#7eeeff" opacity="0.55" />+ <rect x="31.6" y="10.5" width="1.2" height="17" rx="0.5" fill="#7eeeff" opacity="0.55" />+ </svg>+ )+}diff --git a/web/src/components/Layout.tsx b/web/src/components/Layout.tsxindex 21e6ba8..9e0648f 100644--- a/web/src/components/Layout.tsx+++ b/web/src/components/Layout.tsx@@ -7,6 +7,7 @@ import {} from 'lucide-react'import { useAuthStore } from '../stores/auth'import { useTheme } from '../hooks/useTheme'+import Logo from './Logo'const NAV = [{ path: '/', label: 'Home', icon: Home },@@ -39,69 +40,75 @@ function UserMenu() {<div ref={ref} className="relative"><buttononClick={() => setOpen(o => !o)}- className="flex items-center gap-2 px-2 py-1.5 rounded-lg hover:bg-surface-muted transition-colors"+ className="flex items-center gap-2.5 px-3 py-2 rounded-lg hover:bg-surface-muted/60 active:bg-surface-muted transition-colors group">- {/* Avatar */}- <div className="w-7 h-7 rounded-full bg-gradient-to-br from-brand-500 to-violet-500 flex items-center justify-center flex-shrink-0">- <span className="text-[11px] font-bold text-white leading-none">{initials}</span>+ {/* Avatar — larger, more prominent */}+ <div className="w-8 h-8 rounded-full bg-gradient-to-br from-brand-500 to-violet-500 flex items-center justify-center flex-shrink-0 ring-1 ring-brand-400/30">+ <span className="text-xs font-bold text-white leading-none">{initials}</span></div>- <span className="hidden sm:block text-sm font-medium text-tx-secondary max-w-[120px] truncate">+ <span className="hidden sm:block text-sm font-medium text-tx-secondary max-w-[100px] truncate">{user?.email?.split('@')[0]}</span>- <ChevronDown className={`w-3.5 h-3.5 text-tx-muted transition-transform duration-150 ${open ? 'rotate-180' : ''}`} />+ <ChevronDown className={`w-3.5 h-3.5 text-tx-muted group-hover:text-tx-secondary transition-all duration-200 ${open ? 'rotate-180' : ''}`} /></button>{/* Dropdown */}{open && (- <div className="absolute right-0 top-full mt-2 w-60 bg-surface-overlay border border-surface-border rounded-xl shadow-dropdown z-50 animate-slide-up overflow-hidden">+ <div className="absolute right-0 top-full mt-1 w-64 bg-surface-overlay border border-surface-border rounded-2xl shadow-dropdown z-50 animate-slide-up overflow-hidden">{/* User info header */}- <div className="px-4 py-3 border-b border-surface-border">+ <div className="px-4 py-4 border-b border-surface-border/50 bg-surface-raised/40"><div className="flex items-center gap-3">- <div className="w-10 h-10 rounded-full bg-gradient-to-br from-brand-500 to-violet-500 flex items-center justify-center flex-shrink-0">+ <div className="w-12 h-12 rounded-full bg-gradient-to-br from-brand-500 to-violet-500 flex items-center justify-center flex-shrink-0 ring-2 ring-brand-400/30"><span className="text-sm font-bold text-white">{initials}</span></div>- <div className="min-w-0">+ <div className="min-w-0 flex-1"><p className="text-sm font-semibold text-tx-primary truncate">{user?.email?.split('@')[0]}</p>- <p className="text-xs text-tx-muted truncate">{user?.email}</p>+ <p className="text-xs text-tx-muted truncate mt-0.5">{user?.email}</p></div></div></div>{/* Menu items */}- <div className="py-1">+ <div className="py-2"><Linkto="/settings"onClick={() => setOpen(false)}- className="flex items-center gap-3 px-4 py-2.5 text-sm text-tx-secondary hover:text-tx-primary hover:bg-surface-muted transition-colors"+ className="flex items-center gap-3 px-4 py-2.5 text-sm text-tx-secondary hover:text-tx-primary hover:bg-surface-muted/50 transition-colors">- <User className="w-4 h-4" />- Profile & Settings+ <User className="w-4 h-4 text-tx-muted group-hover:text-brand-500" />+ <span>Profile & Settings</span></Link><buttononClick={toggleTheme}- className="w-full flex items-center gap-3 px-4 py-2.5 text-sm text-tx-secondary hover:text-tx-primary hover:bg-surface-muted transition-colors"+ className="w-full flex items-center gap-3 px-4 py-2.5 text-sm text-tx-secondary hover:text-tx-primary hover:bg-surface-muted/50 transition-colors">{theme === 'dark'- ? <><Sun className="w-4 h-4" /> Switch to Light mode</>- : <><Moon className="w-4 h-4" /> Switch to Dark mode</>+ ? <>+ <Sun className="w-4 h-4 text-tx-muted" />+ <span>Switch to Light</span>+ </>+ : <>+ <Moon className="w-4 h-4 text-tx-muted" />+ <span>Switch to Dark</span>+ </>}</button></div>{/* Footer */}- <div className="border-t border-surface-border py-1">+ <div className="border-t border-surface-border/50 py-2"><div className="flex items-center gap-2 px-4 py-2">- <Shield className="w-3.5 h-3.5 text-tx-muted flex-shrink-0" />- <span className="text-xs text-tx-muted truncate">Self-hosted · localhost:3000</span>+ <Shield className="w-3.5 h-3.5 text-brand-500 flex-shrink-0" />+ <span className="text-xs text-tx-muted">Self-hosted · localhost:3000</span></div><buttononClick={() => { logout(); setOpen(false) }}className="w-full flex items-center gap-3 px-4 py-2.5 text-sm text-error-400 hover:bg-error-500/10 transition-colors"><LogOut className="w-4 h-4" />- Sign out+ <span>Sign out</span></button></div></div>@@ -118,15 +125,7 @@ export default function Layout() {{/* Header */}<header className="sticky top-0 z-50 border-b border-surface-border bg-surface-base/95 backdrop-blur-sm"><div className="max-w-6xl mx-auto px-5 h-14 flex justify-between items-center">- <div className="flex items-center gap-2.5">- <div className="w-7 h-7 rounded-lg bg-brand-500 flex items-center justify-center">- <Dumbbell className="w-4 h-4 text-white" strokeWidth={2.5} />- </div>- <span className="font-display font-bold text-lg text-tx-primary tracking-tight">- lyftr- </span>- </div>-+ <Logo size="md" /><UserMenu /></div></header>diff --git a/web/src/components/Logo.tsx b/web/src/components/Logo.tsxnew file mode 100644index 0000000..a2d70ed--- /dev/null+++ b/web/src/components/Logo.tsx@@ -0,0 +1,28 @@+import BarbellSVG from './BarbellSVG'++const sizeMap = {+ sm: { scale: 0.6, fontSize: 14 },+ md: { scale: 1, fontSize: 18 },+ lg: { scale: 1.4, fontSize: 22 },+};++export default function Logo({ size = 'md' }: { size?: 'sm' | 'md' | 'lg' }) {+ const s = sizeMap[size];++ return (+ <div className="flex items-center gap-2.5">+ {/* Barbell */}+ <div style={{ transform: `scale(${s.scale})`, transformOrigin: 'left center' }} className="flex-shrink-0">+ <BarbellSVG />+ </div>++ {/* Text */}+ <span className="font-display font-extrabold text-tx-primary tracking-tight" style={{+ fontSize: `${s.fontSize}px`,+ letterSpacing: '-0.02em',+ }}>+ lyftr+ </span>+ </div>+ );+}diff --git a/web/src/components/index.ts b/web/src/components/index.tsnew file mode 100644index 0000000..1ab7e72--- /dev/null+++ b/web/src/components/index.ts@@ -0,0 +1,6 @@+export { default as Layout } from './Layout'+export { default as Loading } from './Loading'+export { default as Logo } from './Logo'+export { default as BarbellSVG } from './BarbellSVG'+export { default as BarbellMark } from './BarbellMark'+export { HelpTip } from './Tooltip'diff --git a/web/src/pages/Login.tsx b/web/src/pages/Login.tsxindex 3c41824..db7854e 100644--- a/web/src/pages/Login.tsx+++ b/web/src/pages/Login.tsx@@ -1,7 +1,8 @@import { useState } from 'react'import { useNavigate, Link } from 'react-router-dom'-import { Dumbbell, AlertCircle, Zap } from 'lucide-react'+import { AlertCircle, Zap, Dumbbell, Apple, TrendingUp, LogIn } from 'lucide-react'import { useAuthStore } from '../stores/auth'+import Logo from '../components/Logo'export default function Login() {const [email, setEmail] = useState('')@@ -39,55 +40,120 @@ export default function Login() {}return (- <div className="min-h-screen bg-surface-base flex items-center justify-center px-4">- {/* Subtle top gradient — one, not three */}- <div className="pointer-events-none fixed inset-x-0 top-0 h-64 bg-gradient-to-b from-brand-500/6 to-transparent" />-- <div className="relative w-full max-w-sm animate-slide-up">- {/* Logo mark */}- <div className="mb-8">- <div className="w-10 h-10 rounded-xl bg-brand-500 flex items-center justify-center mb-5">- <Dumbbell className="w-5 h-5 text-white" strokeWidth={2.5} />- </div>- <h1 className="font-display font-bold text-2xl text-white tracking-tight">- Sign in to lyftr+ <div className="min-h-screen grid grid-cols-1 lg:grid-cols-2 bg-surface-base">+ {/* Left side — branding */}+ <div className="hidden lg:flex flex-col justify-between p-12 relative overflow-hidden" style={{+ background: 'linear-gradient(135deg, #030812 0%, #0a1b2e 50%, #081326 100%)',+ }}>+ {/* Gradient overlays */}+ <div className="absolute inset-0 pointer-events-none"+ style={{+ background: `+ radial-gradient(ellipse at 20% 30%, rgba(0, 184, 217, 0.25) 0%, transparent 50%),+ radial-gradient(ellipse at 80% 70%, rgba(139, 92, 246, 0.15) 0%, transparent 50%)+ `,+ }}+ />++ {/* Logo */}+ <div className="relative">+ <Logo size="md" />+ </div>++ {/* Headline and features */}+ <div className="relative space-y-8">+ <h1 className="font-display font-bold text-5xl leading-tight tracking-tight">+ Log. Lift.+ <br />+ <span className="bg-gradient-to-r from-brand-500 to-violet-500 bg-clip-text text-transparent">+ Progress.+ </span></h1>- <p className="text-slate-500 text-sm mt-1">- Your self-hosted fitness tracker++ <p className="text-tx-secondary text-base leading-relaxed max-w-sm">+ Your self-hosted fitness tracker. Track workouts, log food, monitor weight — all under your control, running on your own server.</p>++ {/* Features */}+ <div className="space-y-4">+ {[+ { icon: Dumbbell, label: 'Track workouts' },+ { icon: Apple, label: 'Log food + macros' },+ { icon: TrendingUp, label: 'See progress' },+ ].map(({ icon: Icon, label }) => (+ <div key={label} className="flex items-center gap-3 text-tx-muted text-sm">+ <Icon className="w-4 h-4 text-brand-500" strokeWidth={2} />+ {label}+ </div>+ ))}+ </div>+ </div>++ {/* Footer */}+ <div className="relative text-tx-muted text-xs">+ © lyftr · v0.1.0</div>+ </div>- {/* Form card */}- <div className="card-glass p-6 space-y-4">+ {/* Right side — form */}+ <div className="flex items-center justify-center p-6 lg:p-12">+ <div className="w-full max-w-sm">+ {/* Mobile logo */}+ <div className="lg:hidden mb-8">+ <Logo size="lg" />+ </div>++ {/* Heading */}+ <div className="mb-8">+ <h2 className="font-display font-bold text-3xl text-tx-primary tracking-tight">+ Welcome back+ </h2>+ <p className="text-tx-muted text-sm mt-2">+ Sign in to continue training.+ </p>+ </div>++ {/* Form */}<form onSubmit={handleSubmit} className="space-y-4">+ {/* Email */}<div>- <label htmlFor="email" className="label">Email address</label>+ <label htmlFor="email" className="label">Email</label><inputid="email"type="email"value={email}onChange={e => setEmail(e.target.value)}- className="input"+ className="input mt-2"placeholder="[email protected]"autoComplete="email"required/></div>+ {/* Password */}<div>- <label htmlFor="password" className="label">Password</label>+ <div className="flex items-center justify-between mb-2">+ <label htmlFor="password" className="label">Password</label>+ <button+ type="button"+ className="text-xs text-brand-400 font-medium hover:text-brand-300 transition-colors"+ >+ Forgot?+ </button>+ </div><inputid="password"type="password"value={password}onChange={e => setPassword(e.target.value)}- className="input"+ className="input mt-2"placeholder="••••••••"autoComplete="current-password"required/></div>+ {/* Error */}{error && (<div className="alert-error"><AlertCircle className="w-4 h-4 mt-0.5 flex-shrink-0" />@@ -95,36 +161,46 @@ export default function Login() {</div>)}- <button type="submit" disabled={isLoading} className="btn-primary btn-lg w-full">+ {/* Sign in button */}+ <button+ type="submit"+ disabled={isLoading}+ className="btn-primary btn-lg w-full mt-6 flex items-center justify-center gap-2"+ >+ <LogIn className="w-4 h-4" />{isLoading ? 'Signing in…' : 'Sign in'}</button>++ {/* Divider */}+ <div className="relative flex items-center my-6">+ <div className="flex-1 h-px bg-surface-border" />+ <span className="px-3 text-xs text-tx-muted uppercase tracking-wider">or</span>+ <div className="flex-1 h-px bg-surface-border" />+ </div>++ {/* Demo button */}+ <button+ type="button"+ onClick={handleDemoLogin}+ disabled={isLoading}+ className="btn-secondary btn-lg w-full flex items-center justify-center gap-2"+ >+ <Zap className="w-4 h-4 text-warning-400" />+ Try demo account+ </button></form>- {import.meta.env.DEV && (- <>- <div className="flex items-center gap-3">- <div className="flex-1 h-px bg-surface-border" />- <span className="text-xs text-slate-600">dev</span>- <div className="flex-1 h-px bg-surface-border" />- </div>- <button- onClick={handleDemoLogin}- disabled={isLoading}- className="btn-secondary btn-md w-full"- >- <Zap className="w-3.5 h-3.5 text-brand-400" />- Continue with demo account- </button>- </>- )}+ {/* Sign up link */}+ <p className="mt-8 text-center text-sm text-tx-muted">+ New here?{' '}+ <Link+ to="/register"+ className="text-brand-400 font-medium hover:text-brand-300 transition-colors"+ >+ Create account+ </Link>+ </p></div>-- <p className="mt-5 text-center text-sm text-slate-500">- Don't have an account?{' '}- <Link to="/register" className="text-brand-400 font-medium hover:text-brand-300 transition-colors">- Sign up- </Link>- </p></div></div>)diff --git a/web/src/pages/Register.tsx b/web/src/pages/Register.tsxindex 6f7098d..0be0bb8 100644--- a/web/src/pages/Register.tsx+++ b/web/src/pages/Register.tsx@@ -1,7 +1,8 @@import { useState } from 'react'import { useNavigate, Link } from 'react-router-dom'-import { Dumbbell, AlertCircle } from 'lucide-react'+import { AlertCircle, Dumbbell, Apple, TrendingUp, UserPlus } from 'lucide-react'import { useAuthStore } from '../stores/auth'+import Logo from '../components/Logo'export default function Register() {const [email, setEmail] = useState('')@@ -30,41 +31,127 @@ export default function Register() {}return (- <div className="min-h-screen bg-surface-base flex items-center justify-center px-4">- <div className="pointer-events-none fixed inset-x-0 top-0 h-64 bg-gradient-to-b from-brand-500/6 to-transparent" />+ <div className="min-h-screen grid grid-cols-1 lg:grid-cols-2 bg-surface-base">+ {/* Left side — branding */}+ <div className="hidden lg:flex flex-col justify-between p-12 relative overflow-hidden" style={{+ background: 'linear-gradient(135deg, #030812 0%, #0a1b2e 50%, #081326 100%)',+ }}>+ {/* Gradient overlays */}+ <div className="absolute inset-0 pointer-events-none"+ style={{+ background: `+ radial-gradient(ellipse at 20% 30%, rgba(0, 184, 217, 0.25) 0%, transparent 50%),+ radial-gradient(ellipse at 80% 70%, rgba(139, 92, 246, 0.15) 0%, transparent 50%)+ `,+ }}+ />- <div className="relative w-full max-w-sm animate-slide-up">- <div className="mb-8">- <div className="w-10 h-10 rounded-xl bg-brand-500 flex items-center justify-center mb-5">- <Dumbbell className="w-5 h-5 text-white" strokeWidth={2.5} />- </div>- <h1 className="font-display font-bold text-2xl text-white tracking-tight">- Create your account+ {/* Logo */}+ <div className="relative">+ <Logo size="md" />+ </div>++ {/* Headline and features */}+ <div className="relative space-y-8">+ <h1 className="font-display font-bold text-5xl leading-tight tracking-tight">+ Log. Lift.+ <br />+ <span className="bg-gradient-to-r from-brand-500 to-violet-500 bg-clip-text text-transparent">+ Progress.+ </span></h1>- <p className="text-slate-500 text-sm mt-1">Start tracking with lyftr</p>++ <p className="text-tx-secondary text-base leading-relaxed max-w-sm">+ Your self-hosted fitness tracker. Track workouts, log food, monitor weight — all under your control, running on your own server.+ </p>++ {/* Features */}+ <div className="space-y-4">+ {[+ { icon: Dumbbell, label: 'Track workouts' },+ { icon: Apple, label: 'Log food + macros' },+ { icon: TrendingUp, label: 'See progress' },+ ].map(({ icon: Icon, label }) => (+ <div key={label} className="flex items-center gap-3 text-tx-muted text-sm">+ <Icon className="w-4 h-4 text-brand-500" strokeWidth={2} />+ {label}+ </div>+ ))}+ </div>+ </div>++ {/* Footer */}+ <div className="relative text-tx-muted text-xs">+ © lyftr · v0.1.0</div>+ </div>++ {/* Right side — form */}+ <div className="flex items-center justify-center p-6 lg:p-12">+ <div className="w-full max-w-sm">+ {/* Mobile logo */}+ <div className="lg:hidden mb-8">+ <Logo size="lg" />+ </div>++ {/* Heading */}+ <div className="mb-8">+ <h2 className="font-display font-bold text-3xl text-tx-primary tracking-tight">+ Create account+ </h2>+ <p className="text-tx-muted text-sm mt-2">+ Start tracking your fitness today.+ </p>+ </div>- <div className="card-glass p-6">+ {/* Form */}<form onSubmit={handleSubmit} className="space-y-4">+ {/* Email */}<div>- <label htmlFor="email" className="label">Email address</label>- <input id="email" type="email" value={email}+ <label htmlFor="email" className="label">Email</label>+ <input+ id="email"+ type="email"+ value={email}onChange={e => setEmail(e.target.value)}- className="input" placeholder="[email protected]" autoComplete="email" required />+ className="input mt-2"+ placeholder="[email protected]"+ autoComplete="email"+ required+ /></div>++ {/* Password */}<div><label htmlFor="password" className="label">Password</label>- <input id="password" type="password" value={password}+ <input+ id="password"+ type="password"+ value={password}onChange={e => setPassword(e.target.value)}- className="input" placeholder="Min 8 characters" autoComplete="new-password" required />+ className="input mt-2"+ placeholder="Min 8 characters"+ autoComplete="new-password"+ required+ /></div>++ {/* Confirm password */}<div><label htmlFor="password-confirm" className="label">Confirm password</label>- <input id="password-confirm" type="password" value={passwordConfirm}+ <input+ id="password-confirm"+ type="password"+ value={passwordConfirm}onChange={e => setPasswordConfirm(e.target.value)}- className="input" placeholder="••••••••" autoComplete="new-password" required />+ className="input mt-2"+ placeholder="••••••••"+ autoComplete="new-password"+ required+ /></div>+ {/* Error */}{error && (<div className="alert-error"><AlertCircle className="w-4 h-4 mt-0.5 flex-shrink-0" />@@ -72,18 +159,28 @@ export default function Register() {</div>)}- <button type="submit" disabled={isLoading} className="btn-primary btn-lg w-full">+ {/* Create account button */}+ <button+ type="submit"+ disabled={isLoading}+ className="btn-primary btn-lg w-full mt-6 flex items-center justify-center gap-2"+ >+ <UserPlus className="w-4 h-4" />{isLoading ? 'Creating account…' : 'Create account'}</button></form>- </div>- <p className="mt-5 text-center text-sm text-slate-500">- Already have an account?{' '}- <Link to="/login" className="text-brand-400 font-medium hover:text-brand-300 transition-colors">- Sign in- </Link>- </p>+ {/* Sign in link */}+ <p className="mt-8 text-center text-sm text-tx-muted">+ Already have an account?{' '}+ <Link+ to="/login"+ className="text-brand-400 font-medium hover:text-brand-300 transition-colors"+ >+ Sign in+ </Link>+ </p>+ </div></div></div>)