Login and register

This commit is contained in:
2026-02-03 17:00:21 +01:00
parent 56672f30f5
commit 09faa75826
8 changed files with 317 additions and 24 deletions
+95
View File
@@ -0,0 +1,95 @@
"use client";
import Link from "next/link";
import {
ArrowRight,
Github,
KeyRound,
LogIn,
Mail,
UserRound,
Zap,
} from "lucide-react";
import { Button } from "@/components/ui/button";
import {
Card,
CardContent,
CardHeader,
CardTitle,
CardDescription,
} from "@/components/ui/card";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
export function LoginPage() {
return (
<div className="min-h-screen flex items-center justify-center relative overflow-hidden">
{/* Background glow */}
<div
className="absolute inset-0 pointer-events-none"
style={{
background:
"radial-gradient(ellipse at top, hsl(270 91% 45% / 0.25) 0%, transparent 60%)",
}}
/>
<Card className="w-full max-w-md relative">
<CardHeader className="text-center">
<div className="mx-auto mb-4 w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center">
<LogIn className="h-6 w-6 text-primary" />
</div>
<CardTitle className="text-2xl">Welcome back</CardTitle>
<CardDescription>
Log in to continue chasing your personal best.
</CardDescription>
</CardHeader>
<CardContent className="space-y-6">
<div className="space-y-4">
<div className="space-y-2">
<Label htmlFor="email">Email</Label>
<Input id="email" type="email" placeholder="[email protected]" />
</div>
<div className="space-y-2">
<Label htmlFor="password">Password</Label>
<Input id="password" type="password" placeholder="••••••••" />
</div>
</div>
<Button className="w-full" variant="secondary">
Log In
</Button>
<div className="relative">
<div className="absolute inset-0 flex items-center">
<span className="w-full border-t border-border" />
</div>
<div className="relative flex justify-center text-xs uppercase">
<span className="bg-card px-2 text-muted-foreground">
Or continue with
</span>
</div>
</div>
<div className="grid grid-cols-2 gap-3">
<Button variant="outline">
<Github className="h-4 w-4" />
GitHub
</Button>
<Button variant="outline">
<Mail className="h-4 w-4" />
Google
</Button>
</div>
<p className="text-center text-sm text-muted-foreground">
Don&apos;t have an account?{" "}
<Link href="/register" className="text-primary hover:underline">
Create one
</Link>
</p>
</CardContent>
</Card>
</div>
);
}
+69
View File
@@ -0,0 +1,69 @@
"use client";
import Link from "next/link";
import { ArrowRight, Github, Mail, UserPlus, Zap } from "lucide-react";
import { Button } from "@/components/ui/button";
import {
Card,
CardContent,
CardHeader,
CardTitle,
CardDescription,
} from "@/components/ui/card";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
export function RegisterPage() {
return (
<div className="min-h-screen flex items-center justify-center relative overflow-hidden">
{/* Background glow */}
<div
className="absolute inset-0 pointer-events-none"
style={{
background:
"radial-gradient(ellipse at bottom, hsl(270 91% 75% / 0.18) 0%, transparent 60%)",
}}
/>
<Card className="w-full max-w-md relative">
<CardHeader className="text-center">
<div className="mx-auto mb-4 w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center">
<UserPlus className="h-6 w-6 text-primary" />
</div>
<CardTitle className="text-2xl">Create your account</CardTitle>
<CardDescription>
Join the grind. Track runs, set records, compete globally.
</CardDescription>
</CardHeader>
<CardContent className="space-y-6">
<div className="space-y-4">
<div className="space-y-2">
<Label htmlFor="username">Username</Label>
<Input id="username" placeholder="speedrunner67" />
</div>
<div className="space-y-2">
<Label htmlFor="email">Email</Label>
<Input id="email" type="email" placeholder="[email protected]" />
</div>
<div className="space-y-2">
<Label htmlFor="password">Password</Label>
<Input id="password" type="password" placeholder="••••••••" />
</div>
</div>
<Button className="w-full" variant="secondary">
Create Account
</Button>
<p className="text-center text-sm text-muted-foreground">
Already have an account?{" "}
<Link href="/login" className="text-primary hover:underline">
Log in
</Link>
</p>
</CardContent>
</Card>
</div>
);
}