2025-12-03 21:56:50 +00:00
|
|
|
import React from 'react';
|
|
|
|
|
import { Link } from 'react-router-dom';
|
|
|
|
|
import { cn } from '@/lib/utils';
|
|
|
|
|
|
2026-01-26 13:12:17 +00:00
|
|
|
import { Card } from '@/components/ui/card';
|
|
|
|
|
|
2025-12-03 21:56:50 +00:00
|
|
|
interface AuthLayoutProps {
|
|
|
|
|
title: string;
|
|
|
|
|
subtitle?: string;
|
|
|
|
|
children: React.ReactNode;
|
|
|
|
|
footerLinks?: Array<{ label: string; to: string }>;
|
|
|
|
|
className?: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function AuthLayout({
|
|
|
|
|
title,
|
|
|
|
|
subtitle,
|
|
|
|
|
children,
|
|
|
|
|
footerLinks,
|
|
|
|
|
className,
|
|
|
|
|
}: AuthLayoutProps) {
|
|
|
|
|
return (
|
|
|
|
|
<div
|
|
|
|
|
className={cn(
|
2026-01-26 13:12:17 +00:00
|
|
|
'min-h-screen flex items-center justify-center bg-background py-12 px-4 sm:px-6 lg:px-8 relative overflow-hidden',
|
2025-12-13 02:34:34 +00:00
|
|
|
className,
|
2025-12-03 21:56:50 +00:00
|
|
|
)}
|
|
|
|
|
role="main"
|
|
|
|
|
aria-label="Page d'authentification"
|
|
|
|
|
>
|
feat(ui): premium auth pages polish
AuthLayout:
- Full-screen gradient background with animated pulse blobs
- Glass-morphism card (bg-card/80, backdrop-blur-md, shadow-2xl)
- New animate-auth-enter animation (fade + scale + translateY)
OAuth buttons: real provider icons (Google SVG, GitHub, Discord)
Password strength: 4-segment bar, color-coded labels, checklist icons
Login: Checkbox component for Remember Me, animated error alerts
Register: migrated to AuthInput, username check with spinner/icons
Verification notice: Mail icon, success-tinted circle, AuthButton
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-09 23:33:35 +00:00
|
|
|
{/* Background gradient */}
|
|
|
|
|
<div className="fixed inset-0 bg-background">
|
|
|
|
|
<div className="absolute inset-0 bg-gradient-to-br from-primary/5 via-transparent to-primary/5" />
|
|
|
|
|
<div className="absolute top-1/4 left-1/4 w-96 h-96 bg-primary/10 rounded-full blur-3xl animate-pulse" />
|
|
|
|
|
<div
|
|
|
|
|
className="absolute bottom-1/4 right-1/4 w-64 h-64 bg-primary/5 rounded-full blur-3xl animate-pulse"
|
|
|
|
|
style={{ animationDelay: '2s' }}
|
|
|
|
|
/>
|
|
|
|
|
{/* Subtle secondary accent blob */}
|
|
|
|
|
<div
|
|
|
|
|
className="absolute top-2/3 left-1/2 w-72 h-72 bg-secondary/5 rounded-full blur-3xl animate-pulse"
|
|
|
|
|
style={{ animationDelay: '4s' }}
|
|
|
|
|
/>
|
2026-01-11 15:30:43 +00:00
|
|
|
</div>
|
|
|
|
|
|
feat(ui): premium auth pages polish
AuthLayout:
- Full-screen gradient background with animated pulse blobs
- Glass-morphism card (bg-card/80, backdrop-blur-md, shadow-2xl)
- New animate-auth-enter animation (fade + scale + translateY)
OAuth buttons: real provider icons (Google SVG, GitHub, Discord)
Password strength: 4-segment bar, color-coded labels, checklist icons
Login: Checkbox component for Remember Me, animated error alerts
Register: migrated to AuthInput, username check with spinner/icons
Verification notice: Mail icon, success-tinted circle, AuthButton
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-09 23:33:35 +00:00
|
|
|
<div className="max-w-md w-full mx-auto space-y-8 relative z-10 animate-auth-enter">
|
2025-12-03 21:56:50 +00:00
|
|
|
{/* Logo and Title */}
|
|
|
|
|
<header className="text-center">
|
2026-01-11 15:30:43 +00:00
|
|
|
<div className="flex items-center justify-center mb-6">
|
2025-12-03 21:56:50 +00:00
|
|
|
<div
|
2026-02-12 01:09:29 +00:00
|
|
|
className="h-12 w-12 rounded-xl bg-primary flex items-center justify-center shadow-sm"
|
2025-12-03 21:56:50 +00:00
|
|
|
aria-hidden="true"
|
|
|
|
|
>
|
feat(ui): premium auth pages polish
AuthLayout:
- Full-screen gradient background with animated pulse blobs
- Glass-morphism card (bg-card/80, backdrop-blur-md, shadow-2xl)
- New animate-auth-enter animation (fade + scale + translateY)
OAuth buttons: real provider icons (Google SVG, GitHub, Discord)
Password strength: 4-segment bar, color-coded labels, checklist icons
Login: Checkbox component for Remember Me, animated error alerts
Register: migrated to AuthInput, username check with spinner/icons
Verification notice: Mail icon, success-tinted circle, AuthButton
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-09 23:33:35 +00:00
|
|
|
<span className="text-primary-foreground font-bold text-2xl">V</span>
|
2025-12-03 21:56:50 +00:00
|
|
|
</div>
|
2026-01-26 13:12:17 +00:00
|
|
|
<span className="ml-3 font-bold text-3xl text-foreground">Veza</span>
|
2025-12-03 21:56:50 +00:00
|
|
|
</div>
|
2025-12-13 02:34:34 +00:00
|
|
|
<h1
|
|
|
|
|
id="auth-form-title"
|
2026-01-26 13:12:17 +00:00
|
|
|
className="text-3xl font-bold text-foreground mb-2"
|
2025-12-13 02:34:34 +00:00
|
|
|
>
|
2025-12-03 21:56:50 +00:00
|
|
|
{title}
|
|
|
|
|
</h1>
|
|
|
|
|
{subtitle && (
|
2026-01-26 13:12:17 +00:00
|
|
|
<p className="text-sm text-muted-foreground" role="doc-subtitle">
|
2025-12-03 21:56:50 +00:00
|
|
|
{subtitle}
|
|
|
|
|
</p>
|
|
|
|
|
)}
|
|
|
|
|
</header>
|
|
|
|
|
|
feat(ui): premium auth pages polish
AuthLayout:
- Full-screen gradient background with animated pulse blobs
- Glass-morphism card (bg-card/80, backdrop-blur-md, shadow-2xl)
- New animate-auth-enter animation (fade + scale + translateY)
OAuth buttons: real provider icons (Google SVG, GitHub, Discord)
Password strength: 4-segment bar, color-coded labels, checklist icons
Login: Checkbox component for Remember Me, animated error alerts
Register: migrated to AuthInput, username check with spinner/icons
Verification notice: Mail icon, success-tinted circle, AuthButton
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-09 23:33:35 +00:00
|
|
|
{/* Content Card — glass effect */}
|
2026-01-26 13:12:17 +00:00
|
|
|
<Card
|
2026-02-07 18:52:12 +00:00
|
|
|
variant="surface"
|
2026-01-26 13:12:17 +00:00
|
|
|
padding="lg"
|
feat(ui): premium auth pages polish
AuthLayout:
- Full-screen gradient background with animated pulse blobs
- Glass-morphism card (bg-card/80, backdrop-blur-md, shadow-2xl)
- New animate-auth-enter animation (fade + scale + translateY)
OAuth buttons: real provider icons (Google SVG, GitHub, Discord)
Password strength: 4-segment bar, color-coded labels, checklist icons
Login: Checkbox component for Remember Me, animated error alerts
Register: migrated to AuthInput, username check with spinner/icons
Verification notice: Mail icon, success-tinted circle, AuthButton
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-09 23:33:35 +00:00
|
|
|
className="w-full bg-card/80 backdrop-blur-md border-border/50 shadow-2xl"
|
2025-12-03 21:56:50 +00:00
|
|
|
aria-labelledby="auth-form-title"
|
|
|
|
|
>
|
|
|
|
|
{children}
|
2026-01-26 13:12:17 +00:00
|
|
|
</Card>
|
2025-12-03 21:56:50 +00:00
|
|
|
|
|
|
|
|
{/* Footer Links */}
|
|
|
|
|
{footerLinks && footerLinks.length > 0 && (
|
2025-12-13 02:34:34 +00:00
|
|
|
<nav
|
|
|
|
|
className="text-center space-x-4"
|
|
|
|
|
aria-label="Navigation d'authentification"
|
|
|
|
|
>
|
2025-12-03 21:56:50 +00:00
|
|
|
{footerLinks.map((link) => (
|
|
|
|
|
<Link
|
|
|
|
|
key={link.to}
|
|
|
|
|
to={link.to}
|
feat(ui): premium auth pages polish
AuthLayout:
- Full-screen gradient background with animated pulse blobs
- Glass-morphism card (bg-card/80, backdrop-blur-md, shadow-2xl)
- New animate-auth-enter animation (fade + scale + translateY)
OAuth buttons: real provider icons (Google SVG, GitHub, Discord)
Password strength: 4-segment bar, color-coded labels, checklist icons
Login: Checkbox component for Remember Me, animated error alerts
Register: migrated to AuthInput, username check with spinner/icons
Verification notice: Mail icon, success-tinted circle, AuthButton
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-09 23:33:35 +00:00
|
|
|
className="text-sm text-muted-foreground hover:text-foreground transition-colors duration-[var(--duration-fast)] focus:outline-none focus:ring-2 focus:ring-primary/30 focus:ring-offset-2 focus:ring-offset-background rounded"
|
2025-12-03 21:56:50 +00:00
|
|
|
>
|
|
|
|
|
{link.label}
|
|
|
|
|
</Link>
|
|
|
|
|
))}
|
|
|
|
|
</nav>
|
|
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|