Skip to content

Commit a56cf4d

Browse files
refactor: update AuthLayout to use grid layout and simplify LoginPage structure
1 parent 6108b17 commit a56cf4d

File tree

4 files changed

+28
-41
lines changed

4 files changed

+28
-41
lines changed

src/components/layout/auth-layout.tsx

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import { Outlet } from "react-router";
22

33
const AuthLayout = () => {
44
return (
5-
<div className="min-h-screen flex theme-transition">
5+
<div className="min-h-screen grid grid-cols-1 md:grid-cols-2 theme-transition">
66
{/* Left side - Branding */}
7-
<div className="flex-1 bg-gradient-to-br from-background via-card to-background dark:from-background dark:via-muted dark:to-card flex items-center justify-center p-8 relative overflow-hidden">
7+
<div className="bg-gradient-to-br from-background via-card to-background dark:from-background dark:via-muted dark:to-card flex items-center justify-center p-8 relative overflow-hidden">
88
{/* Background decoration */}
99
<div className="absolute inset-0 opacity-10 dark:opacity-20">
1010
<div className="absolute top-20 left-20 w-32 h-32 bg-primary rounded-full blur-3xl"></div>
@@ -111,22 +111,8 @@ const AuthLayout = () => {
111111
</div>
112112
</div>
113113

114-
{/* Right side - Form/Outlet */}
115-
<div className="flex-1 flex items-center justify-center p-8 bg-gradient-to-br from-background to-muted relative">
116-
{/* Subtle background pattern */}
117-
<div className="absolute inset-0 opacity-[0.02] dark:opacity-[0.05]">
118-
<div
119-
className="absolute inset-0"
120-
style={{
121-
backgroundImage: `radial-gradient(circle at 1px 1px, oklch(var(--foreground)) 1px, transparent 0)`,
122-
backgroundSize: "24px 24px",
123-
}}
124-
></div>
125-
</div>
126-
127-
<div className="w-full max-w-md relative z-10">
128-
<Outlet />
129-
</div>
114+
<div>
115+
<Outlet />
130116
</div>
131117
</div>
132118
);

src/index.css

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -171,31 +171,32 @@
171171
}
172172
}
173173

174-
/* Additional utility classes for theme consistency */
175-
.gradient-primary {
176-
background: var(--gradient-primary);
177-
}
174+
@layer components {
175+
.gradient-primary {
176+
background: var(--gradient-primary);
177+
}
178178

179-
.gradient-secondary {
180-
background: var(--gradient-secondary);
181-
}
179+
.gradient-secondary {
180+
background: var(--gradient-secondary);
181+
}
182182

183-
.hero-bg {
184-
background: var(--hero-bg);
185-
}
183+
.hero-bg {
184+
background: var(--hero-bg);
185+
}
186186

187-
.text-hero-accent {
188-
color: oklch(var(--hero-accent));
189-
}
187+
.text-hero-accent {
188+
color: oklch(var(--hero-accent));
189+
}
190190

191-
.bg-hero-accent {
192-
background-color: oklch(var(--hero-accent));
193-
}
191+
.bg-hero-accent {
192+
background-color: oklch(var(--hero-accent));
193+
}
194194

195-
/* Smooth transitions for theme switching */
196-
.theme-transition {
197-
transition: background-color 0.3s ease, color 0.3s ease,
198-
border-color 0.3s ease;
195+
/* Smooth transitions for theme switching */
196+
.theme-transition {
197+
transition: background-color 0.3s ease, color 0.3s ease,
198+
border-color 0.3s ease;
199+
}
199200
}
200201

201202
/* Custom scrollbar theming */

src/pages/home/home-page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const HomePage = () => {
5252

5353
{/* Main Title with enhanced animation */}
5454
<div className="mb-12">
55-
<div className="text-9xl mb-8 animate-bounce">⚛️</div>
55+
<div className="text-9xl mb-8">⚛️</div>
5656
<div className="space-y-4">
5757
<div className="inline-block px-6 py-2 bg-gradient-to-r from-primary/20 to-secondary/20 rounded-full border border-border mb-4">
5858
<span className="text-primary font-medium text-lg">

src/pages/login/login-page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import { LoginForm } from "./components/login-form";
33

44
export default function LoginPage() {
55
return (
6-
<>
6+
<div className="flex items-center justify-center h-screen bg-secondary">
77
<MetaData />
88
<LoginForm />
9-
</>
9+
</div>
1010
);
1111
}

0 commit comments

Comments
 (0)