Skip to content

Commit 0a34498

Browse files
committed
design: 랜딩페이지 퍼블리싱
1 parent f39424a commit 0a34498

File tree

5 files changed

+80
-1
lines changed

5 files changed

+80
-1
lines changed

src/App.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Route, Routes } from 'react-router';
33
import useViewport from './hooks/useViewport';
44
import Layout from './layouts/Layout';
55
import Home from './pages/Home';
6+
import Landing from './pages/Landing';
67
import LetterBoardPage from './pages/LetterBoard';
78
import LetterBoardDetailPage from './pages/LetterBoardDetail';
89
import LetterBoxPage from './pages/LetterBox';
@@ -24,6 +25,7 @@ const App = () => {
2425
<Route>
2526
<Route index element={<Home />} />
2627
<Route path="login" element={<LoginPage />} />
28+
<Route path="landing" element={<Landing />} />
2729
<Route path="onboarding" element={<OnboardingPage />} />
2830
<Route path="letter">
2931
<Route element={<Layout />}>

src/assets/images/landing.png

581 KB
Loading
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
export const STYLE_CLASS = [
2+
{
3+
imagePosition: 'left-[calc(50%-200px)]',
4+
mask: 'bottom-27 left-[calc(50%+65px)]',
5+
circle: 'h-40 w-40',
6+
textPosition: '-top-20 left-[calc(50%-30px)] text-right',
7+
description:
8+
'따뜻한 편지 사례들을 모아 볼 수 있어요.\n응원이 필요한 사람들에게\n단체로 롤링페이퍼를 쓸 수도 있습니다.',
9+
},
10+
{
11+
imagePosition: 'left-[calc(50%-200px)]',
12+
mask: 'bottom-5 left-[calc(50%-75px)]',
13+
circle: 'h-40 w-40',
14+
textPosition: '-top-14 left-[calc(50%+40px)] text-left',
15+
description: '주고받은 편지 내역을 확인해 보세요.\n보는 것 만으로도 마음이 따뜻해집니다.',
16+
},
17+
{
18+
imagePosition: 'left-[calc(50%+130px)]',
19+
mask: 'bottom-8 left-[calc(50%)]',
20+
circle: 'h-65 w-65',
21+
textPosition: '-top-14 left-1/2 text-center',
22+
description:
23+
'모르는 사람에게 고민을 털어 놓아 보세요.\n다른 사람에게도 위로, 응원, 축하를 보낼 수 있어요.',
24+
},
25+
];

src/pages/Landing/index.tsx

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import { useState } from 'react';
2+
import { Navigate } from 'react-router';
3+
import { twMerge } from 'tailwind-merge';
4+
5+
import LandingImg from '@/assets/images/landing.png';
6+
7+
import { STYLE_CLASS } from './constants';
8+
9+
const Landing = () => {
10+
const [step, setStep] = useState(0);
11+
12+
if (step === 3) return <Navigate to="/login" />;
13+
14+
return (
15+
<main
16+
className="relative flex grow justify-center overflow-hidden"
17+
onClick={() => setStep((prev) => prev + 1)}
18+
>
19+
<img
20+
src={LandingImg}
21+
alt="서비스 소개 이미지"
22+
className={twMerge(
23+
'absolute bottom-0 h-70 w-auto max-w-none -translate-x-1/2 transition-all duration-200',
24+
STYLE_CLASS[step].imagePosition,
25+
)}
26+
/>
27+
<section
28+
className={twMerge(
29+
'fixed z-1 -translate-x-1/2 transition-all duration-200',
30+
STYLE_CLASS[step].mask,
31+
)}
32+
>
33+
<p
34+
className={twMerge(
35+
'body-sb absolute z-2 w-max -translate-x-1/2 whitespace-pre-wrap text-white transition-all duration-200',
36+
STYLE_CLASS[step].textPosition,
37+
)}
38+
>
39+
{STYLE_CLASS[step].description}
40+
</p>
41+
<div
42+
className={twMerge(
43+
'rounded-full shadow-[0_0_0_9999px_rgba(0,0,0,0.5)]',
44+
STYLE_CLASS[step].circle,
45+
)}
46+
/>
47+
</section>
48+
</main>
49+
);
50+
};
51+
52+
export default Landing;

src/pages/Login/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const LoginPage = () => {
1717
</p>
1818
</section>
1919
<Background />
20-
<section className="relative flex gap-4 pb-[5%]">
20+
<section className="relative flex gap-4 pb-[4%]">
2121
<button type="button" className="rounded-full bg-[#03C75A] p-3.5">
2222
<NaverIcon />
2323
</button>

0 commit comments

Comments
 (0)