Skip to content
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

[FE] feature: 리뷰 연결, 목록, 상세 페이지의 반응형 레이아웃 구현 #630

Merged
merged 19 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
a20059c
feat: ReviewZonePage 미디어 쿼리 적용
ImxYJL Sep 16, 2024
0f7ed91
feat: Footer에 미디어 쿼리 적용
ImxYJL Sep 16, 2024
72b1de0
refactor: ReviewGuide 사이즈 조절
ImxYJL Sep 16, 2024
e2a5f33
feat: 리뷰미 Topbar 로고에 미디어 쿼리 적용
ImxYJL Sep 16, 2024
5678c99
feat: PasswordModal에 미디어 쿼리 적용
ImxYJL Sep 16, 2024
1ad4bad
feat: ContentModal에 미디어 쿼리 적용
ImxYJL Sep 16, 2024
85af5c6
refactor: AlertModal의 확인 버튼 minWidth를 % 단위로 수정
ImxYJL Sep 17, 2024
2566f73
feat: DetailedReviewPage에 반응형 도입
ImxYJL Sep 17, 2024
b9a203c
feat: ReviewListPage에 반응형 도입
ImxYJL Sep 17, 2024
b608466
refactor: DetailedReviewPage의 Description에 반응형 padding 추가
ImxYJL Sep 17, 2024
4b8a72d
Merge branch 'develop' of https://github.com/woowacourse-teams/2024-r…
ImxYJL Sep 19, 2024
ddb2ac7
refactor: 변경된 media 유틸 형식에 맞게 미디어 쿼리 코드 수정 및 사이즈 내림차순 정렬
ImxYJL Sep 19, 2024
fae8bba
refactor: 누락된 파일 업로드
ImxYJL Sep 19, 2024
2e1dfec
refactor: ContentModal에 스타일 prop 추가
ImxYJL Sep 19, 2024
2211c1d
refactor: PasswordModal 스타일 수정 - maxWidth 설정 및 디테일 조절
ImxYJL Sep 19, 2024
e0f5bae
fix: 공통 컴포넌트인 ContentModal에서 특정 모달 스타일을 위한 코드 제거
ImxYJL Sep 19, 2024
b2393e8
Merge branch 'develop' of https://github.com/woowacourse-teams/2024-r…
ImxYJL Sep 19, 2024
af0b8f1
refactor: ContentModal에 style prop 추가
ImxYJL Sep 19, 2024
db84c18
refactor: ContentModal의 미디어 쿼리 적용에 따른 padding 감소를 무효화하기 위한 PasswordMo…
ImxYJL Sep 19, 2024
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
10 changes: 8 additions & 2 deletions frontend/src/components/ReviewCard/styles.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import styled from '@emotion/styled';

import media from '@/utils/media';

export const Layout = styled.div`
display: flex;
flex-direction: column;

width: 100%;

border: 0.1rem solid ${({ theme }) => theme.colors.lightGray};
border-radius: 0.8rem;

Expand All @@ -24,6 +24,7 @@ export const Header = styled.div`
justify-content: space-between;

height: 6rem;

padding: 1rem 3rem;

background-color: ${({ theme }) => theme.colors.lightGray};
Expand Down Expand Up @@ -79,6 +80,11 @@ export const Keyword = styled.div`
display: flex;
flex-wrap: wrap;
gap: 2.5rem;

${media.small} {
gap: 1.6rem;
}

align-items: center;

font-size: 1.4rem;
Expand Down
8 changes: 5 additions & 3 deletions frontend/src/components/common/ReviewDate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ const ReviewDate = ({ date, dateTitle }: ReviewDateProps) => {
const { year, month, day } = formatDate(date);
return (
<S.ReviewDate>
<S.ClockImg src={ClockIcon} alt="시계 아이콘" />
<span>{dateTitle}</span>
<S.Colon>:</S.Colon>
<S.ReviewDateText>
<S.ClockImg src={ClockIcon} alt="시계 아이콘" />
<span>{dateTitle}</span>
<S.Colon>:</S.Colon>
</S.ReviewDateText>
<span>
{year}-{month}-{day}
</span>
Expand Down
17 changes: 16 additions & 1 deletion frontend/src/components/common/ReviewDate/styles.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
import styled from '@emotion/styled';

import media from '@/utils/media';

export const ReviewDateText = styled.div`
display: inline-flex;
align-items: center;
justify-content: center;

${media.small} {
display: none;
}
`;

export const ClockImg = styled.img`
width: auto;
height: 1.6rem;
Expand All @@ -9,7 +21,10 @@ export const ClockImg = styled.img`
export const ReviewDate = styled.div`
display: flex;
align-items: center;
font-size: 1.6rem;

${media.xSmall} {
font-size: ${({ theme }) => theme.fontSize.small};
}
`;

export const Colon = styled.span`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const AlertModal = ({
<Button
styleType={closeButton.type}
onClick={closeButton.handleClick}
style={{ width: '100%', minWidth: '30rem', height: '4rem' }}
style={{ width: '100%', minWidth: '30%', height: '4rem' }}
>
{closeButton.content}
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import ModalPortal from '../ModalPortal';

import * as S from './styles';

interface ContentModalProps {
export interface ContentModalStyleProps {
$style?: React.CSSProperties;
}

interface ContentModalProps extends ContentModalStyleProps {
title?: string;
handleClose: () => void;
isClosableOnBackground?: boolean;
Expand All @@ -16,12 +20,13 @@ const ContentModal = ({
title,
handleClose,
children,
$style,
isClosableOnBackground = true,
}: EssentialPropsWithChildren<ContentModalProps>) => {
return (
<ModalPortal>
<ModalBackground closeModal={isClosableOnBackground ? handleClose : null}>
<S.ContentModalContainer>
<S.ContentModalContainer style={$style}>
<S.ContentModalHeader>
<S.Title>{title}</S.Title>
<S.CloseButton onClick={handleClose}>
Expand Down
21 changes: 17 additions & 4 deletions frontend/src/components/common/modals/ContentModal/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import styled from '@emotion/styled';

import media from '@/utils/media';

export const ContentModalContainer = styled.div`
import { ContentModalStyleProps } from '.';

export const ContentModalContainer = styled.div<ContentModalStyleProps>`
position: fixed;
top: 50%;
left: 50%;
Expand All @@ -11,8 +13,6 @@ export const ContentModalContainer = styled.div`
overflow: hidden;
display: flex;
flex-direction: column;
gap: 2rem;
align-items: center;

min-width: 30rem;
max-width: ${({ theme }) => theme.contentModalSize.maxWidth};
Expand All @@ -25,20 +25,33 @@ export const ContentModalContainer = styled.div`
${media.xSmall} {
padding: ${({ theme }) => theme.contentModalSize.smallPadding};
}

${({ $style }) => $style && { ...$style }}
`;

export const ContentModalHeader = styled.div`
display: flex;
gap: 2rem;
gap: 8rem;

${media.small} {
gap: 5rem;
}

align-items: center;
justify-content: space-between;

width: 100%;
height: 3rem;
margin-bottom: 1.5rem;
`;

export const Title = styled.span`
font-size: 1.8rem;

${media.small} {
font-size: 1.6rem;
}

font-weight: ${({ theme }) => theme.fontWeight.bold};
`;

Expand Down
9 changes: 9 additions & 0 deletions frontend/src/components/layouts/Footer/style.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import styled from '@emotion/styled';

import media from '@/utils/media';

export const Footer = styled.footer`
position: absolute;
bottom: 0;
Expand All @@ -18,6 +20,13 @@ export const Footer = styled.footer`
color: ${({ theme }) => theme.colors.gray};

background-color: ${({ theme }) => theme.colors.white};

${media.medium} {
font-size: 1.2rem;

flex-direction: column;
gap: 0.2rem;
}
`;

export const Link = styled.a`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import styled from '@emotion/styled';

import media from '@/utils/media';

export const Logo = styled.div`
display: flex;
gap: 0.5rem;
Expand All @@ -22,6 +24,15 @@ export const LogoText = styled.div`

span {
font-size: 3rem;

${media.small} {
font-size: 2.8rem;
}

${media.xSmall} {
font-size: 2.6rem;
}

font-weight: ${({ theme }) => theme.fontWeight.bolder};
letter-spacing: 0.7rem;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
import styled from '@emotion/styled';

import media from '@/utils/media';

export const DetailedReviewPageContents = styled.div`
width: ${({ theme }) => theme.formWidth};
border: 0.1rem solid ${({ theme }) => theme.colors.lightPurple};
border-radius: ${({ theme }) => theme.borderRadius.basic};

width: 70%;
margin-top: 2rem;

${media.medium} {
width: 80%;
}

${media.small} {
width: 92%;
}
`;

export const ReviewContentContainer = styled.div`
margin-bottom: 7rem;
padding: 0 4rem;

${media.xSmall} {
padding: 0 2rem;
}
`;
Original file line number Diff line number Diff line change
@@ -1,49 +1,65 @@
import styled from '@emotion/styled';

import media from '@/utils/media';

export const Description = styled.section`
display: flex;
align-items: center;
justify-content: space-between;

width: 100%;
height: 9rem;
margin: 0;
padding: 1rem 3rem;

${media.xSmall} {
padding: 1rem 1.2rem;
}

background-color: ${({ theme }) => theme.colors.lightPurple};
border-radius: ${({ theme }) => theme.borderRadius.basic} 0 0;
`;

export const DescriptionSide = styled.div`
display: flex;
width: 100%;
flex-wrap: wrap;
`;

//NOTE: 6rem :깃헙 로고 사이즈
export const ProjectInfoContainer = styled.div`
display: flex;
flex-direction: column;
justify-content: flex-start;

/* width: calc(100% - 6rem); */
width: 100%;
margin: 0 1rem;
`;

export const ProjectName = styled.p`
margin-top: 0;
font-size: ${({ theme }) => theme.fontSize.medium};

${media.xSmall} {
font-size: ${({ theme }) => theme.fontSize.mediumSmall};
}

font-weight: ${({ theme }) => theme.fontWeight.bold};
`;

export const RevieweeNameAndDateContainer = styled.div`
display: flex;
align-items: center;
justify-content: space-between;

width: 100%;

font-size: ${({ theme }) => theme.fontSize.basic};

${media.small} {
flex-direction: column;
}

${media.xSmall} {
font-size: ${({ theme }) => theme.fontSize.small};
}
`;

export const RevieweeNameWrapper = styled.p`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import styled from '@emotion/styled';

import media from '@/utils/media';

export const Layout = styled.div`
display: flex;
flex-direction: column;
gap: 4rem;
width: ${({ theme }) => theme.formWidth};

${media.medium} {
gap: 2rem;
}

width: 90%;
`;

export const ReviewSection = styled.div`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,42 @@
import styled from '@emotion/styled';

import media from '@/utils/media';

export const ReviewInfoContainer = styled.div`
display: flex;
flex-direction: column;

margin-top: 2rem;
margin-left: 1rem;
`;

export const ProjectName = styled.span`
font-size: ${({ theme }) => theme.fontSize.large};
font-weight: ${({ theme }) => theme.fontWeight.semibold};

${media.medium} {
font-size: 3rem;
}

${media.small} {
font-size: 2.8rem;
}

${media.xSmall} {
font-size: 2.6rem;
}
`;

export const RevieweeInfoWrapper = styled.div`
font-size: ${({ theme }) => theme.fontSize.mediumSmall};

${media.medium} {
font-size: ${({ theme }) => theme.fontSize.basic};
}

${media.xSmall} {
font-size: ${({ theme }) => theme.fontSize.small};
}
`;

export const RevieweeName = styled.span`
Expand Down
Loading