feat: implement authentication login and registration pages with custom dark theme and icon support
This commit is contained in:
+24
-13
@@ -4,22 +4,23 @@
|
|||||||
|
|
||||||
@layer base {
|
@layer base {
|
||||||
:root, .dark {
|
:root, .dark {
|
||||||
--background: #676278;
|
/* Deeper premium dark mode background */
|
||||||
--background-dark: #605C71;
|
--background: #120D1C;
|
||||||
|
--background-dark: #0A0710;
|
||||||
--foreground: #FBF9FE;
|
--foreground: #FBF9FE;
|
||||||
|
|
||||||
--card: #2B2538;
|
--card: #1F172B;
|
||||||
--card-foreground: #FBF9FE;
|
--card-foreground: #FBF9FE;
|
||||||
|
|
||||||
--popover: #2B2538;
|
--popover: #1F172B;
|
||||||
--popover-foreground: #FBF9FE;
|
--popover-foreground: #FBF9FE;
|
||||||
|
|
||||||
--primary: #6C5BB0;
|
--primary: #6C5BB0;
|
||||||
--primary-foreground: #FBF9FE;
|
--primary-foreground: #FFFFFF;
|
||||||
--primary-hover: #594D9F;
|
--primary-hover: #594D9F;
|
||||||
--primary-pressed: #493D90;
|
--primary-pressed: #493D90;
|
||||||
|
|
||||||
--secondary: #1F172B;
|
--secondary: #2B2538;
|
||||||
--secondary-foreground: #C0B8D6;
|
--secondary-foreground: #C0B8D6;
|
||||||
|
|
||||||
--muted: #3B3448;
|
--muted: #3B3448;
|
||||||
@@ -31,14 +32,14 @@
|
|||||||
--destructive: #d8644a;
|
--destructive: #d8644a;
|
||||||
--destructive-foreground: #FBF9FE;
|
--destructive-foreground: #FBF9FE;
|
||||||
|
|
||||||
--border: #473F55;
|
--border: #3B3448;
|
||||||
--input: #473F55;
|
--input: #3B3448;
|
||||||
--input-bg: #150E21;
|
--input-bg: #1A1325;
|
||||||
--overlay: #150E21;
|
--overlay: #000000;
|
||||||
|
|
||||||
--ring: #594D9F;
|
--ring: #6C5BB0;
|
||||||
|
|
||||||
--radius: 0.625rem;
|
--radius: 0.75rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,8 +49,18 @@
|
|||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
@apply text-foreground;
|
@apply text-foreground;
|
||||||
background: linear-gradient(to bottom right, var(--background), var(--background-dark));
|
background: linear-gradient(135deg, var(--background), var(--background-dark));
|
||||||
background-attachment: fixed;
|
background-attachment: fixed;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Fix for Chrome autofill turning inputs yellow/olive */
|
||||||
|
input:-webkit-autofill,
|
||||||
|
input:-webkit-autofill:hover,
|
||||||
|
input:-webkit-autofill:focus,
|
||||||
|
input:-webkit-autofill:active {
|
||||||
|
-webkit-box-shadow: 0 0 0 30px var(--input-bg) inset !important;
|
||||||
|
-webkit-text-fill-color: var(--foreground) !important;
|
||||||
|
transition: background-color 5000s ease-in-out 0s;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+99
-22
@@ -2,9 +2,10 @@ import { login } from './actions'
|
|||||||
import { Button } from '@/components/ui/button'
|
import { Button } from '@/components/ui/button'
|
||||||
import { Input } from '@/components/ui/input'
|
import { Input } from '@/components/ui/input'
|
||||||
import { Label } from '@/components/ui/label'
|
import { Label } from '@/components/ui/label'
|
||||||
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '@/components/ui/card'
|
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import { ErrorToaster } from '@/components/error-toaster'
|
import { ErrorToaster } from '@/components/error-toaster'
|
||||||
|
import Image from 'next/image'
|
||||||
|
import { Icon } from '@/components/ui/icon'
|
||||||
|
|
||||||
export default async function LoginPage({
|
export default async function LoginPage({
|
||||||
searchParams,
|
searchParams,
|
||||||
@@ -16,41 +17,117 @@ export default async function LoginPage({
|
|||||||
const message = resolvedParams?.message;
|
const message = resolvedParams?.message;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex items-center justify-center min-h-screen bg-background p-4">
|
<div className="flex min-h-screen bg-background">
|
||||||
{error && message && <ErrorToaster message={String(message)} />}
|
{error && message && <ErrorToaster message={String(message)} />}
|
||||||
<Card className="w-full max-w-md">
|
|
||||||
<CardHeader className="space-y-1">
|
{/* Sol Taraf - Resim Alanı */}
|
||||||
<CardTitle className="text-2xl font-bold text-center">MindSpace</CardTitle>
|
<div className="hidden lg:flex lg:w-1/2 p-4 relative">
|
||||||
<CardDescription className="text-center">
|
<div className="relative w-full h-full overflow-hidden rounded-2xl">
|
||||||
Hesabınıza giriş yapın
|
<Image
|
||||||
</CardDescription>
|
src="/images/1830857_Image.png"
|
||||||
</CardHeader>
|
alt="MindSpace Background"
|
||||||
<CardContent>
|
fill
|
||||||
<form>
|
className="object-cover"
|
||||||
|
priority
|
||||||
|
/>
|
||||||
|
<div className="absolute inset-0 bg-gradient-to-t from-background via-transparent to-background/30 opacity-90" />
|
||||||
|
{/* Logo */}
|
||||||
|
<div className="absolute bottom-0 flex items-center justify-center pointer-events-none z-10">
|
||||||
|
<div className="relative drop-shadow-2xl flex items-center gap-4">
|
||||||
|
<img
|
||||||
|
src="/logo/logo.png"
|
||||||
|
alt="MindSpace Logo"
|
||||||
|
className="object-contain w-64 h-auto"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Sağ Taraf - Form Alanı */}
|
||||||
|
<div className="flex flex-1 items-center justify-center p-8 w-full lg:w-1/2">
|
||||||
|
<div className="w-full max-w-sm space-y-8">
|
||||||
|
<div className="text-center lg:text-left">
|
||||||
|
<h1 className="text-3xl font-bold tracking-tight text-foreground">
|
||||||
|
Tekrar Hoş Geldiniz
|
||||||
|
</h1>
|
||||||
|
<p className="text-sm text-muted-foreground mt-2">
|
||||||
|
Kişisel alanınıza ulaşmak için giriş yapın
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form className="space-y-6">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor="email">E-posta</Label>
|
<Label htmlFor="email">E-posta</Label>
|
||||||
<Input id="email" name="email" type="email" placeholder="ornek@mail.com" required />
|
<Input
|
||||||
|
id="email"
|
||||||
|
name="email"
|
||||||
|
type="email"
|
||||||
|
placeholder="ornek@mail.com"
|
||||||
|
required
|
||||||
|
className="h-11 bg-input-bg border-border"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
|
<div className="flex items-center justify-between">
|
||||||
<Label htmlFor="password">Şifre</Label>
|
<Label htmlFor="password">Şifre</Label>
|
||||||
<Input id="password" name="password" type="password" required />
|
<Link
|
||||||
|
href="/forgot-password"
|
||||||
|
className="text-sm font-medium text-primary hover:text-primary-hover transition-colors"
|
||||||
|
>
|
||||||
|
Şifremi unuttum
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
<Input
|
||||||
|
id="password"
|
||||||
|
name="password"
|
||||||
|
type="password"
|
||||||
|
required
|
||||||
|
className="h-11 bg-input-bg border-border"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col space-y-4 mt-6">
|
|
||||||
<Button formAction={login} className="w-full">
|
<Button
|
||||||
|
formAction={login}
|
||||||
|
className="w-full h-11 text-base font-medium shadow-md transition-transform active:scale-[0.98] bg-primary hover:bg-primary-hover text-primary-foreground"
|
||||||
|
>
|
||||||
Giriş Yap
|
Giriş Yap
|
||||||
</Button>
|
</Button>
|
||||||
<div className="text-center text-sm">
|
</form>
|
||||||
Hesabınız yok mu?{' '}
|
|
||||||
<Link href="/register" className="text-primary hover:underline">
|
<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-background px-2 text-muted-foreground">
|
||||||
|
veya
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
type="button"
|
||||||
|
variant="outline"
|
||||||
|
className="w-full h-11 text-base font-medium bg-card border-border hover:bg-secondary transition-colors"
|
||||||
|
>
|
||||||
|
<Icon icon="flat-color-icons:google" className="w-5 h-5 mr-2" />
|
||||||
|
Google ile Devam Et
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<div className="text-center text-sm mt-6">
|
||||||
|
Hesabınız yok mu?{" "}
|
||||||
|
<Link
|
||||||
|
href="/register"
|
||||||
|
className="font-medium text-primary hover:text-primary-hover transition-colors"
|
||||||
|
>
|
||||||
Kayıt Ol
|
Kayıt Ol
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
</div>
|
</div>
|
||||||
)
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
+79
-20
@@ -2,9 +2,10 @@ import { signup } from '@/app/login/actions'
|
|||||||
import { Button } from '@/components/ui/button'
|
import { Button } from '@/components/ui/button'
|
||||||
import { Input } from '@/components/ui/input'
|
import { Input } from '@/components/ui/input'
|
||||||
import { Label } from '@/components/ui/label'
|
import { Label } from '@/components/ui/label'
|
||||||
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '@/components/ui/card'
|
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import { ErrorToaster } from '@/components/error-toaster'
|
import { ErrorToaster } from '@/components/error-toaster'
|
||||||
|
import Image from 'next/image'
|
||||||
|
import { Icon } from '@/components/ui/icon'
|
||||||
|
|
||||||
export default async function RegisterPage({
|
export default async function RegisterPage({
|
||||||
searchParams,
|
searchParams,
|
||||||
@@ -16,41 +17,99 @@ export default async function RegisterPage({
|
|||||||
const message = resolvedParams?.message;
|
const message = resolvedParams?.message;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex items-center justify-center min-h-screen bg-background p-4">
|
<div className="flex min-h-screen bg-background">
|
||||||
{error && message && <ErrorToaster message={String(message)} />}
|
{error && message && <ErrorToaster message={String(message)} />}
|
||||||
<Card className="w-full max-w-md">
|
|
||||||
<CardHeader className="space-y-1">
|
{/* Sol Taraf - Resim Alanı */}
|
||||||
<CardTitle className="text-2xl font-bold text-center">MindSpace</CardTitle>
|
<div className="hidden lg:flex lg:w-1/2 p-4 relative">
|
||||||
<CardDescription className="text-center">
|
<div className="relative w-full h-full overflow-hidden rounded-2xl bg-black">
|
||||||
Yeni bir hesap oluşturun
|
<Image
|
||||||
</CardDescription>
|
src="/images/1830857_Image.png"
|
||||||
</CardHeader>
|
alt="MindSpace Background"
|
||||||
<CardContent>
|
fill
|
||||||
<form>
|
className="object-cover opacity-60"
|
||||||
|
priority
|
||||||
|
/>
|
||||||
|
<div className="absolute inset-0 bg-gradient-to-t from-background via-transparent to-background/30 opacity-90" />
|
||||||
|
{/* Logo */}
|
||||||
|
<div className="absolute inset-0 flex items-center justify-center pointer-events-none z-10">
|
||||||
|
<div className="relative w-64 h-64 drop-shadow-2xl">
|
||||||
|
<Image
|
||||||
|
src="/logo/logo.png"
|
||||||
|
alt="MindSpace Logo"
|
||||||
|
fill
|
||||||
|
className="object-contain"
|
||||||
|
priority
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Sağ Taraf - Form Alanı */}
|
||||||
|
<div className="flex flex-1 items-center justify-center p-8 w-full lg:w-1/2">
|
||||||
|
<div className="w-full max-w-sm space-y-8">
|
||||||
|
<div className="text-center lg:text-left">
|
||||||
|
<h1 className="text-3xl font-bold tracking-tight text-foreground">Aramıza Katılın</h1>
|
||||||
|
<p className="text-sm text-muted-foreground mt-2">
|
||||||
|
Kişisel yaşam alanınızı oluşturmak için kayıt olun
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form className="space-y-6">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor="email">E-posta</Label>
|
<Label htmlFor="email">E-posta</Label>
|
||||||
<Input id="email" name="email" type="email" placeholder="ornek@mail.com" required />
|
<Input
|
||||||
|
id="email"
|
||||||
|
name="email"
|
||||||
|
type="email"
|
||||||
|
placeholder="ornek@mail.com"
|
||||||
|
required
|
||||||
|
className="h-11 bg-input-bg border-border"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor="password">Şifre</Label>
|
<Label htmlFor="password">Şifre</Label>
|
||||||
<Input id="password" name="password" type="password" required />
|
<Input
|
||||||
|
id="password"
|
||||||
|
name="password"
|
||||||
|
type="password"
|
||||||
|
required
|
||||||
|
className="h-11 bg-input-bg border-border"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col space-y-4 mt-6">
|
|
||||||
<Button formAction={signup} className="w-full">
|
<Button formAction={signup} className="w-full h-11 text-base font-medium shadow-md transition-transform active:scale-[0.98] bg-primary hover:bg-primary-hover text-primary-foreground">
|
||||||
Kayıt Ol
|
Kayıt Ol
|
||||||
</Button>
|
</Button>
|
||||||
<div className="text-center text-sm">
|
</form>
|
||||||
|
|
||||||
|
<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-background px-2 text-muted-foreground">
|
||||||
|
veya
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Button type="button" variant="outline" className="w-full h-11 text-base font-medium bg-card border-border hover:bg-secondary transition-colors">
|
||||||
|
<Icon icon="flat-color-icons:google" className="w-5 h-5 mr-2" />
|
||||||
|
Google ile Devam Et
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<div className="text-center text-sm mt-6">
|
||||||
Zaten hesabınız var mı?{' '}
|
Zaten hesabınız var mı?{' '}
|
||||||
<Link href="/login" className="text-primary hover:underline">
|
<Link href="/login" className="font-medium text-primary hover:text-primary-hover transition-colors">
|
||||||
Giriş Yap
|
Giriş Yap
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</div>
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import { Icon as IconifyIcon } from '@iconify/react';
|
||||||
|
|
||||||
|
export function Icon({ icon, className }: { icon: string; className?: string }) {
|
||||||
|
return <IconifyIcon icon={icon} className={className} />;
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@base-ui/react": "^1.4.1",
|
"@base-ui/react": "^1.4.1",
|
||||||
"@hookform/resolvers": "^5.2.2",
|
"@hookform/resolvers": "^5.2.2",
|
||||||
|
"@iconify/react": "^6.0.2",
|
||||||
"@radix-ui/react-alert-dialog": "^1.1.15",
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|
||||||
"@radix-ui/react-checkbox": "^1.3.3",
|
"@radix-ui/react-checkbox": "^1.3.3",
|
||||||
"@radix-ui/react-dialog": "^1.1.15",
|
"@radix-ui/react-dialog": "^1.1.15",
|
||||||
|
|||||||
Generated
+18
@@ -14,6 +14,9 @@ importers:
|
|||||||
'@hookform/resolvers':
|
'@hookform/resolvers':
|
||||||
specifier: ^5.2.2
|
specifier: ^5.2.2
|
||||||
version: 5.2.2(react-hook-form@7.75.0(react@19.2.6))
|
version: 5.2.2(react-hook-form@7.75.0(react@19.2.6))
|
||||||
|
'@iconify/react':
|
||||||
|
specifier: ^6.0.2
|
||||||
|
version: 6.0.2(react@19.2.6)
|
||||||
'@radix-ui/react-alert-dialog':
|
'@radix-ui/react-alert-dialog':
|
||||||
specifier: ^1.1.15
|
specifier: ^1.1.15
|
||||||
version: 1.1.15(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)
|
version: 1.1.15(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)
|
||||||
@@ -402,6 +405,14 @@ packages:
|
|||||||
resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==}
|
resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==}
|
||||||
engines: {node: '>=18.18'}
|
engines: {node: '>=18.18'}
|
||||||
|
|
||||||
|
'@iconify/react@6.0.2':
|
||||||
|
resolution: {integrity: sha512-SMmC2sactfpJD427WJEDN6PMyznTFMhByK9yLW0gOTtnjzzbsi/Ke/XqsumsavFPwNiXs8jSiYeZTmLCLwO+Fg==}
|
||||||
|
peerDependencies:
|
||||||
|
react: '>=16'
|
||||||
|
|
||||||
|
'@iconify/types@2.0.0':
|
||||||
|
resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==}
|
||||||
|
|
||||||
'@img/colour@1.1.0':
|
'@img/colour@1.1.0':
|
||||||
resolution: {integrity: sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==}
|
resolution: {integrity: sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==}
|
||||||
engines: {node: '>=18'}
|
engines: {node: '>=18'}
|
||||||
@@ -4380,6 +4391,13 @@ snapshots:
|
|||||||
|
|
||||||
'@humanwhocodes/retry@0.4.3': {}
|
'@humanwhocodes/retry@0.4.3': {}
|
||||||
|
|
||||||
|
'@iconify/react@6.0.2(react@19.2.6)':
|
||||||
|
dependencies:
|
||||||
|
'@iconify/types': 2.0.0
|
||||||
|
react: 19.2.6
|
||||||
|
|
||||||
|
'@iconify/types@2.0.0': {}
|
||||||
|
|
||||||
'@img/colour@1.1.0':
|
'@img/colour@1.1.0':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user