Skip to content

[Feature] 메인페이지 반응형 UI 개선 #403

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

Merged
merged 1 commit into from
Dec 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions app/frontend/src/pages/Main/index.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { style } from '@vanilla-extract/css';
import { vars, fontStyle } from '@/styles';

export const container = style({
position: 'relative',
display: 'flex',
flexDirection: 'column',
margin: '0 auto',
width: '104rem',
maxWidth: '104rem',
height: '81.7rem',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

height 빼도 될 것 같아요!

color: vars.color.grayscale400,
background: vars.color.grayscaleWhite,
Expand All @@ -19,9 +19,9 @@ export const login = style({
});

export const mainImage = style({
width: '69.7rem',
height: '69.7rem',
alignSelf: 'flex-end',
width: '100%',
maxWidth: '69.7rem',
maxHeight: '69.7rem',
objectFit: 'contain',
});

Expand All @@ -31,12 +31,16 @@ export const text = style([
color: vars.color.grayscale400,
textAlign: 'right',
lineHeight: '3.5rem',

'@media': {
'screen and (max-width:768px)': {
fontSize: '1.8rem',
},
},
},
]);

export const textArea = style({
position: 'absolute',
right: '0',
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-end',
Expand All @@ -50,5 +54,11 @@ export const title = style([
justifyContent: 'center',
textAlign: 'center',
color: vars.color.morakGreen,

'@media': {
'screen and (max-width:768px)': {
fontSize: '4.8rem',
},
},
},
]);
2 changes: 1 addition & 1 deletion app/frontend/src/pages/Main/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export function MainPage() {

return (
<div className={styles.container}>
<img src={MAIN_IMAGE} alt="main" className={styles.mainImage} />
<div className={styles.textArea}>
<div className={styles.title}>morak</div>
<div className={styles.text}>
Expand All @@ -38,6 +37,7 @@ export function MainPage() {
)}
</div>
</div>
<img src={MAIN_IMAGE} alt="main" className={styles.mainImage} />
</div>
);
}