-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Journey section add * feat: 여정 합류 PC * feat: layout media query add * feat: journey mobile * feat: 모집안내 바로가기 생성 * refactor: css 분리 * fix: build error fix * feat: schedule 상수로 분리, main 에 추가 * style: 14기 일정 추가 * style: SectionTitle 반응형 추가 * feat: faq main component 추가 * feat: main sign image 추가 * fix: optional desc 적용 * fix: 설명 있을때만 돔 생성 * refactor: main에만 종속되어있는 컴포넌트 구조 변경 * feat: 14기 지원 버튼 추가 (메인 마지막) * style: gnb pc design 수정 * feat: mobile menu icon 추가 * refactor: pc footer theme 적용 * style: footer 모바일 반응형 추가 * feat: mobile menu icon 추가 * feat: mobile nav 추가 * [Style] GNB, Footer 반응형 작업 (#283) * style: gnb pc design 수정 * feat: mobile menu icon 추가 * refactor: pc footer theme 적용 * style: footer 모바일 반응형 추가 --------- Co-authored-by: byun sumi <sumi@adenasoft.com> * fix: merge error fix * fix: merge error fix --------- Co-authored-by: byun sumi <sumi@adenasoft.com>
- Loading branch information
Showing
3 changed files
with
206 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import Link from 'next/link'; | ||
import { css, Theme } from '@emotion/react'; | ||
import { m } from 'framer-motion'; | ||
|
||
import { GNB_MENU_NAME } from '~/constant/gnb'; | ||
|
||
export function MobileMenu({}) { | ||
return ( | ||
<m.article | ||
initial={{ height: 0, opacity: 0 }} | ||
animate={{ height: '272px', opacity: 1 }} | ||
exit={{ height: 0, opacity: 0 }} | ||
css={mobileMenuCss} | ||
> | ||
<ul> | ||
{GNB_MENU_NAME.map(menu => ( | ||
<li key={menu.name}> | ||
{menu.type === 'button' ? ( | ||
<Link css={[linkCss, activeLinkCss]} href={menu.href}> | ||
{menu.name} | ||
</Link> | ||
) : ( | ||
<Link css={[linkCss, inActiveLinkCss]} href={menu.href}> | ||
{menu.name} | ||
</Link> | ||
)} | ||
</li> | ||
))} | ||
</ul> | ||
</m.article> | ||
); | ||
} | ||
|
||
const mobileMenuCss = (theme: Theme) => css` | ||
z-index: 9997; | ||
width: 100vw; | ||
height: fit-content; | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
margin: auto; | ||
background-color: ${theme.colors.black800}; | ||
padding-top: 72px; | ||
overflow: hidden; | ||
li { | ||
padding: 12px 32px; | ||
} | ||
`; | ||
|
||
const activeLinkCss = (theme: Theme) => css` | ||
color: ${theme.colors.yellow500}; | ||
`; | ||
|
||
const inActiveLinkCss = (theme: Theme) => css` | ||
color: ${theme.colors.white}; | ||
`; | ||
|
||
const linkCss = (theme: Theme) => css` | ||
${theme.typos.pretendard.body1}; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
import { css } from '@emotion/react'; | ||
|
||
interface Props { | ||
onClick?: () => void; | ||
isChecked?: boolean; | ||
} | ||
export function MobileMenuIcon({ onClick, isChecked }: Props) { | ||
return ( | ||
<div css={containerCss}> | ||
<input | ||
className="burger-check" | ||
type="checkbox" | ||
id="burger-check" | ||
onClick={onClick} | ||
checked={isChecked} | ||
/> | ||
<label className="burger-icon" htmlFor="burger-check"> | ||
<span className="burger-sticks"></span> | ||
</label> | ||
</div> | ||
); | ||
} | ||
|
||
const containerCss = css` | ||
position: relative; | ||
width: 32px; | ||
height: 32px; | ||
.menu { | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
height: 100%; | ||
max-width: 0; | ||
min-width: 100px; | ||
transition: 0.5s ease; | ||
z-index: 1; | ||
background-color: #eee; | ||
} | ||
.burger-icon { | ||
cursor: pointer; | ||
display: inline-block; | ||
position: absolute; | ||
z-index: 2; | ||
padding: 8px 0; | ||
top: 8px; | ||
right: 4px; | ||
user-select: none; | ||
width: auto; | ||
.burger-sticks { | ||
background: #d9d9d9; | ||
display: block; | ||
height: 3px; | ||
position: relative; | ||
transition: background 0.2s ease-out; | ||
width: 24px; | ||
&:before, | ||
&:after { | ||
background: #d9d9d9; | ||
content: ''; | ||
display: block; | ||
height: 100%; | ||
position: absolute; | ||
transition: all 0.2s ease-out; | ||
width: 100%; | ||
} | ||
&:before { | ||
top: 8px; | ||
} | ||
&:after { | ||
top: -8px; | ||
} | ||
} | ||
} | ||
.burger-check { | ||
display: none; | ||
} | ||
.burger-check:checked ~ .burger-icon .burger-sticks { | ||
background: transparent; | ||
&:before { | ||
transform: rotate(-45deg); | ||
} | ||
&:after { | ||
transform: rotate(45deg); | ||
} | ||
} | ||
.burger-check:checked ~ .burger-icon:not(.steps) .burger-sticks { | ||
&:before, | ||
&:after { | ||
top: 0; | ||
} | ||
} | ||
`; |