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

반응형 디자인 수정 #562

Merged
merged 8 commits into from
Sep 20, 2023
5 changes: 2 additions & 3 deletions frontend/src/components/ConfirmModal/ConfirmModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { styled } from 'styled-components';
import useViewport from '@/hooks/useViewport';

interface Props {
contents: string;
contents: React.ReactNode;
closeModal: () => void;
handleClickConfirmButton: () => void;
confirmText?: string;
Expand Down Expand Up @@ -72,9 +72,8 @@ const S = {
ConfirmMessage: styled.p`
margin-bottom: 40px;

font-size: 18px;

white-space: pre-wrap;
line-height: 1.5;
`,

ButtonContainer: styled.div`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const S = {
display: flex;
justify-content: space-between;

min-width: 360px;
min-width: 340px;
width: 100%;
height: max-content;
padding: 35px 40px;
Expand Down
123 changes: 76 additions & 47 deletions frontend/src/components/common/Spinner/Spinner.tsx
Original file line number Diff line number Diff line change
@@ -1,59 +1,88 @@
import React from 'react';
import styled from 'styled-components';

const Spinner = () => {
return (
<S.SpinnerWrapper>
<div>
<span>/</span>
</div>
</S.SpinnerWrapper>
<SpinnerContainer>
<LessThan />
<Slash />
<GreaterThan />
</SpinnerContainer>
);
};

export default Spinner;

const S = {
SpinnerWrapper: styled.div`
div {
color: var(--baton-red);
font-family: Consolas, Menlo, Monaco, monospace;
font-weight: 900;
font-size: 120px;
opacity: 0.9;

@media (max-width: 768px) {
font-size: 78px;
}
const SpinnerContainer = styled.div`
display: flex;
align-items: center;
`;
const LessThan = styled.div`
position: relative;
width: 45px;
height: 35px;
&::before {
content: ' ';
position: absolute;
width: 27px;
height: 12px;
border-radius: 1.5px;
background-color: var(--baton-red);
transform: skew(0, -33deg);
@media (min-width: 768px) {
width: 42px;
height: 15px;
}
div:before {
content: '<';
display: inline-block;
animation: pulse 0.6s alternate infinite ease-in-out;
}
&::after {
content: ' ';
position: absolute;
top: 21px;
width: 27px;
height: 12px;
border-radius: 1.5px;
background-color: var(--baton-red);
transform: skew(0, 33deg);
@media (min-width: 768px) {
top: 29px;
width: 42px;
height: 14px;
}
div:after {
content: '>';
display: inline-block;
animation: pulse 0.6s 0.3s alternate infinite ease-in-out;
}
animation: pulseLess 0.6s alternate infinite ease-in-out;
@keyframes pulseLess {
to {
opacity: 0.7;
transform: scale(1.2);
}

span {
font-size: 112px;
font-weight: 900;

margin: 0 8px;
animation: pulse 0.6s 0.3s alternate infinite ease-in-out;

@media (max-width: 768px) {
font-size: 74px;
}
}
@media (min-width: 768px) {
width: 65px;
height: 40px;
}
`;
const GreaterThan = styled(LessThan)`
transform: scaleX(-1);
animation: pulseGreater 0.6s 0.3s alternate infinite ease-in-out;
@keyframes pulseGreater {
to {
opacity: 0.7;
transform: scaleX(-1) scale(1.2);
}

@keyframes pulse {
to {
transform: scale(1.2);
opacity: 0.8;
}
}
`;
const Slash = styled.div`
width: 9.5px;
height: 65px;
border-radius: 1.5px;
background-color: var(--gray-800);
transform: skew(-18deg);
animation: pulseSlash 0.6s 0.3s alternate infinite ease-in-out;
@keyframes pulseSlash {
to {
opacity: 0.7;
transform: skew(-18deg);
}
`,
};
}
@media (min-width: 768px) {
width: 13px;
height: 93px;
}
`;
50 changes: 39 additions & 11 deletions frontend/src/pages/LoginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const S = {
align-items: center;
justify-content: center;
flex-direction: column;
gap: 30px;
gap: 45px;

height: calc(100vh - 80px);
min-height: 570px;
Expand All @@ -44,10 +44,13 @@ const S = {
`,

Logo: styled.img`
width: 300px;
height: 80px;
height: 45px;

cursor: pointer;

@media (max-width: 768px) {
height: 35px;
}
`,

LoginBoxContainer: styled.div`
Expand All @@ -57,27 +60,41 @@ const S = {
gap: 37px;

width: 450px;
min-height: 400px;
padding: 35px;
border-radius: 10px;
border: 1px solid var(--gray-700);
box-shadow: 1px 1px 3px #333333;

@media (max-width: 768px) {
width: 340px;

padding: 35px 20px;
}
`,

LoginBoxText: styled.div`
font-weight: 700;
font-size: 18px;

@media (max-width: 768px) {
font-size: 15px;
}
`,

LoginBoxGithubIcon: styled.img`
width: 180px;
height: 180px;

@media (max-width: 768px) {
width: 120px;
height: 120px;
}
`,

LoginButton: styled.a`
display: flex;
justify-content: space-between;
justify-content: center;
align-items: center;
gap: 6px;
gap: 12px;

width: 370px;
height: 60px;
Expand All @@ -91,15 +108,26 @@ const S = {
font-size: 14px;

cursor: pointer;

@media (max-width: 768px) {
width: 260px;
height: 55px;

padding: 0 20px;
}
`,

LoginButtonIcon: styled.img`
width: 35px;
height: 35px;
width: 30px;
height: 30px;

@media (max-width: 768px) {
width: 20px;
height: 20px;
}
`,

LoginButtonText: styled.div`
font-size: 19px;
margin-right: 40px;
font-size: 18px;
`,
};
2 changes: 1 addition & 1 deletion frontend/src/pages/MainPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ const S = {
margin-bottom: 20px;

@media (max-width: 768px) {
min-width: 360px;
min-width: 340px;
}
`,

Expand Down
22 changes: 17 additions & 5 deletions frontend/src/pages/NoticePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,17 @@ const NoticePage = () => {

{isConfirmModalOpen && (
<ConfirmModal
contents={`${selectedLanguage} 미션을 선택하셨습니다.

확인을 누르시면 ${profileName}님의 깃허브 아이디로 브랜치가 생성됩니다.`}
contents={
<>
<p>
<S.highlightSpan>{selectedLanguage} 미션을 선택</S.highlightSpan>하셨습니다.
</p>
<p>
확인을 누르시면 <S.highlightSpan>{profileName}님의 깃허브 아이디로 브랜치가 생성</S.highlightSpan>
됩니다.
</p>
</>
}
closeModal={closeConfirmModal}
handleClickConfirmButton={handleClickStartButton}
/>
Expand Down Expand Up @@ -315,8 +323,8 @@ const S = {
margin: 0 auto;

@media (max-width: 768px) {
width: 350px;
height: 123px;
width: 320px;
height: 112px;
}
`,

Expand Down Expand Up @@ -395,6 +403,10 @@ const S = {
font-size: 12px;
}
`,

highlightSpan: styled.span`
font-weight: 700;
`,
};

export default NoticePage;
12 changes: 9 additions & 3 deletions frontend/src/pages/RunnerPostDetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ const RunnerPostPage = () => {
<S.RightSideContainer>
<Button
colorTheme="BLACK"
width={isMobile ? '125px' : '150px'}
width={isMobile ? '130px' : '150px'}
fontSize={isMobile ? '14px' : ''}
fontWeight={700}
>
Expand All @@ -208,7 +208,7 @@ const RunnerPostPage = () => {
{runnerPost.isOwner || runnerPost.isApplied || runnerPost.reviewStatus !== 'NOT_STARTED' ? null : (
<Button
colorTheme="WHITE"
width={isMobile ? '125px' : '150px'}
width={isMobile ? '130px' : '150px'}
fontSize={isMobile ? '14px' : ''}
fontWeight={700}
onClick={openMessageModal}
Expand All @@ -220,7 +220,13 @@ const RunnerPostPage = () => {
</S.BottomContentContainer>
</S.PostBodyContainer>
<S.PostFooterContainer>
<Button colorTheme="GRAY" fontSize={isMobile ? '14px' : ''} fontWeight={700} onClick={goBack}>
<Button
width={isMobile ? '100%' : '180px'}
colorTheme="GRAY"
fontSize={isMobile ? '14px' : ''}
fontWeight={700}
onClick={goBack}
>
목록
</Button>
</S.PostFooterContainer>
Expand Down