-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: layout main no padding 예외 추가 * chore: nivo 차트 패키지 설치 * style: lint 미적용 파일들 lint 적용 * design: noPadding style 하단 패딩 추가 * feat: PieChart 컴포넌트 구현 (shared) * feat: 유저 프로필 ui 컴포넌트 구현 * feat: 유저 페이지 컨텐츠 탭 메뉴 ui 구현 + 뷰 로직 * feat: 유저 컨텐츠 섹션 ui 구현 * feat: 유저 페이지 ui 구현 & 라우터 설정
- Loading branch information
Showing
22 changed files
with
759 additions
and
16 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
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 @@ | ||
export * from './ui'; |
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,92 @@ | ||
.userProfileWrapper { | ||
display: flex; | ||
flex-direction: column; | ||
row-gap: 1rem; | ||
align-items: center; | ||
width: 100%; | ||
padding: 0 2rem; | ||
color: $primary-color; | ||
border-radius: 1rem; | ||
|
||
& .profileImage { | ||
width: 16rem; | ||
height: 16rem; | ||
overflow: hidden; | ||
border-radius: 1rem; | ||
box-shadow: 0 0 4px 1px rgba(54, 54, 54, 10%); | ||
|
||
& > img { | ||
width: 100%; | ||
height: 100%; | ||
} | ||
} | ||
|
||
& .userInfo { | ||
display: flex; | ||
flex-direction: column; | ||
row-gap: 0.25rem; | ||
width: 100%; | ||
|
||
& .infoHeader { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
width: 100%; | ||
|
||
& > strong { | ||
font-size: 1.5rem; | ||
font-weight: 600; | ||
} | ||
} | ||
|
||
& .portfolioLink { | ||
color: $third-color; | ||
text-decoration: underline; | ||
word-break: break-all; | ||
|
||
&:hover { | ||
color: $active-color; | ||
cursor: pointer; | ||
} | ||
} | ||
|
||
& .jobInfos { | ||
display: flex; | ||
column-gap: 0.5rem; | ||
font-weight: 500; | ||
|
||
& > span:last-of-type { | ||
font-weight: 600; | ||
} | ||
} | ||
|
||
& .introInfoWrapper { | ||
padding-top: 1rem; | ||
|
||
& > .infoTitle { | ||
font-weight: 600; | ||
} | ||
} | ||
|
||
& .userLinks { | ||
display: flex; | ||
column-gap: 0.5rem; | ||
align-items: center; | ||
width: 100%; | ||
padding-top: 1rem; | ||
|
||
& .userLink { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
width: 2rem; | ||
height: 2rem; | ||
font-size: 0.875rem; | ||
color: $secondary-color; | ||
cursor: pointer; | ||
background-color: $primary-color; | ||
border-radius: 0.5rem; | ||
} | ||
} | ||
} | ||
} |
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 @@ | ||
import { faGear, faLink } from '@fortawesome/free-solid-svg-icons'; | ||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; | ||
|
||
import styles from './UserProfileInfo.module.scss'; | ||
|
||
export const UserProfileInfo = () => { | ||
return ( | ||
<div className={styles.userProfileWrapper}> | ||
<div className={styles.profileImage}> | ||
<img | ||
alt='profile-image' | ||
src='https://api.surfit.io/v1/directory/avatar/350599784?t=1732628475' | ||
/> | ||
</div> | ||
<div className={styles.userInfo}> | ||
<div className={styles.infoHeader}> | ||
<strong>채승규</strong> | ||
<FontAwesomeIcon icon={faGear} /> | ||
</div> | ||
<div className={styles.jobInfos}> | ||
<span>프론트엔드 개발자</span> | ||
<span>@Naver</span> | ||
</div> | ||
<a className={styles.portfolioLink}>https://notefolio.net/nomonomonomonomonomonomo</a> | ||
<div className={styles.introInfoWrapper}> | ||
<span className={styles.infoTitle}>소개</span> | ||
<p> | ||
디자인이 정말 좋아서 하고 있는 9년차 UIUX 독립 디자이너의 노모노모 디자인 | ||
스튜디오입니다. UIUX 디자인을 기반으로 활동하지만, 다양한 디자인 분야를 끊임없이 | ||
탐구하고 연구하고 있습니다. | ||
</p> | ||
</div> | ||
|
||
<div className={styles.userLinks}> | ||
<a className={styles.userLink}> | ||
<FontAwesomeIcon icon={faLink} /> | ||
</a> | ||
<a className={styles.userLink}> | ||
<FontAwesomeIcon icon={faLink} /> | ||
</a> | ||
</div> | ||
</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 * from './UserProfileInfo'; |
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 @@ | ||
$colors: ( | ||
'red': $red, | ||
'yellow': $yellow, | ||
'green': $green, | ||
'blue': $blue, | ||
'purple': $purple, | ||
'default': $third-color, | ||
); | ||
|
||
@each $name, $value in $colors { | ||
.#{$name} { | ||
background-color: $value; | ||
} | ||
} | ||
|
||
.container { | ||
width: 100%; | ||
} | ||
|
||
.userBanner { | ||
width: 100%; | ||
height: 20rem; | ||
} | ||
|
||
.userProfileContainer { | ||
position: relative; | ||
width: 20rem; | ||
min-width: 20rem; | ||
|
||
& > div { | ||
position: absolute; | ||
top: 0; | ||
transform: translateY(-8rem); | ||
} | ||
} | ||
|
||
.userSectionWrapper { | ||
display: flex; | ||
column-gap: 4rem; | ||
width: 100%; | ||
padding: 0 4rem; | ||
|
||
// border: 1px solid blue; | ||
} |
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 cn from 'classnames'; | ||
|
||
import styles from './UserPage.module.scss'; | ||
|
||
import { UserProfileInfo } from '@/features/user'; | ||
import { UserContents } from '@/widgets'; | ||
|
||
export const UserPage = () => { | ||
return ( | ||
<div className={styles.container}> | ||
{/** 배너 컴포넌트 분리 예정 */} | ||
<div className={cn(styles.userBanner, styles['green'])}></div> | ||
<div className={styles.userSectionWrapper}> | ||
<div className={styles.userProfileContainer}> | ||
<UserProfileInfo /> | ||
</div> | ||
<UserContents /> | ||
</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
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,57 @@ | ||
import { ResponsivePie } from '@nivo/pie'; | ||
|
||
interface dataType { | ||
id: string; | ||
label: string; | ||
value: number; | ||
color: string; | ||
} | ||
|
||
interface Props { | ||
data: dataType[]; | ||
} | ||
|
||
export const PieChart = ({ data /* see data tab */ }: Props) => ( | ||
<div style={{ width: '100%', height: '400px' }}> | ||
<ResponsivePie | ||
activeOuterRadiusOffset={8} | ||
arcLabelsSkipAngle={10} | ||
arcLabelsTextColor={{ | ||
from: 'color', | ||
modifiers: [['darker', 2.5]], | ||
}} | ||
arcLinkLabelsColor={{ from: 'color' }} | ||
colors={({ data }) => data.color as string} | ||
cornerRadius={3} | ||
data={data} | ||
enableArcLinkLabels={false} | ||
innerRadius={0.5} | ||
legends={[ | ||
{ | ||
anchor: 'bottom', | ||
direction: 'row', | ||
justify: false, | ||
translateX: 0, | ||
translateY: 56, | ||
itemsSpacing: 0, | ||
itemWidth: 100, | ||
itemHeight: 18, | ||
itemTextColor: '#333533', | ||
itemDirection: 'left-to-right', | ||
itemOpacity: 1, | ||
symbolSize: 18, | ||
symbolShape: 'circle', | ||
}, | ||
]} | ||
margin={{ top: 40, right: 80, bottom: 80, left: 80 }} | ||
padAngle={0.7} | ||
theme={{ | ||
tooltip: { | ||
container: { | ||
color: '#333533', | ||
}, | ||
}, | ||
}} | ||
/> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.noPadding { | ||
padding: 0 0 $header-height; | ||
} |
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 |
---|---|---|
|
@@ -12,3 +12,5 @@ export const NAV_LINKS = [ | |
title: '게더링', | ||
}, | ||
]; | ||
|
||
export const NO_PAD_ROUTES: readonly string[] = ['/user']; |
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
Oops, something went wrong.
456ebad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚡ Lighthouse report for http://localhost:3000/
Detailed Metrics