-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from InQ-InQ-InQ-InQ-InQ/feature-5
[FEAT] : 로그인, 회원가입 UI 구현
- Loading branch information
Showing
19 changed files
with
224 additions
and
9 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { JoinLayout } from "@/widgets/join/ui"; | ||
import React from "react"; | ||
|
||
export default function page() { | ||
return ( | ||
<div | ||
className="flex h-screen w-screen items-center justify-center bg-cover bg-center" | ||
style={{ backgroundImage: 'url("/images/scenery.png")' }} | ||
> | ||
<JoinLayout /> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { LoginLayout } from "@/widgets/login/ui"; | ||
import React from "react"; | ||
|
||
export default function page() { | ||
return ( | ||
<div | ||
className="flex h-screen w-screen items-center justify-center bg-cover bg-center" | ||
style={{ backgroundImage: 'url("/images/scenery.png")' }} | ||
> | ||
<LoginLayout /> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { ComponentProps } from "react"; | ||
import { cn } from "../utils"; | ||
|
||
interface ButtonProps extends ComponentProps<"button"> { | ||
name: string; | ||
className?: string; | ||
} | ||
|
||
export default function Button({ name, className, ...props }: ButtonProps) { | ||
return ( | ||
<button | ||
className={cn( | ||
"hover:bg-sub z-10 w-fit cursor-pointer rounded-lg border bg-white p-2 px-4 transition duration-300 ease-in-out hover:text-white focus:outline-hidden", | ||
className, | ||
)} | ||
{...props} | ||
> | ||
{name} | ||
</button> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import Image from "next/image"; | ||
import React from "react"; | ||
|
||
export default function LoginJoinContainer({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
return ( | ||
<div className="relative flex w-[80%] flex-col justify-center gap-4 rounded-lg bg-white/60 shadow-lg backdrop-blur-md xl:w-[45%]"> | ||
<div className="z-10 flex flex-col gap-y-2 px-12 py-24 md:px-24"> | ||
{children} | ||
</div> | ||
<Image | ||
width="300" | ||
height="300" | ||
src="/images/spotshare-deco.png" | ||
alt="deco" | ||
className="absolute bottom-0 z-0 rounded-b-lg" | ||
/> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import Link from "next/link"; | ||
import React from "react"; | ||
|
||
export default function LoginJoinHeader({ name }: { name: string }) { | ||
return ( | ||
<div className="mb-2 flex w-full justify-between"> | ||
<span className="text-2xl font-bold">{name}</span> | ||
<Link href="/" className="prompt-extrabold text-3xl"> | ||
SpotShare | ||
</Link> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from "react"; | ||
|
||
export default function TextField() { | ||
return ( | ||
<input className="focus:border-sub h-10 w-full rounded-lg border bg-white/80 p-3 transition delay-100 ease-in-out focus:outline-hidden" /> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
export { default as ProfileButton } from "./ProfileButton"; | ||
export { default as ProfileModal } from "./ProfileModal"; | ||
export { default as TextField } from "./TextField"; | ||
export { default as Button } from "./Button"; | ||
export { default as LoginJoinHeader } from "./LoginJoinHeader"; | ||
export { default as LoginJoinContainer } from "./LoginJoinContainer"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { | ||
Button, | ||
LoginJoinContainer, | ||
LoginJoinHeader, | ||
TextField, | ||
} from "@/shared/ui"; | ||
import React from "react"; | ||
|
||
export default function JoinLayout() { | ||
return ( | ||
<LoginJoinContainer> | ||
<LoginJoinHeader name="회원가입" /> | ||
<div className="flex flex-col gap-y-4"> | ||
<FormUnit name="닉네임" /> | ||
<FormUnit name="아이디" /> | ||
<FormUnit name="비밀번호" repeatCheck={false} /> | ||
</div> | ||
<Button | ||
name="회원가입 하기" | ||
className="mt-6 w-full bg-black text-white" | ||
/> | ||
</LoginJoinContainer> | ||
); | ||
} | ||
|
||
interface FormUnitProps { | ||
name: string; | ||
repeatCheck?: boolean; | ||
} | ||
|
||
function FormUnit({ name, repeatCheck = true }: FormUnitProps) { | ||
return ( | ||
<div className="flex w-full flex-col gap-y-1"> | ||
<label className="text-md">{name}</label> | ||
<div className="flex gap-x-1"> | ||
<TextField /> | ||
{repeatCheck && ( | ||
<Button name="중복확인" className="w-fit text-sm text-nowrap" /> | ||
)} | ||
<Button name="완료" className="w-fit text-sm text-nowrap" /> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as JoinLayout } from "./JoinLayout"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { | ||
Button, | ||
LoginJoinContainer, | ||
LoginJoinHeader, | ||
TextField, | ||
} from "@/shared/ui"; | ||
import Link from "next/link"; | ||
|
||
export default function LoginLayout() { | ||
return ( | ||
<LoginJoinContainer> | ||
<LoginJoinHeader name="로그인" /> | ||
<LoginUnit name="아이디" /> | ||
<LoginUnit name="비밀번호" /> | ||
<LoginFooter /> | ||
</LoginJoinContainer> | ||
); | ||
} | ||
|
||
interface LoginUnitProps { | ||
name: string; | ||
} | ||
|
||
function LoginUnit({ name }: LoginUnitProps) { | ||
return ( | ||
<div className="flex w-full flex-col gap-y-1"> | ||
<label className="text-md">{name}</label> | ||
<div className="flex gap-x-1"> | ||
<TextField /> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
function LoginFooter() { | ||
return ( | ||
<div className="mt-2 flex w-full items-center justify-between"> | ||
<div className="flex w-[55%] justify-between"> | ||
<Link href="/join"> | ||
<span className="text-md cursor-pointer hover:text-black/50"> | ||
회원가입 | ||
</span> | ||
</Link> | ||
<span className="text-md hidden md:block">|</span> | ||
<button className="l text-md hidden cursor-pointer hover:text-black/50 md:block"> | ||
비밀번호를 잊어버렸어요! | ||
</button> | ||
</div> | ||
<Button name="로그인" /> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as LoginLayout } from "./LoginLayout"; |