2026-02-03 10:51:22 +09:00
|
|
|
import FormMessage from "@/components/form-message";
|
|
|
|
|
import {
|
|
|
|
|
Card,
|
|
|
|
|
CardContent,
|
|
|
|
|
CardDescription,
|
|
|
|
|
CardHeader,
|
|
|
|
|
CardTitle,
|
|
|
|
|
} from "@/components/ui/card";
|
2026-02-04 09:35:42 +09:00
|
|
|
import LoginForm from "@/features/auth/components/login-form";
|
2026-02-03 10:51:22 +09:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* [로그인 페이지 컴포넌트]
|
|
|
|
|
*
|
|
|
|
|
* Modern UI with glassmorphism effect (유리 형태 디자인)
|
|
|
|
|
* - 투명 배경 + 블러 효과로 깊이감 표현
|
|
|
|
|
* - 그라디언트 배경으로 생동감 추가
|
|
|
|
|
* - shadcn/ui 컴포넌트로 일관된 디자인 시스템 유지
|
|
|
|
|
*
|
|
|
|
|
* @param searchParams - URL 쿼리 파라미터 (에러 메시지 전달용)
|
|
|
|
|
*/
|
|
|
|
|
export default async function LoginPage({
|
|
|
|
|
searchParams,
|
|
|
|
|
}: {
|
|
|
|
|
searchParams: Promise<{ message: string }>;
|
|
|
|
|
}) {
|
|
|
|
|
// URL에서 메시지 파라미터 추출 (로그인 실패 시 에러 메시지 표시)
|
|
|
|
|
const { message } = await searchParams;
|
|
|
|
|
|
|
|
|
|
return (
|
2026-02-05 15:39:44 +09:00
|
|
|
<div className="relative flex min-h-screen items-center justify-center overflow-hidden bg-linear-to-br from-gray-50 via-white to-gray-100 px-4 py-12 dark:from-black dark:via-gray-950 dark:to-gray-900">
|
2026-02-03 10:51:22 +09:00
|
|
|
{/* ========== 배경 그라디언트 레이어 ========== */}
|
|
|
|
|
{/* 웹 페이지 전체 배경을 그라디언트로 채웁니다 */}
|
2026-02-03 15:44:55 +09:00
|
|
|
{/* 라이트 모드: 부드러운 그레이 톤 (gray → white → gray) */}
|
|
|
|
|
{/* 다크 모드: 깊은 블랙 톤으로 고급스러운 느낌 */}
|
2026-02-03 10:51:22 +09:00
|
|
|
|
|
|
|
|
{/* 추가 그라디언트 효과 1: 우상단에서 시작하는 원형 그라디언트 */}
|
2026-02-05 15:39:44 +09:00
|
|
|
<div className="absolute inset-0 bg-[radial-gradient(ellipse_at_top_right,var(--tw-gradient-stops))] from-gray-200/30 via-gray-100/15 to-transparent dark:from-gray-800/30 dark:via-gray-900/20" />
|
2026-02-03 10:51:22 +09:00
|
|
|
|
|
|
|
|
{/* 추가 그라디언트 효과 2: 좌하단에서 시작하는 원형 그라디언트 */}
|
2026-02-05 15:39:44 +09:00
|
|
|
<div className="absolute inset-0 bg-[radial-gradient(ellipse_at_bottom_left,var(--tw-gradient-stops))] from-gray-300/30 via-gray-200/15 to-transparent dark:from-gray-700/30 dark:via-gray-800/20" />
|
2026-02-03 10:51:22 +09:00
|
|
|
|
|
|
|
|
{/* ========== 애니메이션 블러 효과 ========== */}
|
|
|
|
|
{/* 부드럽게 깜빡이는 원형 블러로 생동감 표현 */}
|
|
|
|
|
{/* animate-pulse: 1.5초 주기로 opacity 변화 */}
|
2026-02-03 15:44:55 +09:00
|
|
|
<div className="absolute left-1/4 top-1/4 h-64 w-64 animate-pulse rounded-full bg-gray-300/20 blur-3xl dark:bg-gray-700/20" />
|
2026-02-03 10:51:22 +09:00
|
|
|
{/* delay-700: 700ms 지연으로 교차 애니메이션 효과 */}
|
2026-02-03 15:44:55 +09:00
|
|
|
<div className="absolute bottom-1/4 right-1/4 h-64 w-64 animate-pulse rounded-full bg-gray-400/20 blur-3xl delay-700 dark:bg-gray-600/20" />
|
2026-02-03 10:51:22 +09:00
|
|
|
|
|
|
|
|
{/* ========== 메인 콘텐츠 영역 ========== */}
|
|
|
|
|
{/* z-10: 배경보다 위에 표시 */}
|
|
|
|
|
{/* animate-in: 페이지 로드 시 fade-in + slide-up 애니메이션 */}
|
|
|
|
|
<div className="relative z-10 w-full max-w-md animate-in fade-in slide-in-from-bottom-4 duration-700">
|
|
|
|
|
{/* 에러/성공 메시지 표시 영역 */}
|
|
|
|
|
{/* URL 파라미터에 message가 있으면 표시됨 */}
|
|
|
|
|
<FormMessage message={message} />
|
|
|
|
|
|
|
|
|
|
{/* ========== 로그인 카드 (Glassmorphism) ========== */}
|
|
|
|
|
{/* bg-white/70: 70% 투명도의 흰색 배경 */}
|
|
|
|
|
{/* backdrop-blur-xl: 배경 블러 효과 (유리 느낌) */}
|
|
|
|
|
<Card className="border-white/20 bg-white/70 shadow-2xl backdrop-blur-xl dark:border-white/10 dark:bg-gray-900/70">
|
|
|
|
|
{/* ========== 카드 헤더 영역 ========== */}
|
|
|
|
|
<CardHeader className="space-y-3 text-center">
|
|
|
|
|
{/* 아이콘 배경: 그라디언트 원형 */}
|
2026-02-05 15:39:44 +09:00
|
|
|
<div className="mx-auto mb-2 flex h-16 w-16 items-center justify-center rounded-2xl bg-linear-to-br from-gray-800 to-black shadow-lg dark:from-white dark:to-gray-200">
|
2026-02-03 10:51:22 +09:00
|
|
|
<span className="text-4xl">👋</span>
|
|
|
|
|
</div>
|
|
|
|
|
{/* 페이지 제목 */}
|
|
|
|
|
<CardTitle className="text-3xl font-bold tracking-tight">
|
|
|
|
|
환영합니다!
|
|
|
|
|
</CardTitle>
|
|
|
|
|
{/* 페이지 설명 */}
|
|
|
|
|
<CardDescription className="text-base">
|
|
|
|
|
서비스 이용을 위해 로그인해 주세요.
|
|
|
|
|
</CardDescription>
|
|
|
|
|
</CardHeader>
|
|
|
|
|
|
|
|
|
|
{/* ========== 카드 콘텐츠 영역 (폼) ========== */}
|
2026-02-04 09:35:42 +09:00
|
|
|
<CardContent>
|
|
|
|
|
<LoginForm />
|
2026-02-03 10:51:22 +09:00
|
|
|
</CardContent>
|
|
|
|
|
</Card>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|