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] 모집 안내 페이지 바로가기 섹션 추가 #279

Merged
merged 9 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
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/main/coin-drop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/main/passport-combination.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions src/components/Journey/Journey.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import type { Meta, StoryObj } from '@storybook/react';

import { Journey } from './index';

const meta: Meta<typeof Journey> = {
title: 'components/Journey',
component: Journey,
args: {},
};

export default meta;

type Story = StoryObj<typeof Journey>;

export const Primary: Story = {
render: () => (
<div
css={theme => ({
backgroundColor: theme.colors.black800,
})}
>
<Journey />
</div>
),
};
124 changes: 124 additions & 0 deletions src/components/Journey/Journey.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
import Image from 'next/image';
import { css, Theme } from '@emotion/react';

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

export function Journey() {
return (
<section css={[commonLayoutCss, layoutCss]}>
<h1>
디자이너와 개발자를 만나
<br />
공동의 성장을 위한 여정에 합류해보세요
</h1>
<h2>
디자이너와 개발자를 만나 공동의 <br />
성장을 위한 여정에 합류해보세요
</h2>
<div>
<Image
src="/images/main/passport-combination.png"
width={530.326}
height={340}
alt="passport combination"
/>
</div>
<div css={infoContainerCss}>
<div>
<h3>누적 멤버 수</h3>
<p>850+</p>
</div>
<div>
<h3>탄생한지</h3>
<p>7 YEARS</p>
</div>
<div>
<h3>10-13기 론칭 성공률</h3>
<p>100%</p>
</div>
<div>
<h3>5-13기 론칭 서비스</h3>
<p>50+</p>
</div>
</div>
</section>
);
}

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

color: ${theme.colors.white};

h1,
h2 {
${theme.typos.decimal.title2};
text-align: center;
}

h2 {
font-size: 20px;
display: none;
}

${mediaQuery('mobile')} {
gap: 24px;

h1 {
display: none;
}
h2 {
display: block;
}

img {
width: 240px;
height: 155px;
}
}
`;

const infoContainerCss = (theme: Theme) => css`
display: grid;
gap: 20px;
width: 100%;

grid-template-columns: repeat(4, 1fr);
& > div {
display: flex;
flex-direction: column;
align-items: center;
gap: 20px;

background-color: ${theme.colors.black400};
padding: 52px 0;
}

h3 {
${theme.typos.pretendard.body1};
color: ${theme.colors.gray100};
}

p {
${theme.typos.decimal.subTitle1};
}

${mediaQuery('mobile')} {
grid-template-columns: repeat(2, 1fr);

h3,
p {
font-size: 14px;
line-height: 30px;
}
& > div {
padding: 8px 4px;
gap: 8px;
}
}
`;
1 change: 1 addition & 0 deletions src/components/Journey/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { Journey } from './Journey';
21 changes: 21 additions & 0 deletions src/components/RecruitEntrance/RecruitEntrance.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import type { Meta, StoryObj } from '@storybook/react';

import { RecruitEntrance } from './index';

const meta: Meta<typeof RecruitEntrance> = {
title: 'components/RecruitEntrance',
component: RecruitEntrance,
args: {},
};

export default meta;

type Story = StoryObj<typeof RecruitEntrance>;

export const Primary: Story = {
render: () => (
<div css={{ backgroundColor: 'black' }}>
<RecruitEntrance />
</div>
),
};
102 changes: 102 additions & 0 deletions src/components/RecruitEntrance/RecruitEntrance.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
import Image from 'next/image';
import { css, Theme } from '@emotion/react';

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

export function RecruitEntrance() {
return (
<section css={[commonLayoutCss, layoutCss]}>
Copy link
Member

Choose a reason for hiding this comment

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

여기서 합쳐도 좋네요

<div>
<Image
src="/images/main/coin-drop.png"
width={400}
height={400}
alt="passport combination"
/>
</div>
<div>
<h1>14기 모집 안내</h1>
<div>
<p>지원 자격부터 모집 직무까지</p>
<p>상세 내용을 한 번에 확인해보세요</p>
</div>
<Button>바로가기</Button>
</div>
</section>
);
}

const layoutCss = (theme: Theme) => css`
display: flex;
gap: 80px;
& > div:first-of-type {
padding: 24px;
}

& > div:last-of-type {
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
gap: 24px;
text-align: left;
padding-right: 80px;

h1 {
${theme.typos.pretendard.subTitle1};
color: ${theme.colors.white};
}
p {
${theme.typos.pretendard.subTitle2};
color: ${theme.colors.gray100};
}
}

${mediaQuery('tablet')} {
gap: 7px;

& > div:first-of-type {
width: 346px;
padding: 0;
margin-left: 53px;
img {
position: relative;
left: -53px;
}
}

& > div:last-of-type {
padding-right: 0;
}
}

${mediaQuery('mobile')} {
gap: 16px;

& > div:first-of-type {
width: 124px;
margin-left: 0;
img {
width: auto;
height: 170px;
left: -16px;
}
}
& > div:last-of-type {
gap: 8px;

h1 {
${theme.typos.pretendard.subTitle2};
}

p {
font-size: 14px;
}
button {
margin-top: 16px;
}
}
Copy link
Member

Choose a reason for hiding this comment

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

요렇게 선택자로 css 주면, 변경에 덜 유연하지 않을까요?? html구조를 바꾸면 css도 수정해야할 것 같아요!

Copy link
Member Author

Choose a reason for hiding this comment

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

조금 수정했습니다!!

}
`;
1 change: 1 addition & 0 deletions src/components/RecruitEntrance/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { RecruitEntrance } from './RecruitEntrance';
4 changes: 2 additions & 2 deletions src/components/TimerContainer/TimerContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function TimerContainer() {
const time = useDiffDay(DEADLINE_DATE);

return (
<div css={containerCss}>
<section css={containerCss}>
<div css={bgImageCss}>
<Image src="/images/main/main-bg.png" alt="main-bg" width={1300} height={768.857} />
</div>
Expand All @@ -35,7 +35,7 @@ export function TimerContainer() {
<Button size="lg">14기 지원하기</Button>
</div>
</div>
</div>
</section>
);
}

Expand Down
19 changes: 19 additions & 0 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
import { css, Theme } from '@emotion/react';

import { Journey } from '~/components/Journey';
import { RecruitEntrance } from '~/components/RecruitEntrance';
import { SEO } from '~/components/SEO';
import { TimerContainer } from '~/components/TimerContainer';
import { mediaQuery } from '~/styles/media';

export default function Root() {
return (
<>
<SEO />
<main css={layoutCss}>
<TimerContainer />
<div css={contentCss}>
<Journey />
<RecruitEntrance />
</div>
</main>
</>
);
Expand All @@ -17,3 +24,15 @@ export default function Root() {
const layoutCss = (theme: Theme) => css`
background-color: ${theme.colors.black800};
`;

const contentCss = css`
& > section {
margin-bottom: 200px;
}

${mediaQuery('mobile')} {
& > section {
margin-bottom: 120px;
}
}
`;
14 changes: 14 additions & 0 deletions src/styles/layout.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { css } from '@emotion/react';

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

const layout = {
maxWidth: '960px',
} as const;
Expand All @@ -9,4 +11,16 @@ export const commonLayoutCss = css`
max-width: ${layout.maxWidth};
margin: 0 auto;
padding: 0 20px;

${mediaQuery('pc')} {
width: calc(100vw - 60px);
margin: 0 30px;
padding: 0;
}

${mediaQuery('mobile')} {
width: calc(100vw - 32px);
margin: 0 16px;
padding: 0;
}
`;
Loading