이준호

[UPDATE] MainPage 반응형 구현 완료

...@@ -24,13 +24,12 @@ const Container = styled.div` ...@@ -24,13 +24,12 @@ const Container = styled.div`
24 display: flex; 24 display: flex;
25 flex-direction: column; 25 flex-direction: column;
26 align-items: center; 26 align-items: center;
27 - justify-content: center; 27 + width: 100vw;
28 - width: 100%;
29 height: 100vh; 28 height: 100vh;
30 background-image: url(${pattern}); 29 background-image: url(${pattern});
31 - background-repeat: none; // background-image가 컨테이너를 가득 채우지 못할 경우에도 반복하지 않는다. 30 + background-repeat: none;
32 - background-size: cover; // 사이즈가 container에 맞지 않아도 꽉 차도록 채운다. 31 + background-size: cover;
33 - background-position: center; // background-image가 컨테이너에 가운데로 오도록 한다. 32 + background-position: center;
34 color: #ffffff; 33 color: #ffffff;
35 `; 34 `;
36 35
...@@ -50,11 +49,9 @@ const MainTitle = styled.div` ...@@ -50,11 +49,9 @@ const MainTitle = styled.div`
50 margin-top: 3rem; 49 margin-top: 3rem;
51 font-size: 5rem; 50 font-size: 5rem;
52 font-weight: bold; 51 font-weight: bold;
53 - ${media.tablet`
54 - font-size: 4rem;
55 - `}
56 ${media.phone` 52 ${media.phone`
57 font-size: 3rem; 53 font-size: 3rem;
54 + margin-top: 2rem;
58 `} 55 `}
59 `; 56 `;
60 57
...@@ -63,6 +60,7 @@ const MainDesc = styled.div` ...@@ -63,6 +60,7 @@ const MainDesc = styled.div`
63 margin-bottom: 2rem; 60 margin-bottom: 2rem;
64 font-size: 1.5rem; 61 font-size: 1.5rem;
65 ${media.tablet` 62 ${media.tablet`
63 + margin-top: 0.5rem;
66 font-size: 1.1rem; 64 font-size: 1.1rem;
67 `} 65 `}
68 `; 66 `;
...@@ -89,7 +87,7 @@ const MainBtn = styled.div` ...@@ -89,7 +87,7 @@ const MainBtn = styled.div`
89 color: #010101; 87 color: #010101;
90 } 88 }
91 ${media.phone` 89 ${media.phone`
92 - width: 20rem; 90 + width: 16rem;
93 height: 4rem; 91 height: 4rem;
94 font-size: 1.2rem; 92 font-size: 1.2rem;
95 `} 93 `}
...@@ -106,7 +104,6 @@ function MainPage({ history }) { ...@@ -106,7 +104,6 @@ function MainPage({ history }) {
106 }, []); 104 }, []);
107 105
108 return ( 106 return (
109 - <>
110 <Container> 107 <Container>
111 <MainTitle>KHUSAT</MainTitle> 108 <MainTitle>KHUSAT</MainTitle>
112 <MainDesc> 109 <MainDesc>
...@@ -116,7 +113,6 @@ function MainPage({ history }) { ...@@ -116,7 +113,6 @@ function MainPage({ history }) {
116 <MainImg src={soldier} /> 113 <MainImg src={soldier} />
117 <MainBtn onClick={onClick}>시작하기</MainBtn> 114 <MainBtn onClick={onClick}>시작하기</MainBtn>
118 </Container> 115 </Container>
119 - </>
120 ); 116 );
121 } 117 }
122 118
......