Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] main 페이지 디자인 구현 #282

Merged
merged 23 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
849d58c
feat: Journey section add
sumi-0011 Sep 17, 2023
0e11548
feat: 여정 합류 PC
sumi-0011 Sep 17, 2023
afaef4a
feat: layout media query add
sumi-0011 Sep 19, 2023
b8cc29f
Merge branch 'feat/journey' into feat/journey-media
sumi-0011 Sep 19, 2023
5da8b92
feat: journey mobile
sumi-0011 Sep 19, 2023
2965fb1
feat: 모집안내 바로가기 생성
sumi-0011 Sep 19, 2023
c3fb6da
refactor: css 분리
sumi-0011 Sep 20, 2023
f477c33
Merge branch 'develop' into feat/recruit-entrance
sumi-0011 Sep 20, 2023
3b7cac8
fix: build error fix
sumi-0011 Sep 20, 2023
6de0437
feat: schedule 상수로 분리, main 에 추가
sumi-0011 Sep 20, 2023
25dda3f
style: 14기 일정 추가
sumi-0011 Sep 20, 2023
71d067b
style: SectionTitle 반응형 추가
sumi-0011 Sep 20, 2023
90a304c
Merge branch 'develop' into feat/main-schedule
Sep 21, 2023
5d03de8
feat: faq main component 추가
Sep 21, 2023
bc314e0
feat: main sign image 추가
Sep 21, 2023
873f125
fix: optional desc 적용
Sep 21, 2023
b0ebb49
fix: 설명 있을때만 돔 생성
Sep 21, 2023
3edeef6
Merge branch 'fix/schedule-title-style' into feat/main-bottom
Sep 21, 2023
91ec204
refactor: main에만 종속되어있는 컴포넌트 구조 변경
Sep 21, 2023
f808af7
feat: 14기 지원 버튼 추가 (메인 마지막)
Sep 21, 2023
46bdf63
Merge branch 'develop' into feat/main-bottom
sumi-0011 Sep 22, 2023
1306b5d
[Style] GNB, Footer 반응형 작업 (#283)
sumi-0011 Sep 22, 2023
1bbf8a5
Merge branch 'develop' into feat/main-bottom
sumi-0011 Sep 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added public/images/sign/main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/components/FAQ/FAQ.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { FAQList } from '~/components/FAQ/FAQList';
import { SectionTitle } from '~/components/SectionTitle';
import { FAQ_GROUP, FAQGroupType, FAQS, FAQType } from '~/constant/faq';
import { commonLayoutCss } from '~/styles/layout';
import { mediaQuery } from '~/styles/media';

export function FAQ() {
const [activeTab, setActiveTab] = useState<FAQGroupType>('지원자격');
Expand Down Expand Up @@ -65,4 +66,8 @@ const tabCss = (theme: Theme, isActive: boolean) => css`
color: ${isActive ? theme.colors.yellow500 : theme.colors.white};
cursor: pointer;
padding: 16px 24px;

${mediaQuery('mobile')} {
font-size: 14px;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rem 이나 윤호님이 만들어주신 typo 사용하면 좋을 것 같아요 !

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이부분은 다른 부분에서도 이런식으로 사용해서, 다른 브랜치에서 한번에 바꾸겠습니다!

}
`;
22 changes: 22 additions & 0 deletions src/components/FAQ/FAQItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { css, Theme } from '@emotion/react';
import { motion, Variants } from 'framer-motion';

import { ArrowIcon } from '~/components/Icons';
import { mediaQuery } from '~/styles/media';
import { theme } from '~/styles/theme';

interface FAQItemProps {
Expand Down Expand Up @@ -68,12 +69,26 @@ const headerCss = (theme: Theme, isOpen: boolean) => css`
text-align: center;
${theme.typos.pretendard.subTitle2}
}

${mediaQuery('mobile')} {
padding: 8px;

> h3 {
font-weight: 500;
font-size: 14px;
}
}
`;

const arrowIconCss = (theme: Theme, isOpen: boolean) => css`
> path {
stroke: ${isOpen ? theme.colors.black800 : theme.colors.blue400};
}

${mediaQuery('mobile')} {
width: 24px;
height: 24px;
}
`;

const bodyCss = (theme: Theme) => css`
Expand All @@ -83,4 +98,11 @@ const bodyCss = (theme: Theme) => css`
color: ${theme.colors.white};
${theme.typos.pretendard.body1};
}
${mediaQuery('mobile')} {
> p {
padding: 20px 8px;

font-size: 14px;
}
}
`;
25 changes: 0 additions & 25 deletions src/components/Journey/Journey.stories.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/components/Journey/index.tsx

This file was deleted.

File renamed without changes.
36 changes: 36 additions & 0 deletions src/components/Main/RecruitTextSection.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { css, Theme } from '@emotion/react';

import { Button } from '~/components/Button';
import { commonLayoutCss } from '~/styles/layout';
import { mediaQuery } from '~/styles/media';

export function RecruitTextSection() {
return (
<section css={[commonLayoutCss, layoutCss]}>
<h1>
서비스 런칭부터 운영까지 <br />
열정적인 여정에 지금 합류하세요
</h1>
<Button>14기 지원하기</Button>
</section>
);
}

const layoutCss = (theme: Theme) => css`
display: flex;
flex-direction: column;
align-items: center;
gap: 40px;

h1 {
text-align: center;
color: ${theme.colors.white};
${theme.typos.decimal.title2};
}

${mediaQuery('mobile')} {
h1 {
font-size: 20px;
}
}
`;
30 changes: 30 additions & 0 deletions src/components/Main/SignImageSection.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import Image from 'next/image';
import { css } from '@emotion/react';

import { commonLayoutCss } from '~/styles/layout';
import { mediaQuery } from '~/styles/media';

export function SignImageSection() {
return (
<section css={[commonLayoutCss, layoutCss]}>
<Image src="/images/sign/main.png" fill alt="DPM 14th" />
</section>
);
}

const layoutCss = css`
position: relative;
width: 100%;
height: 356px;
img {
width: 100%;
object-fit: contain;
}

${mediaQuery('tablet')} {
height: 262px;
}
${mediaQuery('mobile')} {
height: 122px;
}
`;
2 changes: 2 additions & 0 deletions src/components/Main/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { RecruitTextSection } from './RecruitTextSection';
export { SignImageSection } from './SignImageSection';
21 changes: 0 additions & 21 deletions src/components/RecruitEntrance/RecruitEntrance.stories.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/components/RecruitEntrance/index.tsx

This file was deleted.

57 changes: 3 additions & 54 deletions src/components/ScheduleSection/ScheduleSection.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Meta, StoryObj } from '@storybook/react';

import { SectionTitle } from '~/components/SectionTitle';
import { MEMBER_SCHEDULE, SESSION_SCHEDULES } from '~/constant/schedule';

import { ScheduleSection } from './index';

Expand All @@ -18,60 +19,8 @@ export const All: Story = {
render: () => (
<div css={{ backgroundColor: 'black' }}>
<SectionTitle label="14th Schedule" title={'14기 일정'} />
<ScheduleSection
label="members"
title="멤버모집"
titleBgColor={'blue400'}
schedule={[
{
date: '10.09',
content: '서류 접수 시작',
},
{
date: '10.18',
content: '서류 마감',
},
{
date: '10.21-22',
content: '온라인 면접',
},
{
date: '10.31',
content: '최종 합격 안내',
},
]}
/>
<ScheduleSection
label="sessions"
title="정기 세션"
titleBgColor={'yellow400'}
schedule={[
{
date: '11.04',
content: 'OT',
},
{
date: '11.25',
content: '네트워킹',
},
{
date: '12.09',
content: 'UT',
},
{
date: '12.23',
content: '중간 발표',
},
{
date: '01.20',
content: '배포데이',
},
{
date: '02.17',
content: '최종 발표',
},
]}
/>
<ScheduleSection {...MEMBER_SCHEDULE} />
<ScheduleSection {...SESSION_SCHEDULES} />
</div>
),
};
Expand Down
72 changes: 56 additions & 16 deletions src/components/ScheduleSection/ScheduleSection.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { css, Theme } from '@emotion/react';

import { commonLayoutCss } from '~/styles/layout';
import { mediaQuery } from '~/styles/media';
import { theme } from '~/styles/theme';

interface ScheduleSectionProps {
Expand All @@ -15,7 +17,7 @@ interface ScheduleSectionProps {

export function ScheduleSection({ label, title, schedule, titleBgColor }: ScheduleSectionProps) {
return (
<section css={layoutCss}>
<section css={[commonLayoutCss, layoutCss]}>
<div css={topLabelContainerCss}>
{label.split('').map((char, index) => (
<span key={index}>{char}</span>
Expand All @@ -24,9 +26,9 @@ export function ScheduleSection({ label, title, schedule, titleBgColor }: Schedu
<div css={theme => titleContainerCss(theme, titleBgColor)}>
<h2>{title}</h2>
</div>
<div css={scheduleContainerCss}>
<div css={theme => scheduleContainerCss(theme, schedule.length)}>
{schedule.map(item => (
<div key={item.content}>
<div key={item.content} css={scheduleItemCss}>
<p>{item.date}</p>
<span>{item.content}</span>
</div>
Expand All @@ -37,7 +39,6 @@ export function ScheduleSection({ label, title, schedule, titleBgColor }: Schedu
}

const layoutCss = (theme: Theme) => css`
max-width: 960px;
color: ${theme.colors.white};
margin: 0 auto;

Expand All @@ -62,6 +63,13 @@ const topLabelContainerCss = (theme: Theme) => css`
padding: 6px 0;
color: ${theme.colors.gray200};
}

${mediaQuery('mobile')} {
& > span {
font-size: 12px;
padding: 2px 0px;
}
}
`;

const titleContainerCss = (theme: Theme, titleBgColor: keyof typeof theme.colors) => css`
Expand All @@ -70,25 +78,57 @@ const titleContainerCss = (theme: Theme, titleBgColor: keyof typeof theme.colors
color: ${theme.colors.black800};
text-align: center;
padding: 40px 0;

${mediaQuery('mobile')} {
padding: 16px 0;
font-size: 16px;
}
`;

const scheduleContainerCss = (theme: Theme) => css`
const scheduleItemCss = (theme: Theme) => css`
display: flex;
padding: 50px 90px;
background-color: ${theme.colors.black400};
flex-direction: column;
gap: 20px;
text-align: center;

p {
${theme.typos.decimal.body1};
}
span {
${theme.typos.pretendard.body1};
color: ${theme.colors.gray20};
}
flex: 1;

& > div {
display: flex;
flex-direction: column;
gap: 20px;
${mediaQuery('mobile')} {
gap: 8px;
p {
${theme.typos.decimal.body1};
font-size: 14px;
}
span {
${theme.typos.pretendard.body1};
}
&:not(:last-child) {
flex: 1;
font-size: 14px;
font-weight: 400;
}
}
`;

const scheduleContainerCss = (theme: Theme, scheduleCount: number) => css`
display: flex;
padding: 50px 90px;
background-color: ${theme.colors.black400};
flex-wrap: wrap;

${mediaQuery('tablet')} {
padding: 50px 48px;
}

${mediaQuery('mobile')} {
display: grid;
grid-template-rows: repeat(2, 1fr);
grid-template-columns: repeat(${scheduleCount / 2}, 1fr);
padding: 16px 8px;
row-gap: 32px;
column-gap: 0;
text-align: center;
}
`;
Loading
Loading