Skip to content

Commit 86da37f

Browse files
authored
Merge pull request #370 from depromeet/develop
배포용 pr
2 parents a372806 + 4c89757 commit 86da37f

36 files changed

+659
-60
lines changed
134 KB
Loading
210 KB
Loading
324 KB
Loading
324 KB
Loading
491 KB
Loading
524 KB
Loading

public/assets/character-by-level/locked/1.svg

+14
Loading

public/assets/character-by-level/locked/2.svg

+14
Loading

public/assets/character-by-level/locked/3.svg

+14
Loading

public/assets/character-by-level/locked/4.svg

+14
Loading

public/assets/character-by-level/locked/5.svg

+14
Loading

public/assets/character-by-level/locked/6.svg

+14
Loading
Loading
+28
Loading

public/images/login_bg.png

9.19 KB
Loading

src/app/home/FollowSummary.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import LevelProgressBar from '@/app/result/LevelStatus/LevelProgressBar';
21
import Banner from '@/components/Banner/Banner';
32
import Icon from '@/components/Icon';
3+
import LevelProgressBar from '@/components/LevelStatus/LevelProgressBar';
44
import Thumbnail from '@/components/Thumbnail/Thumbnail';
5-
import { gradientTextCss } from '@/constants/style';
5+
import { gradientTextCss } from '@/constants/style/text';
66
import { css, cx } from '@styled-system/css';
77
import { flex } from '@styled-system/patterns';
88

src/app/level/guide/Character.tsx

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
import Image from 'next/image';
2+
import { css, cx } from '@/styled-system/css';
3+
4+
interface Props {
5+
width: number;
6+
height: number;
7+
level: number;
8+
isLocked?: boolean;
9+
isBackground?: boolean;
10+
}
11+
12+
function Character(props: Props) {
13+
return (
14+
<div
15+
key={props.level}
16+
className={cx(
17+
imageWrapperCss,
18+
css({
19+
width: props.width,
20+
height: props.height,
21+
}),
22+
)}
23+
>
24+
{props.isLocked ? (
25+
<>
26+
<Image
27+
src={`/assets/character-by-level/locked/${props.level}.svg`}
28+
alt="locked"
29+
width={props.width}
30+
height={props.height}
31+
className={imageCss}
32+
/>
33+
<Image
34+
src={`/assets/character-by-level/locked/lock.svg`}
35+
alt="locked"
36+
width={180}
37+
height={180}
38+
className={imageCss}
39+
/>
40+
</>
41+
) : (
42+
<>
43+
{props.isBackground && (
44+
<Image
45+
src="/assets/level/level-guide-bg.svg"
46+
alt={'guide bg'}
47+
width={375}
48+
height={382}
49+
className={cx(imageCss, characterImageBgCss)}
50+
/>
51+
)}
52+
<Image
53+
src={`/assets/character-by-level/default/${props.level}.png`}
54+
width={props.width}
55+
height={props.height}
56+
alt="10mm character image"
57+
className={imageCss}
58+
/>
59+
</>
60+
)}
61+
</div>
62+
);
63+
}
64+
65+
export default Character;
66+
67+
const imageWrapperCss = css({
68+
position: 'relative',
69+
margin: '0 auto',
70+
animation: 'fadeIn .7s',
71+
height: '100%',
72+
});
73+
74+
const imageCss = css({
75+
position: 'absolute',
76+
top: 0,
77+
bottom: 0,
78+
left: 0,
79+
right: 0,
80+
margin: 'auto',
81+
animation: 'fadeIn .7s',
82+
});
83+
84+
const characterImageBgCss = css({
85+
left: '50%',
86+
transform: 'translateX(-50%)',
87+
minWidth: '375px',
88+
minHeight: '382px',
89+
});

src/app/level/guide/GrowthLevel.tsx

+135
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
import Character from '@/app/level/guide/Character';
2+
import Icon from '@/components/Icon';
3+
import { LEVEL_SYSTEM, type LevelSystemType } from '@/constants/level';
4+
import { gradientTextCss } from '@/constants/style/text';
5+
import { css, cva } from '@/styled-system/css';
6+
import { center, flex } from '@/styled-system/patterns';
7+
8+
function GrowthLevel({
9+
selectLevel,
10+
maxLevel,
11+
onClick,
12+
}: {
13+
selectLevel: number;
14+
onClick: (level: number) => void;
15+
maxLevel: number;
16+
}) {
17+
return (
18+
<>
19+
<h2 className={headingCss}>성장 레벨</h2>
20+
<div className={containerCss}>
21+
<ul className={listContainerCss}>
22+
{LEVEL_SYSTEM.map((level, idx) => {
23+
const isLocked = maxLevel <= idx;
24+
return (
25+
<GrowthLevelItem
26+
key={level.label}
27+
{...level}
28+
isSelected={selectLevel === level.level}
29+
isLocked={isLocked}
30+
onClick={() => onClick(level.level)}
31+
/>
32+
);
33+
})}
34+
</ul>
35+
</div>
36+
</>
37+
);
38+
}
39+
40+
export default GrowthLevel;
41+
42+
const headingCss = css({
43+
color: 'gray.gray800',
44+
textStyle: 'subtitle2',
45+
padding: '0 16px',
46+
});
47+
48+
const containerCss = css({
49+
overflowY: 'auto',
50+
position: 'relative',
51+
52+
'&::-webkit-scrollbar': {
53+
width: '2px',
54+
},
55+
'&::-webkit-scrollbar-thumb': {
56+
width: '2px',
57+
borderRadius: '5px',
58+
backgroundColor: 'bg.surface3',
59+
},
60+
'&::-webkit-scrollbar-track': {
61+
width: '2px',
62+
},
63+
});
64+
65+
const listContainerCss = flex({
66+
gap: '14px',
67+
padding: '12px 16px',
68+
width: 'fit-content',
69+
});
70+
71+
interface GrowthLevelItemProps extends Pick<LevelSystemType, 'level' | 'min' | 'max' | 'imageUrl' | 'isFinal'> {
72+
isSelected: boolean;
73+
isLocked: boolean;
74+
onClick: () => void;
75+
}
76+
77+
function GrowthLevelItem(props: GrowthLevelItemProps) {
78+
return (
79+
<li className={itemContainerRecipe({ selected: props.isSelected })} onClick={props.onClick}>
80+
<p className={levelLabelCss}>{props.level}</p>
81+
<div className={imageWrapperCss}>
82+
<Character width={76} height={56.8} level={props.level} isLocked={props.isLocked} />
83+
</div>
84+
<div className={stackTextCss}>
85+
<Icon name={props.isLocked ? '10mm-symbol-circle-lock' : '10mm-symbol-circle'} />
86+
<p className={gradientTextCss}>
87+
{props.min}~{props.max}
88+
</p>
89+
</div>
90+
</li>
91+
);
92+
}
93+
94+
const levelLabelCss = css({
95+
color: 'text.secondary',
96+
textStyle: 'subtitle4',
97+
});
98+
99+
const itemContainerRecipe = cva({
100+
base: {
101+
borderRadius: '22px',
102+
flexDirection: 'column',
103+
padding: '14px 16px',
104+
width: '116px !',
105+
height: '163px',
106+
display: 'flex',
107+
alignItems: 'center',
108+
gap: '6px',
109+
cursor: 'pointer',
110+
},
111+
variants: {
112+
selected: {
113+
true: {
114+
border: '1px solid var(--gradient-primary, #FAD0DE)', //TODO : 수정
115+
background: 'linear-gradient(93deg, rgba(25, 23, 27, 0.80) 0.82%, rgba(24, 25, 33, 0.80) 99.97%)',
116+
boxShadow: '0px 5px 50px 4px rgba(92, 78, 122, 0.50) inset, 0px 4px 20px 0px rgba(16, 15, 23, 0.20)',
117+
backdropBlur: 'blur(20px)',
118+
},
119+
false: {
120+
backgroundColor: 'bg.surface3',
121+
},
122+
},
123+
},
124+
});
125+
126+
const imageWrapperCss = center({
127+
flex: 1,
128+
});
129+
130+
const stackTextCss = flex({
131+
width: 'fit-content',
132+
gap: '2px',
133+
alignItems: 'center',
134+
textStyle: 'body1',
135+
});

src/app/level/guide/layout.tsx

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { type PropsWithChildren } from 'react';
2+
import Header from '@/components/Header/Header';
3+
import { css } from '@/styled-system/css';
4+
5+
function LevelGuideLayout({ children }: PropsWithChildren) {
6+
return (
7+
<>
8+
<Header rightAction="none" title="내 레벨" />
9+
<main className={containerCss}>{children}</main>
10+
</>
11+
);
12+
}
13+
14+
export default LevelGuideLayout;
15+
16+
const containerCss = css({
17+
minHeight: '720px',
18+
});

0 commit comments

Comments
 (0)