Skip to content

Commit 43a939e

Browse files
committed
main-page Upload
1 parent 829a559 commit 43a939e

File tree

3 files changed

+103
-150
lines changed

3 files changed

+103
-150
lines changed

src/pages/main-page.jsx

Lines changed: 103 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,7 @@ import cardImg1 from '../assets/ld-img01.png';
55
import cardImg2 from '../assets/ld-img02.png';
66
import cardImg3 from '../assets/ld-img03.png';
77
import styled from 'styled-components';
8-
// import { Link } from 'react-router-dom';
9-
10-
const CardContainerImage = styled.div`
11-
display: flex;
12-
gap: 16px;
13-
border-radius: 6px;
14-
background-color: #f6f8ff;
15-
padding: 20px;
16-
align-items: center;
17-
`;
18-
19-
const CardImage = styled.img`
20-
width: 205px;
21-
height: 162px;
22-
border-radius: 6px;
23-
object-fit: cover;
24-
margin: 0 10px;
25-
@media (max-width: 767px) {
26-
width: 100%;
27-
height: auto;
28-
}
29-
`;
8+
import { Link } from 'react-router-dom';
309

3110
const Content = styled.div`
3211
width: 100%;
@@ -51,23 +30,102 @@ const ContentDetail = styled.div`
5130
}
5231
`;
5332

33+
const CardContainer = styled.div`
34+
display: flex;
35+
align-items: left;
36+
justify-content: space-between;
37+
background-color: #f6f8ff;
38+
padding: 30px;
39+
gap: 40px;
40+
41+
/* Mobile */
42+
@media (max-width: 767px) {
43+
flex-direction: column;
44+
padding: 30px 20px;
45+
text-align: center;
46+
gap: 16px;
47+
}
48+
`;
49+
50+
const CardContainerImage = styled.div`
51+
display: flex;
52+
position: relative;
53+
width: 100%;
54+
max-width: 720px;
55+
gap: 0px;
56+
background-color: #f6f8ff;
57+
58+
/* Mobile */
59+
@media (max-width: 768px) {
60+
max-width: 100%;
61+
height: 250px;
62+
margin-top: 20px;
63+
}
64+
`;
65+
66+
const EmojiContainerImage = styled.div`
67+
display: flex;
68+
gap: 10px;
69+
border-radius: 6px;
70+
background-color: #f6f8ff;
71+
padding: 20px;
72+
align-items: center;
73+
`;
74+
75+
const CardImage = styled.img`
76+
width: 205px;
77+
height: 162px;
78+
border-radius: 12px;
79+
box-shadow: 0 0px 0px rgba(0, 0, 0, 0.1);
80+
object-fit: cover;
81+
margin: 0px auto;
82+
83+
/* Mobile */
84+
@media (max-width: 767px) {
85+
&:nth-child(1) {
86+
width: 65%;
87+
top: 0;
88+
left: 50%;
89+
}
90+
&:nth-child(2) {
91+
width: 70%;
92+
bottom: 0;
93+
right: unset;
94+
left: 50%;
95+
}
96+
&:nth-child(3) {
97+
width: 70%;
98+
bottom: 0;
99+
right: unset;
100+
left: 50%;
101+
}
102+
}
103+
`;
104+
105+
const EmojiContainer = styled.div`
106+
display: flex;
107+
background-color: #f6f8ff;
108+
`;
109+
110+
const PointBadge = styled.div`
111+
background-color: #7f00ff;
112+
padding: 6px 10px;
113+
border-radius: 50px;
114+
color: white;
115+
font-size: 14px;
116+
text-align: center;
117+
width: fit-content;
118+
`;
119+
54120
function MainPage() {
55121
return (
56122
<Content>
57123
<ContentDetail>
58-
<div className="CardContainer">
124+
<CardContainer>
59125
<div className="CardContainerText">
60-
<button className="cta-button">
61-
<label
62-
style={{
63-
fontSize: '14px',
64-
color: '#ffffff',
65-
buttonSpacing: '2px',
66-
}}
67-
>
68-
Point. 01
69-
</label>
70-
</button>
126+
<div style={{ margin: '0px', display: 'flex', gap: '0px' }}>
127+
<PointBadge>Point. 01</PointBadge>
128+
</div>
71129
<h2>누구나 손쉽게, 온라인 롤링페이퍼를 만들 수 있어요</h2>
72130
<p>로그인 없이 자유롭게 만들어요.</p>
73131
</div>
@@ -76,18 +134,21 @@ function MainPage() {
76134
<CardImage src={cardImg2} alt="ld-img02.png" />
77135
<CardImage src={cardImg3} alt="ld-img03.png" />
78136
</CardContainerImage>
79-
</div>
80-
<div className="EmojiContainer">
81-
<CardContainerImage>
137+
</CardContainer>
138+
<EmojiContainer>
139+
<EmojiContainerImage>
82140
<div className="EmojiContainerImage">
83141
<img src={emojiImg} alt="올이모지" />
84142
</div>
85143
<div className="EmojiContainerText">
144+
<div style={{ margin: '0px', display: 'flex', gap: '0px' }}>
145+
<PointBadge>Point. 02</PointBadge>
146+
</div>
86147
<h2>서로에게 이모지로 감정을 표현해보세요</h2>
87148
<p>롤링 페이지에 이모지를 추가할 수 있어요.</p>
88149
</div>
89-
</CardContainerImage>
90-
</div>
150+
</EmojiContainerImage>
151+
</EmojiContainer>
91152
</ContentDetail>
92153
<div
93154
className="Footer"
@@ -98,7 +159,9 @@ function MainPage() {
98159
backgroundColor: '#ffffff',
99160
}}
100161
>
101-
<button className="cta-button">구경해 보기</button>
162+
<Link to="/list">
163+
<button className="cta-button">구경해 보기</button>
164+
</Link>
102165
</div>
103166
</Content>
104167
);

src/pages/main-page_01.jsx

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/pages/main-page_02.jsx

Lines changed: 0 additions & 95 deletions
This file was deleted.

0 commit comments

Comments
 (0)