Skip to content

Commit

Permalink
[Feat] 모집 안내 페이지 바로가기 섹션 추가 (#279)
Browse files Browse the repository at this point in the history
* feat: Journey section add

* feat: 여정 합류 PC

* feat: layout media query add

* feat: journey mobile

* feat: 모집안내 바로가기 생성

* refactor: css 분리

* fix: build error fix
  • Loading branch information
sumi-0011 authored Sep 20, 2023
1 parent c9ad608 commit 6eefa81
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 1 deletion.
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.
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>
),
};
103 changes: 103 additions & 0 deletions src/components/RecruitEntrance/RecruitEntrance.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
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]}>
<div css={imageContainerCss}>
<Image
src="/images/main/coin-drop.png"
width={400}
height={400}
alt="passport combination"
/>
</div>
<div css={infoContainerCss}>
<h1>14기 모집 안내</h1>
<div>
<p>지원 자격부터 모집 직무까지</p>
<p>상세 내용을 한 번에 확인해보세요</p>
</div>
<Button>바로가기</Button>
</div>
</section>
);
}

const imageContainerCss = css`
padding: 24px;
${mediaQuery('tablet')} {
width: 346px;
padding: 0;
margin-left: 53px;
img {
position: relative;
left: -53px;
}
}
${mediaQuery('mobile')} {
width: 124px;
margin-left: 0;
img {
width: auto;
height: 170px;
left: -16px;
}
}
`;

const infoContainerCss = (theme: Theme) => css`
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')} {
padding-right: 0;
}
${mediaQuery('mobile')} {
gap: 8px;
h1 {
${theme.typos.pretendard.subTitle2};
}
p {
font-size: 14px;
}
button {
margin-top: 16px;
}
}
`;

const layoutCss = css`
display: flex;
gap: 80px;
${mediaQuery('tablet')} {
gap: 7px;
}
${mediaQuery('mobile')} {
gap: 16px;
}
`;
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';
11 changes: 10 additions & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
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 (
Expand All @@ -12,6 +14,7 @@ export default function Root() {
<TimerContainer />
<div css={contentCss}>
<Journey />
<RecruitEntrance />
</div>
</main>
</>
Expand All @@ -23,7 +26,13 @@ const layoutCss = (theme: Theme) => css`
`;

const contentCss = css`
& > * {
& > section {
margin-bottom: 200px;
}
${mediaQuery('mobile')} {
& > section {
margin-bottom: 120px;
}
}
`;

0 comments on commit 6eefa81

Please sign in to comment.