-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Add: 하단 mockup image 반응형 asset 추가 * Feat: TimeToHavit 컴포넌트 구현 및 연결 * Refactor: 이미지 사이즈 반응형 대응 및 최적화
- Loading branch information
Showing
12 changed files
with
179 additions
and
73 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
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
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,82 @@ | ||
@import '@/styles/responsive.module.scss'; | ||
|
||
.TimeToHavit { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
width: 100%; | ||
padding: 2rem 2rem 0 2rem; | ||
background: var(--purple-background); | ||
font-family: 'Pretendard'; | ||
|
||
@include mobile { | ||
align-items: flex-start; | ||
} | ||
|
||
&__image { | ||
margin-top: 5rem; | ||
width: 50vw; | ||
|
||
@include tablet { | ||
width: 70vw; | ||
} | ||
|
||
@include mobile { | ||
width: 90vw; | ||
} | ||
} | ||
|
||
&__title { | ||
margin-bottom: 1rem; | ||
font-size: 2.5rem; | ||
font-weight: 600; | ||
letter-spacing: -0.06em; | ||
text-align: center; | ||
color: var(--white); | ||
|
||
@include tablet { | ||
font-size: 2rem; | ||
} | ||
|
||
@include mobile { | ||
text-align: start; | ||
font-size: 1.75rem; | ||
} | ||
} | ||
|
||
&__detail { | ||
font-size: 1.25rem; | ||
font-weight: 400; | ||
color: var(--white); | ||
|
||
@include tablet { | ||
font-size: 1.125rem; | ||
} | ||
|
||
@include mobile { | ||
display: grid; | ||
grid-template-columns: minmax(100px, max-content) 1fr; | ||
align-items: center; | ||
width: 100%; | ||
font-size: 0.75rem; | ||
} | ||
} | ||
|
||
&__line { | ||
margin-left: 0.5rem; | ||
} | ||
|
||
&__store { | ||
display: flex; | ||
justify-content: center; | ||
margin-top: 2rem; | ||
margin-bottom: 8rem; | ||
color: var(--white); | ||
gap: 1rem; | ||
|
||
@include mobile { | ||
margin-bottom: 5rem; | ||
} | ||
} | ||
} |
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,56 @@ | ||
import React from 'react'; | ||
import Image from 'next/image'; | ||
|
||
import { Button } from '@/components/Common/Button'; | ||
import useWindowSize from '@/hooks/useWindowSize'; | ||
import { RESPONSIVE_VARIABLE } from '@/constants/objects/responsive'; | ||
|
||
import mockupLargeSrc from '../../../public/static/images/mockup-phone-lg.webp'; | ||
import mockupMideumSrc from '../../../public/static/images/mockup-phone-md.webp'; | ||
import mockupSmallSrc from '../../../public/static/images/mockup-phone-sm.webp'; | ||
import playstoreLogo from '../../../public/static/images/playstore.webp'; | ||
import appstoreLogo from '../../../public/static/images/appstore.webp'; | ||
|
||
import Styles from './TimeToHavit.module.scss'; | ||
import { Line } from '../Common/Line'; | ||
|
||
export default function TimeToHavit(): JSX.Element { | ||
const { width } = useWindowSize(); | ||
|
||
const mockupSrc = | ||
width >= RESPONSIVE_VARIABLE['pc'] | ||
? mockupLargeSrc | ||
: width < RESPONSIVE_VARIABLE['tablet'] | ||
? mockupSmallSrc | ||
: mockupMideumSrc; | ||
|
||
return ( | ||
<div className={Styles.TimeToHavit}> | ||
<div className={Styles.TimeToHavit__image}> | ||
<Image | ||
src={mockupSrc} | ||
alt="mockup phone" | ||
style={{ width: '100%', height: 'auto' }} | ||
/> | ||
</div> | ||
<div className={Styles.TimeToHavit__title}> | ||
<div>여러분의 지식을</div> | ||
<div>체계적으로 HAVIT 해 볼 시간!</div> | ||
</div> | ||
<div className={Styles.TimeToHavit__detail}> | ||
<div>지금 바로 콘텐츠를 아카이빙하세요</div> | ||
{width < RESPONSIVE_VARIABLE['tablet'] && ( | ||
<Line classname={Styles.TimeToHavit__line} direction="row" /> | ||
)} | ||
</div> | ||
<div className={Styles.TimeToHavit__store}> | ||
<Button type="google" text="Google Play" imageSrc={playstoreLogo} /> | ||
<Button | ||
type="apple" | ||
text="App Store " | ||
imageSrc={appstoreLogo} | ||
/> | ||
</div> | ||
</div> | ||
); | ||
} |
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,3 @@ | ||
import TimeToHavit from './TimeToHavit'; | ||
|
||
export { TimeToHavit }; |
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