-
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.
* feat(detail): detail페이지 틀 생성 * feat(mbti): 궁합 작성 * feat: mbti 상세 카드 퍼블리싱 (#8) * fix(app/page): detail to login * fix(detail): key 추가 및 100vh 되돌림 * 데스크톱 이슈로 되돌려놓음 --------- Co-authored-by: SeoYoung Bae <[email protected]>
- Loading branch information
Showing
15 changed files
with
468 additions
and
7 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 |
---|---|---|
|
@@ -34,3 +34,5 @@ yarn-error.log* | |
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
.env |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,33 @@ | ||
.detail { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
height: 100%; | ||
overflow-y: auto; | ||
padding: 3rem 1rem; | ||
gap: 1.5rem; | ||
|
||
&__title { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
text-align: center; | ||
font-size: 1.25rem; | ||
line-height: 1.5; | ||
margin-bottom: 1.5rem; | ||
} | ||
|
||
&__mbti { | ||
font-size: 6rem; | ||
color: #13c299; | ||
line-height: 1.2; | ||
} | ||
} | ||
|
||
.detailButton { | ||
background-color: transparent; | ||
} | ||
|
||
.detailButton:hover { | ||
background-color: transparent; | ||
} |
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 { Potta_One, Poor_Story } from 'next/font/google'; | ||
import cx from 'classnames'; | ||
import useUserStore from '@/stores/user'; | ||
import styles from './detail.module.scss'; | ||
import Button from '@/components/Button'; | ||
import { useState } from 'react'; | ||
import MBTICards from '@/components/MBTICards'; | ||
|
||
const pottaOne = Potta_One({ weight: '400', subsets: ['latin'] }); | ||
const poorStory = Poor_Story({ weight: '400', subsets: ['latin'] }); | ||
|
||
export default function Page() { | ||
const { userId, mbti } = useUserStore(); | ||
const [isOpen, setIsOpen] = useState(false); | ||
const [activeIndex, setActiveIndex] = useState(0); | ||
|
||
// MOCK_DATA | ||
const items = [ | ||
{ | ||
MBTI: 'E', | ||
description: ['Star 수 총 0000개', '팔로잉 / 팔로워 총 00000명'], | ||
subDescription: [ | ||
{ title: '팔로잉/팔로워', contents: '50명 ⬆' }, | ||
{ title: '작성률', contents: '30개 ⬆' }, | ||
], | ||
}, | ||
{ | ||
MBTI: 'N', | ||
description: ['Star 수 총 0000개', '팔로잉 / 팔로워 총 00000명'], | ||
subDescription: [ | ||
{ title: '팔로잉/팔로워', contents: '50명 ⬆' }, | ||
{ title: '작성률', contents: '30개 ⬆' }, | ||
], | ||
}, | ||
{ | ||
MBTI: 'F', | ||
description: ['Star 수 총 0000개', '팔로잉 / 팔로워 총 00000명'], | ||
subDescription: [ | ||
{ title: '팔로잉/팔로워', contents: '50명 ⬆' }, | ||
{ title: '작성률', contents: '30개 ⬆' }, | ||
], | ||
}, | ||
{ | ||
MBTI: 'P', | ||
description: ['Star 수 총 0000개', '팔로잉 / 팔로워 총 00000명'], | ||
subDescription: [ | ||
{ title: '팔로잉/팔로워', contents: '50명 ⬆' }, | ||
{ title: '작성률', contents: '30개 ⬆' }, | ||
], | ||
}, | ||
]; | ||
|
||
return ( | ||
<div className={styles.detail}> | ||
<div className={styles.detail__title}> | ||
<p> | ||
{userId}님의 | ||
<br /> | ||
COMMIT 엠비티아이 | ||
</p> | ||
<p className={cx(styles.detail__mbti, pottaOne.className)}>{mbti}</p> | ||
</div> | ||
{!isOpen ? ( | ||
<Button className={styles.detailButton} onClick={() => setIsOpen(true)}> | ||
<p className={poorStory.className}>더 자세히 살펴보기</p> | ||
</Button> | ||
) : ( | ||
<MBTICards slides={items} /> | ||
)} | ||
</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,9 @@ | ||
.Card { | ||
width: 100%; | ||
height: 100%; | ||
background-color: #1e2228; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
border-radius: 1rem; | ||
} |
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,14 @@ | ||
import cx from 'classnames'; | ||
import styles from './Card.module.scss'; | ||
import { PropsWithChildren } from 'react'; | ||
|
||
interface Props { | ||
className?: string; | ||
} | ||
|
||
export default function Card({ | ||
className, | ||
children, | ||
}: PropsWithChildren<Props>) { | ||
return <div className={cx(styles.Card, className)}>{children}</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,3 @@ | ||
import Card from './Card'; | ||
|
||
export default Card; |
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,80 @@ | ||
.embla { | ||
overflow-x: hidden; | ||
width: 100%; | ||
height: 17rem; | ||
} | ||
.embla__container { | ||
display: flex; | ||
} | ||
.embla__slide { | ||
flex: 0 0 100%; | ||
//min-width: 0; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
|
||
.card { | ||
font-family: 'Pretendard Variable', Pretendard; | ||
} | ||
|
||
.topFrame { | ||
padding: 1.5rem 0; | ||
display: flex; | ||
gap: 3rem; | ||
justify-content: center; | ||
align-items: center; | ||
> p { | ||
color: #13c299; | ||
font-size: 3.75rem; | ||
font-weight: 700; | ||
} | ||
> ul { | ||
line-height: 180%; | ||
} | ||
} | ||
|
||
.bottomFrame { | ||
padding: 1rem; | ||
display: flex; | ||
gap: 2rem; | ||
> div { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
gap: 1.5rem; | ||
} | ||
h4 { | ||
color: #8fa6c7; | ||
font-weight: 400; | ||
} | ||
p { | ||
color: #13c299; | ||
font-size: 2rem; | ||
font-weight: 700; | ||
} | ||
} | ||
|
||
.divider { | ||
width: 1px; | ||
border-right: 2px solid #536174; | ||
height: 6rem; | ||
} | ||
|
||
.embla__dots { | ||
margin-top: 1rem; | ||
display: flex; | ||
justify-content: center; | ||
gap: 0.5rem; | ||
} | ||
|
||
.embla__dot { | ||
width: 0.375rem; | ||
height: 0.375rem; | ||
border-radius: 50%; | ||
background-color: #2b313a; | ||
border: none; | ||
|
||
&--selected { | ||
background-color: #13c299; | ||
} | ||
} |
Oops, something went wrong.