-
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.
Browse files
Browse the repository at this point in the history
[#21] λ§μ΄νμ΄μ§, ν¬μ μ§ν νμ΄μ§, κ²°κ³Ό λ‘λ©μ€
- Loading branch information
Showing
19 changed files
with
556 additions
and
9 deletions.
There are no files selected for viewing
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,20 @@ | ||
import S from './form.module.css' | ||
|
||
interface Props { | ||
title: string | ||
subTitle?: string | ||
} | ||
|
||
function FormTitle({ | ||
title, | ||
subTitle = 'ν΄λΉ νλͺ©μ μμΉλ μ΄λ»κ² λλμ?', | ||
}: Props) { | ||
return ( | ||
<div className={S.wrapper}> | ||
<span className={S.title}>{title}</span> | ||
<p className={S.subTitle}>{subTitle}</p> | ||
</div> | ||
) | ||
} | ||
|
||
export default FormTitle |
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,36 @@ | ||
.wrapper { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 2px; | ||
} | ||
|
||
.title { | ||
font-size: 1.2rem; | ||
font-weight: 700; | ||
} | ||
|
||
.subTitle { | ||
font-size: 0.7rem; | ||
font-weight: 300; | ||
margin-bottom: 10px; | ||
} | ||
|
||
.inputWrapper { | ||
display: flex; | ||
align-items: center; | ||
width: 100%; | ||
height: auto; | ||
border-radius: 15px; | ||
padding: 14px 20px; | ||
border: 1px solid #efefef; | ||
} | ||
|
||
.input { | ||
all: unset; | ||
font-size: 0.83rem; | ||
} | ||
|
||
.error { | ||
font-size: 0.67rem; | ||
color: #ff453a; | ||
} |
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 Nav from '@/app/_common/nav' | ||
import Title from '@/app/_common/text/title' | ||
import S from './result.module.css' | ||
|
||
//TODO: μ¬μ©μκ° ν΄λ¦ν μμ΄λμ΄ μ΄λ¦κ³Ό ν΄λΉ ν΄μ μ¬μ©ν μ¬μ©μ μκ° λ³΄μ¬μ§λλ€. | ||
function Result() { | ||
return ( | ||
<div className={S.wrapper}> | ||
<Nav /> | ||
<div> | ||
<Title title="κ²μ¦ κ²°κ³Ό" /> | ||
<div> | ||
<Title title="μμ΄λμ΄ μ΄λ¦" /> | ||
<span>μ 체 μ¬μ©μ 162λͺ </span> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default Result |
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,6 @@ | ||
.wrapper { | ||
display: flex; | ||
flex-direction: column; | ||
padding-bottom: 50px; | ||
padding: 0 18px; | ||
} |
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 @@ | ||
.wrapper { | ||
display: flex; | ||
flex-direction: column; | ||
width: 100%; | ||
} | ||
|
||
.formWrapper { | ||
position: relative; | ||
margin-top: 46px; | ||
min-height: 100vh; | ||
height: 100%; | ||
} | ||
|
||
.paddingWrapper { | ||
padding: 0 18px; | ||
} | ||
|
||
.overflowWrapper { | ||
display: flex; | ||
flex-direction: column; | ||
padding: 0 18px; | ||
overflow: auto; | ||
height: 690px; | ||
width: 100%; | ||
gap: 14px; | ||
} | ||
|
||
.bottomWrapper { | ||
position: absolute; | ||
bottom: 0; | ||
background-color: #fbfbfb; | ||
width: 100%; | ||
height: 150px; | ||
border-top-left-radius: 38px; | ||
border-top-right-radius: 38px; | ||
} | ||
|
||
.submitBtnWrapper { | ||
position: absolute; | ||
right: 16px; | ||
bottom: 50px; | ||
|
||
color: white; | ||
font-weight: 700; | ||
font-size: 1.2rem; | ||
text-align: center; | ||
width: 100px; | ||
height: auto; | ||
padding: 10px 20px; | ||
border-radius: 9px; | ||
background-color: var(--purple-700); | ||
} |
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,73 @@ | ||
'use client' | ||
|
||
import Title from '@/app/_common/text/title' | ||
import { useRouter } from 'next/navigation' | ||
import { useState } from 'react' | ||
import Nav from '../list/_components/nav' | ||
import FormTitle from './_components/form/FormTitle' | ||
import FormS from './_components/form/form.module.css' | ||
import S from './indicators.module.css' | ||
|
||
//* ν¬μ μ§ν μ λ ₯ νμ΄μ§μ λλ€. | ||
//TODO: titleμ μ¬μ©μκ° μ λ ₯νλ μμλ€μ΄ 보μ¬μ§κ² λ©λλ€. | ||
//TODO: recoil μ¬μ© | ||
//? νΌκΈ°λμ΄ νμ ν¬μμ§ν ν΄λ‘ λ³κ²½ μμ | ||
function Indicators() { | ||
const router = useRouter() | ||
const [inputValue, setInputValue] = useState('') | ||
const [error, setError] = useState('') | ||
|
||
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => { | ||
setInputValue(e.target.value) | ||
setError('') | ||
} | ||
|
||
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => { | ||
e.preventDefault() | ||
if (!/^\d+$/.test(inputValue)) { | ||
setError('μ«μλ§ μ λ ₯ κ°λ₯ν©λλ€.') | ||
} else { | ||
router.push('/result') | ||
} | ||
} | ||
|
||
return ( | ||
<> | ||
<Nav /> | ||
<div className={S.wrapper}> | ||
<div className={S.paddingWrapper}> | ||
<Title title="μμ΄λμ΄ μ λͺ©" /> | ||
</div> | ||
<form className={S.formWrapper} onSubmit={handleSubmit}> | ||
<div className={S.overflowWrapper}> | ||
<FormTitle | ||
title="μ 체 μ΄μ©μ μ" | ||
subTitle="μ 체 μ΄μ©μ μλ₯Ό κ°μ§κ³ μ΄ κ²°κ³Ό μ§νκ° κ³μ°λ©λλ€." | ||
/> | ||
|
||
<div className={FormS.inputWrapper}> | ||
<input | ||
className={FormS.input} | ||
placeholder="μμΉλ₯Ό μ λ ₯ν΄ μ£ΌμΈμ." | ||
value={inputValue} | ||
onChange={handleChange} | ||
/> | ||
</div> | ||
|
||
{error && ( | ||
<span className={FormS.error}>μ«μλ§ μ λ ₯ κ°λ₯ν©λλ€.</span> | ||
)} | ||
</div> | ||
|
||
<div className={S.bottomWrapper}> | ||
<button type="submit" className={S.submitBtnWrapper}> | ||
μ μΆνκΈ° | ||
</button> | ||
</div> | ||
</form> | ||
</div> | ||
</> | ||
) | ||
} | ||
|
||
export default Indicators |
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
Empty file.
45 changes: 45 additions & 0 deletions
45
app/(route)/mypage/_components/ideaCard/ideaCard.module.css
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,45 @@ | ||
.wrapper { | ||
width: 100%; | ||
} | ||
|
||
.rowWrapper { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
justify-content: space-between; | ||
} | ||
|
||
.columnWrapper { | ||
display: flex; | ||
flex-direction: column; | ||
background-color: var(--gray-100); | ||
padding: 13px 17px; | ||
border-radius: 11px; | ||
cursor: pointer; | ||
width: 100%; | ||
} | ||
|
||
.ideaTitle { | ||
font-size: 0.98rem; | ||
font-weight: 700; | ||
letter-spacing: 0.03px; | ||
} | ||
|
||
.ideaTool { | ||
font-size: 0.7rem; | ||
} | ||
|
||
.btnWrapper { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
width: 70px; | ||
height: 40px; | ||
font-weight: 500; | ||
font-size: 0.9rem; | ||
color: white; | ||
background-color: var(--purple-700); | ||
border-radius: 9px; | ||
|
||
margin-left: 10px; | ||
} |
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,24 @@ | ||
import Link from 'next/link' | ||
import S from './ideaCard.module.css' | ||
|
||
//TODO: μμ΄λμ΄ λͺ κ³Ό μ¬μ©ν ν΄μ΄ λ€μ΄κ°κ² λ©λλ€. | ||
//TODO: μλ£λ μμ΄λμ΄μΌ κ²½μ° κ²°κ³Ό νμ΄μ§(/result)λ‘ μ΄λν©λλ€. | ||
//TODO: μ§νμ€μΈ μμ΄λμ΄μΌ κ²½μ° ν¬μ μ§ν νμ΄μ§(/indicators)λ‘ μ΄λν©λλ€. | ||
function IdeaCard() { | ||
return ( | ||
<div className={S.wrapper}> | ||
<Link href="/indicators"> | ||
<div className={S.rowWrapper}> | ||
<div className={S.columnWrapper}> | ||
<span className={S.ideaTitle}>μμ΄λμ΄ μ λͺ©</span> | ||
<p className={S.ideaTool}>μμ΄λμ΄ ν΄</p> | ||
</div> | ||
|
||
<div className={S.btnWrapper}>μ΄λ</div> | ||
</div> | ||
</Link> | ||
</div> | ||
) | ||
} | ||
|
||
export default IdeaCard |
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,26 @@ | ||
.wrapper { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
padding: 0 18px; | ||
padding-bottom: 50px; | ||
} | ||
|
||
.sectionTitle { | ||
font-size: 1.3rem; | ||
font-weight: 700; | ||
margin-top: 26px; | ||
} | ||
|
||
.sectionSubTitle { | ||
font-size: 0.86rem; | ||
font-weight: 300; | ||
} | ||
|
||
.ideaCardWrapper { | ||
display: flex; | ||
flex-direction: column; | ||
|
||
gap: 17px; | ||
margin: 12px 0 40px 0; | ||
} |
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,5 +1,31 @@ | ||
import Nav from '@/app/_common/nav' | ||
import Title from '@/app/_common/text/title' | ||
import IdeaCard from './_components/ideaCard' | ||
import S from './mypage.module.css' | ||
|
||
//TODO: μ¬μ©μ λͺ , μμ΄λμ΄ κ²μ¦ μκ° λ€μ΄κ°λλ€. | ||
//TODO: μλ£λ μμ΄λμ΄, μ λ ₯ μ μμ΄λμ΄λ₯Ό λΆλ¬μ΅λλ€.(get) | ||
function Mypage() { | ||
return | ||
return ( | ||
<> | ||
<div className={S.wrapper}> | ||
<Nav /> | ||
<Title title="μμ΄λμ΄" /> | ||
|
||
<span className={S.sectionTitle}>μλ£</span> | ||
<p className={S.sectionSubTitle}>ν¬μ μ§νλ₯Ό μλ£ν μμ΄λμ΄</p> | ||
<div className={S.ideaCardWrapper}> | ||
<IdeaCard /> | ||
</div> | ||
|
||
<span className={S.sectionTitle}>μ λ ₯ μ </span> | ||
<p className={S.sectionSubTitle}>ν¬μ μ§νλ₯Ό μ λ ₯νμ§ μμ μμ΄λμ΄</p> | ||
<div className={S.ideaCardWrapper}> | ||
<IdeaCard /> | ||
</div> | ||
</div> | ||
</> | ||
) | ||
} | ||
|
||
export default Mypage |
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 |
---|---|---|
|
@@ -135,5 +135,5 @@ | |
} | ||
|
||
.wrap:nth-child(3) { | ||
animation-delay: 2mss; | ||
animation-delay: 2s; | ||
} |
Oops, something went wrong.