Skip to content

Commit a9a8219

Browse files
authored
[27기] 27기 모집 전 공식 웹 수정 사항 반영 (#197)
2 parents cafb197 + f3dbdde commit a9a8219

File tree

122 files changed

+8356
-6023
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+8356
-6023
lines changed

.github/workflows/storybook-chromatic-action.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.
File renamed without changes.

components/common/AnimatedBox/index.tsx

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,21 @@ import { useSpring, animated } from '@react-spring/web';
44
import { Box } from 'components/common';
55
import styled from 'styled-components';
66
import media from 'styles/media';
7+
import { PaletteKeyTypes } from 'styles/theme';
78

89
export interface AnimatedBoxProps {
910
children: ReactNode;
1011
className?: string;
12+
color: PaletteKeyTypes;
13+
fontColor: PaletteKeyTypes;
1114
}
1215

13-
function AnimatedBox({ children, className }: AnimatedBoxProps): ReactElement {
16+
function AnimatedBox({
17+
children,
18+
className,
19+
color,
20+
fontColor,
21+
}: AnimatedBoxProps): ReactElement {
1422
const animatedDivRef = useRef(null);
1523
const [isIntersect, setIsIntersect] = useState(false);
1624

@@ -44,9 +52,8 @@ function AnimatedBox({ children, className }: AnimatedBoxProps): ReactElement {
4452
<animated.div ref={animatedDivRef} style={styles}>
4553
<StyledBox
4654
className={className}
47-
width={380}
48-
height={268}
49-
backgroundColor="white"
55+
backgroundColor={color}
56+
fontColor={fontColor}
5057
borderRadius={20}
5158
>
5259
{children}
@@ -57,33 +64,25 @@ function AnimatedBox({ children, className }: AnimatedBoxProps): ReactElement {
5764

5865
export default AnimatedBox;
5966

60-
const StyledBox = styled(Box)`
67+
const StyledBox = styled.section<{
68+
backgroundColor: PaletteKeyTypes;
69+
fontColor: PaletteKeyTypes;
70+
borderRadius: number;
71+
}>`
6172
display: flex;
62-
flex-direction: column;
63-
justify-content: center;
73+
flex-direction: row;
74+
justify-content: space-between;
6475
align-items: center;
65-
padding: 0;
66-
filter: drop-shadow(
67-
0px 5px 40px ${({ theme }) => theme.palette.grey_850 + '3'}
68-
);
69-
70-
.title-text {
71-
color: ${({ theme }) => theme.palette.grey_500};
72-
${({ theme }) => theme.textStyle.web.Subtitle};
73-
}
74-
.content-text {
75-
${({ theme }) => theme.textStyle.web.Head}
76-
}
76+
padding: 20px 24px;
77+
width: auto;
78+
min-width: 195px;
79+
border-radius: ${({ borderRadius }) => borderRadius}px;
80+
background-color: ${({ theme, backgroundColor }) =>
81+
backgroundColor && theme.palette[backgroundColor]};
82+
color: ${({ theme, fontColor }) => fontColor && theme.palette[fontColor]};
7783
7884
${media.mobile} {
79-
width: 335px;
80-
height: 220px;
81-
82-
.title-text {
83-
${({ theme }) => theme.textStyle.mobile.Subtitle}
84-
}
85-
.content-text {
86-
${({ theme }) => theme.textStyle.mobile.Head}
87-
}
85+
width: auto;
86+
height: 120px;
8887
}
8988
`;

components/common/AnimatedButton/index.stories.tsx

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -31,49 +31,29 @@ const Template: Story<AnimatedButtonProps> = (args) => (
3131
export const PrimaryAnimatedButton = Template.bind({});
3232

3333
PrimaryAnimatedButton.args = {
34-
width: 190,
35-
height: 65,
36-
fontColor: 'white',
37-
buttonColor: 'orange_400',
3834
className: 'recruitButton',
3935
buttonText: '21기에서 만나요!',
4036
};
4137

4238
export const SecondaryAnimatedButton = Template.bind({});
4339

4440
SecondaryAnimatedButton.args = {
45-
width: 190,
46-
height: 65,
47-
fontColor: 'black',
48-
buttonColor: 'grey_850',
49-
borderColor: 'lightGrey',
5041
className: 'recruitButton',
5142
buttonText: '21기에서 만나요!',
52-
variant: 'secondary',
43+
variant: 'black',
5344
};
5445

5546
export const DisabledAnimatedButton = Template.bind({});
5647

5748
DisabledAnimatedButton.args = {
58-
width: 190,
59-
height: 65,
60-
fontColor: 'black',
61-
buttonColor: 'grey_850',
62-
borderColor: 'lightGrey',
63-
className: 'recruitButton',
6449
buttonText: '21기에서 만나요!',
65-
variant: 'secondary',
50+
variant: 'primary',
6651
disabled: true,
6752
};
6853

6954
export const SmallSizeAnimatedButton = Template.bind({});
7055

7156
SmallSizeAnimatedButton.args = {
72-
width: 120,
73-
height: 50,
74-
fontColor: 'black',
75-
buttonColor: 'grey_850',
76-
borderColor: 'lightGrey',
77-
className: 'recruitButton',
57+
variant: 'primary',
7858
buttonText: '지원하기',
7959
};

components/common/AnimatedButton/index.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,22 @@ import media from 'styles/media';
33
import { slideIn, slideOut } from 'styles/utils-styles';
44
import Button, { ButtonProps } from '../Button';
55

6-
export type AnimatedButtonVariant = 'primary' | 'secondary';
6+
export type AnimatedButtonVariant = 'primary' | 'black';
77

88
export interface AnimatedButtonProps extends ButtonProps {
9-
width: number;
10-
height: number;
119
buttonText: string;
1210
href?: string;
13-
variant?: AnimatedButtonVariant;
11+
variant: AnimatedButtonVariant;
1412
}
1513

1614
function AnimatedButton({
17-
width,
18-
height,
1915
buttonText,
2016
href,
2117
variant = 'primary',
2218
...rest
2319
}: AnimatedButtonProps) {
2420
return (
25-
<ButtonStyled width={width} height={height} variant={variant} {...rest}>
21+
<ButtonStyled variant={variant} {...rest}>
2622
{/* <svg
2723
width={`${width + 2}px`}
2824
height={`${height}px`}

components/common/Badge/index.tsx

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import type { ReactElement, ReactNode } from 'react';
22
import styled from 'styled-components';
33
import media from 'styles/media';
4-
import { PaletteKeyTypes } from 'styles/theme';
4+
import { PaletteKeyTypes, TextStyleV2Types } from 'styles/theme';
55

66
interface IBadgeStyle {
77
backgroundColor?: PaletteKeyTypes;
8+
typoColor?: PaletteKeyTypes;
89
}
910

1011
interface BadgeProps extends IBadgeStyle {
@@ -16,10 +17,15 @@ function Badge({
1617
className,
1718
children,
1819
backgroundColor = 'grey_100',
20+
typoColor = 'black_60',
1921
}: BadgeProps): ReactElement {
2022
return (
21-
<StyledBadge className={className} backgroundColor={backgroundColor}>
22-
{children}
23+
<StyledBadge
24+
className={className}
25+
backgroundColor={backgroundColor}
26+
typoColor={typoColor}
27+
>
28+
{children}
2329
</StyledBadge>
2430
);
2531
}
@@ -28,16 +34,14 @@ const StyledBadge = styled.div<IBadgeStyle>`
2834
display: flex;
2935
justify-content: center;
3036
align-items: center;
31-
width: 59px;
32-
height: 37px;
33-
border-radius: 20px;
34-
color: ${({ theme }) => theme.palette.grey_1000};
37+
padding: 2px 8px;
38+
border-radius: 4px;
3539
background-color: ${({ theme, backgroundColor }) =>
3640
backgroundColor && theme.palette[backgroundColor]};
37-
38-
${({ theme }) => theme.textStyle.web.Body_1};
41+
color: ${({ theme, typoColor }) => typoColor && theme.palette[typoColor]};
42+
${({ theme }) => theme.textStyleV2.resp.caption_md};
3943
${media.mobile} {
40-
${({ theme }) => theme.textStyle.mobile.Body_1};
44+
${({ theme }) => theme.textStyleV2.resp.caption_sm};
4145
}
4246
`;
4347

components/common/Banner/index.tsx

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
import React, { ReactElement } from 'react';
2+
import styled, { keyframes } from 'styled-components';
3+
import media from 'styles/media';
4+
5+
interface BannerProps {
6+
backgroundImg?: string;
7+
className?: string;
8+
title?: string;
9+
description?: string;
10+
}
11+
12+
function Banner({
13+
className,
14+
backgroundImg = '/assets/images/27th/banner_project_story.png',
15+
title,
16+
description,
17+
}: BannerProps): ReactElement {
18+
return (
19+
<StyledBox backgroundImg={backgroundImg} className={className}>
20+
<InnerTextContainer>
21+
<StyledTitle>{title}</StyledTitle>
22+
<StyledDescription>{description}</StyledDescription>
23+
</InnerTextContainer>
24+
</StyledBox>
25+
);
26+
}
27+
28+
const StyledBox = styled.div<BannerProps>`
29+
background-repeat: no-repeat;
30+
background-size: cover;
31+
background-position: center;
32+
background-image: url(${({ backgroundImg }) => backgroundImg});
33+
background-color: ${({ theme, backgroundImg }) =>
34+
!backgroundImg && theme.palette.grey_800};
35+
padding: 146px 0 93px 0;
36+
width: 100%;
37+
display: flex;
38+
align-items: center;
39+
flex-direction: column;
40+
justify-content: center;
41+
gap: 8px;
42+
`;
43+
44+
const InnerTextContainer = styled.div`
45+
max-width: 1200px;
46+
margin: 0 80px;
47+
display: flex;
48+
flex-direction: column;
49+
width: 100%;
50+
align-items: flex-start;
51+
gap: 8px;
52+
53+
${media.tablet} {
54+
width: -webkit-fill-available;
55+
}
56+
57+
${media.mobile} {
58+
margin: 0;
59+
}
60+
`;
61+
62+
const slideUp = keyframes`
63+
0% {
64+
opacity: 0;
65+
transform: translateY(20px);
66+
}
67+
100% {
68+
opacity: 1;
69+
transform: translateY(0);
70+
}
71+
`;
72+
73+
const StyledTitle = styled.h1`
74+
color: ${({ theme }) => theme.palette.white_100};
75+
${({ theme }) => theme.textStyleV2.resp.title1_md};
76+
white-space: nowrap;
77+
margin-top: 0;
78+
margin-bottom: 0;
79+
80+
animation: ${slideUp} 0.6s ease forwards;
81+
animation-delay: 0.2s;
82+
83+
${media.mobile} {
84+
${({ theme }) => theme.textStyleV2.resp.title1_sm};
85+
white-space: pre-line;
86+
margin: 0 24px;
87+
}
88+
`;
89+
90+
const StyledDescription = styled.p`
91+
color: ${({ theme }) => theme.palette.white_50};
92+
${({ theme }) => theme.textStyleV2.resp.subtitle_md};
93+
white-space: nowrap;
94+
margin-top: 0;
95+
margin-bottom: 0;
96+
97+
animation: ${slideUp} 0.6s ease forwards;
98+
animation-delay: 0.2s;
99+
100+
${media.mobile} {
101+
${({ theme }) => theme.textStyleV2.resp.subtitle_sm};
102+
white-space: pre-line;
103+
margin: 0 24px;
104+
}
105+
`;
106+
107+
export default Banner;

components/common/Box/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import theme, { PaletteKeyTypes } from 'styles/theme';
44

55
interface IBoxStyle {
66
backgroundColor?: PaletteKeyTypes;
7+
fontColor?: PaletteKeyTypes;
78
width?: number;
89
height?: number;
910
borderRadius?: number;
@@ -22,6 +23,7 @@ function Box({
2223
height,
2324
backgroundColor = 'grey',
2425
borderRadius = 20,
26+
fontColor = 'black',
2527
...rest
2628
}: BoxProps): ReactElement {
2729
return (
@@ -44,6 +46,7 @@ const StyledBox = styled.div<IBoxStyle>`
4446
border-radius: ${({ borderRadius }) => borderRadius}px;
4547
background-color: ${({ backgroundColor }) =>
4648
backgroundColor && theme.palette[backgroundColor]};
49+
color: ${({ fontColor }) => fontColor && theme.palette[fontColor]};
4750
`;
4851

4952
export default Box;

0 commit comments

Comments
 (0)