-
Notifications
You must be signed in to change notification settings - Fork 2
design: 로그인 및 랜딩 페이지 퍼블리싱 #22
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
Changes from 9 commits
a2a943e
05c137a
9a56abc
d19e2dc
1933ca2
f39424a
0a34498
35f3b17
8e65900
fc18a98
b0323a6
9df2041
cff0e69
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이 이미지도 겹쳐서 둘 중에 하나만 가져가야겠네요 😲 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| export const STYLE_CLASS = [ | ||
| { | ||
| imagePosition: 'left-[calc(50%-200px)]', | ||
| mask: 'bottom-27 left-[calc(50%+65px)]', | ||
| circle: 'h-40 w-40', | ||
| textPosition: '-top-20 left-[calc(50%-30px)] text-right', | ||
| description: | ||
| '따뜻한 편지 사례들을 모아 볼 수 있어요.\n응원이 필요한 사람들에게\n단체로 롤링페이퍼를 쓸 수도 있습니다.', | ||
| }, | ||
| { | ||
| imagePosition: 'left-[calc(50%-200px)]', | ||
| mask: 'bottom-5 left-[calc(50%-75px)]', | ||
| circle: 'h-40 w-40', | ||
| textPosition: '-top-14 left-[calc(50%+40px)] text-left', | ||
| description: '주고받은 편지 내역을 확인해 보세요.\n보는 것 만으로도 마음이 따뜻해집니다.', | ||
| }, | ||
| { | ||
| imagePosition: 'left-[calc(50%+130px)]', | ||
| mask: 'bottom-8 left-[calc(50%)]', | ||
| circle: 'h-65 w-65', | ||
| textPosition: '-top-14 left-1/2 text-center', | ||
| description: | ||
| '모르는 사람에게 고민을 털어 놓아 보세요.\n다른 사람에게도 위로, 응원, 축하를 보낼 수 있어요.', | ||
| }, | ||
| ]; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| import { useState } from 'react'; | ||
| import { Navigate } from 'react-router'; | ||
| import { twMerge } from 'tailwind-merge'; | ||
|
|
||
| import LandingImg from '@/assets/images/landing.png'; | ||
|
|
||
| import { STYLE_CLASS } from './constants'; | ||
|
|
||
| const Landing = () => { | ||
| const [step, setStep] = useState(0); | ||
|
|
||
| if (step === 3) return <Navigate to="/login" />; | ||
|
|
||
| return ( | ||
| <main | ||
| className="relative flex grow justify-center overflow-hidden" | ||
| onClick={() => setStep((prev) => prev + 1)} | ||
| > | ||
| <img | ||
| src={LandingImg} | ||
| alt="서비스 소개 이미지" | ||
| className={twMerge( | ||
| 'absolute bottom-0 h-70 w-auto max-w-none -translate-x-1/2 transition-all duration-200', | ||
| STYLE_CLASS[step].imagePosition, | ||
| )} | ||
| /> | ||
| <section | ||
| className={twMerge( | ||
| 'fixed z-1 -translate-x-1/2 transition-all duration-200', | ||
| STYLE_CLASS[step].mask, | ||
| )} | ||
| > | ||
| <p | ||
| className={twMerge( | ||
| 'body-sb absolute z-2 w-max -translate-x-1/2 whitespace-pre-wrap text-white transition-all duration-200', | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 오 저는 tranlate 정렬translate-x-[-50%] 이렇게 했었는데 더 간편한 방법이 있었군용 |
||
| STYLE_CLASS[step].textPosition, | ||
| )} | ||
| > | ||
| {STYLE_CLASS[step].description} | ||
| </p> | ||
| <div | ||
| className={twMerge( | ||
| 'rounded-full shadow-[0_0_0_9999px_rgba(0,0,0,0.5)]', | ||
| STYLE_CLASS[step].circle, | ||
| )} | ||
| /> | ||
| </section> | ||
| </main> | ||
| ); | ||
| }; | ||
|
|
||
| export default Landing; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| import { Link } from 'react-router'; | ||
|
|
||
| import FieldImg from '@/assets/images/field-1.png'; | ||
| import BlurImg from '@/assets/images/landing-blur.png'; | ||
| import EnvelopeImg from '@/assets/images/postoffice-letter.png'; | ||
| import PostofficeImg from '@/assets/images/postoffice.png'; | ||
| import BackgroundImageWrapper from '@/components/BackgroundImageWrapper'; | ||
|
|
||
| const Background = () => { | ||
| return ( | ||
| <> | ||
| <div className="fixed -bottom-8 z-0 flex justify-center overflow-hidden"> | ||
| <div className="relative flex h-[440px] min-w-[759.5px] items-end justify-center"> | ||
| <Link to="/landing"> | ||
| <div className="animate-login-move-up-down absolute bottom-[313px] left-1/2 z-1 -translate-x-1/2"> | ||
| <p className="text-gray-60 body-r -rotate-[5.28deg] pr-1 text-center"> | ||
| 36.5 설명 보기 | ||
| </p> | ||
| <img | ||
| src={EnvelopeImg} | ||
| alt="편지 이미지" | ||
| className="h-[90px] w-full object-contain object-center" | ||
| /> | ||
| </div> | ||
| </Link> | ||
| <img | ||
| src={PostofficeImg} | ||
| alt="우체국 이미지" | ||
| className="absolute bottom-[93px] left-1/2 z-1 h-[184.5px] w-full -translate-x-1/2 object-contain object-[calc(50%-78px)]" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. absolute로 관리하셨는데 화면에 따라서 건물이 들쑥날쑥 해지지 않았나용?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 부모 요소가 캔버스처럼 딱 잡아주고 있어서 화면이 달라도 동일하게 보일거에요!! 일단 저는 그랬어요..ㅎㅎ |
||
| /> | ||
| <img | ||
| src={FieldImg} | ||
| alt="언덕 이미지" | ||
| className="z-0 h-[205px] w-full object-cover object-[calc(50%-26px)]" | ||
| /> | ||
| </div> | ||
| </div> | ||
| <BackgroundImageWrapper | ||
| className="fixed bottom-[-1px] left-1/2 z-0 h-50 w-screen -translate-x-1/2 object-fill" | ||
| imageUrl={BlurImg} | ||
| /> | ||
| </> | ||
| ); | ||
| }; | ||
|
|
||
| export default Background; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,36 @@ | ||
| import { GoogleIcon, KakaoIcon, NaverIcon, StampIcon } from '@/assets/icons'; | ||
|
|
||
| import Background from './components/Background'; | ||
|
|
||
| const LoginPage = () => { | ||
| return <div>LoginPage</div>; | ||
| return ( | ||
| <> | ||
| <main className="mt-10 flex grow flex-col items-center justify-between"> | ||
| <section className="relative mt-10 text-center"> | ||
| <StampIcon className="absolute -top-2 -right-0.5 -translate-y-1/2 translate-x-1/2" /> | ||
| <h2 className="text-xl leading-[24px] font-medium tracking-[-1px]">마음이 맞닿는 온도</h2> | ||
| <h1 className="font-malang my-2 text-5xl leading-[57.6px] text-[#F15847]">36.5</h1> | ||
| <p className="body-sb text-gray-60"> | ||
| 모르는 사람과 편지를 주고 받으며 | ||
| <br /> | ||
| 마음의 위안을 얻어보세요. | ||
| </p> | ||
| </section> | ||
| <Background /> | ||
| <section className="relative flex gap-4 pb-[4%]"> | ||
| <button type="button" className="rounded-full bg-[#03C75A] p-3.5"> | ||
| <NaverIcon /> | ||
| </button> | ||
| <button type="button" className="rounded-full bg-[#FEE500] p-3.5"> | ||
| <KakaoIcon /> | ||
| </button> | ||
| <button type="button" className="border-gray-5 rounded-full border bg-white p-3.5"> | ||
| <GoogleIcon /> | ||
| </button> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 접근성 향상을 위해
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 오 아주 좋습니당~ 적용해볼게요! |
||
| </section> | ||
| </main> | ||
| </> | ||
| ); | ||
| }; | ||
|
|
||
| export default LoginPage; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 오 제가 layer 같은 @ 사용법을 잘 몰라서 그런데 @들은 전부 독립적으로 사용해야 하는건가용??
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @는 저도 필요할 때만 쓰는지라 잘 몰라요ㅎㅎㅎㅎ 물론 큰 차이가 없을 것 같긴 하지만, 뒤늦게 제 코드에 타당성을 부여해보자면....ㅎㅎㅎ 근데 뭐 그거나 그거나긴 하겠죠..?ㅎㅎㅎㅎㅎ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,32 @@ | ||
| @font-face { | ||
| font-family: 'KyoboHandwriting2020A'; | ||
| src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/[email protected]/KyoboHandwriting2020A.woff') | ||
| format('woff'); | ||
| font-weight: normal; | ||
| font-style: normal; | ||
| } | ||
| @font-face { | ||
| font-family: 'iceHimchan-Rg'; | ||
| src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/[email protected]/iceHimchan-Rg.woff2') | ||
| format('woff2'); | ||
| font-weight: normal; | ||
| font-style: normal; | ||
| } | ||
| @font-face { | ||
| font-family: 'Gyeonggi_Batang_Regular'; | ||
| src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/[email protected]/Batang_Regular.woff') | ||
| format('woff'); | ||
| font-weight: 400; | ||
| font-style: normal; | ||
| } | ||
| @font-face { | ||
| font-family: 'HancomMalangMalang'; | ||
| src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/[email protected]/HancomMalangMalang-Bold.woff2') | ||
| format('woff2'); | ||
| font-weight: 700; | ||
| font-style: normal; | ||
| } | ||
|
|
||
| @layer base { | ||
| /* 폰트들 */ | ||
| .pretendard { | ||
|
|
@@ -12,25 +41,4 @@ | |
| .batang { | ||
| font-family: 'Gyeonggi_Batang_Regular'; | ||
| } | ||
| @font-face { | ||
| font-family: 'KyoboHandwriting2020A'; | ||
| src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/[email protected]/KyoboHandwriting2020A.woff') | ||
| format('woff'); | ||
| font-weight: normal; | ||
| font-style: normal; | ||
| } | ||
| @font-face { | ||
| font-family: 'iceHimchan-Rg'; | ||
| src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/[email protected]/iceHimchan-Rg.woff2') | ||
| format('woff2'); | ||
| font-weight: normal; | ||
| font-style: normal; | ||
| } | ||
| @font-face { | ||
| font-family: 'Gyeonggi_Batang_Regular'; | ||
| src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/[email protected]/Batang_Regular.woff') | ||
| format('woff'); | ||
| font-weight: 400; | ||
| font-style: normal; | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,6 @@ | |
|
|
||
| @layer base { | ||
| :root { | ||
| --body-bg-color: var(--color-white); | ||
| --vh: 1vh; | ||
| --vw: 1vw; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,4 +30,6 @@ | |
| --color-primary-5: #fffbf8; | ||
|
|
||
| --color-default-bg: #fffbf8; | ||
|
|
||
| --font-malang: 'HancomMalangMalang'; | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
앗 저랑 겹치는 이미지가 있네요!