Skip to content

Commit 6391faa

Browse files
authored
Merge pull request #403 from LEEJW1953/fe-main
[Feature] 메인페이지 반응형 UI 개선
2 parents d15d015 + 5d7ece6 commit 6391faa

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

app/frontend/src/pages/Main/index.css.ts

+17-7
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import { style } from '@vanilla-extract/css';
33
import { vars, fontStyle } from '@/styles';
44

55
export const container = style({
6-
position: 'relative',
76
display: 'flex',
7+
flexDirection: 'column',
88
margin: '0 auto',
9-
width: '104rem',
9+
maxWidth: '104rem',
1010
height: '81.7rem',
1111
color: vars.color.grayscale400,
1212
background: vars.color.grayscaleWhite,
@@ -19,9 +19,9 @@ export const login = style({
1919
});
2020

2121
export const mainImage = style({
22-
width: '69.7rem',
23-
height: '69.7rem',
24-
alignSelf: 'flex-end',
22+
width: '100%',
23+
maxWidth: '69.7rem',
24+
maxHeight: '69.7rem',
2525
objectFit: 'contain',
2626
});
2727

@@ -31,12 +31,16 @@ export const text = style([
3131
color: vars.color.grayscale400,
3232
textAlign: 'right',
3333
lineHeight: '3.5rem',
34+
35+
'@media': {
36+
'screen and (max-width:768px)': {
37+
fontSize: '1.8rem',
38+
},
39+
},
3440
},
3541
]);
3642

3743
export const textArea = style({
38-
position: 'absolute',
39-
right: '0',
4044
display: 'flex',
4145
flexDirection: 'column',
4246
alignItems: 'flex-end',
@@ -50,5 +54,11 @@ export const title = style([
5054
justifyContent: 'center',
5155
textAlign: 'center',
5256
color: vars.color.morakGreen,
57+
58+
'@media': {
59+
'screen and (max-width:768px)': {
60+
fontSize: '4.8rem',
61+
},
62+
},
5363
},
5464
]);

app/frontend/src/pages/Main/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export function MainPage() {
1515

1616
return (
1717
<div className={styles.container}>
18-
<img src={MAIN_IMAGE} alt="main" className={styles.mainImage} />
1918
<div className={styles.textArea}>
2019
<div className={styles.title}>morak</div>
2120
<div className={styles.text}>
@@ -38,6 +37,7 @@ export function MainPage() {
3837
)}
3938
</div>
4039
</div>
40+
<img src={MAIN_IMAGE} alt="main" className={styles.mainImage} />
4141
</div>
4242
);
4343
}

0 commit comments

Comments
 (0)