Skip to content

Commit

Permalink
Merge pull request #21 from EFUB-TEAM4/issue-17
Browse files Browse the repository at this point in the history
#17  [Vote] PC,  Mobile UI
  • Loading branch information
JangAyeon authored Jul 21, 2022
2 parents 4ed3c86 + db99c56 commit 88a787b
Show file tree
Hide file tree
Showing 8 changed files with 468 additions and 10 deletions.
13 changes: 12 additions & 1 deletion src/AppRouter.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
/* eslint-disable import/no-unresolved */
import React from 'react';
import { BrowserRouter, Route, Routes } from 'react-router-dom';
import { Login, Main, Save, Vote, MyPage, SaveRecord } from 'pages';
import {
Login,
Main,
Save,
Vote,
VoteComplete,
MyPage,
SaveRecord,
SaveComplete,
} from 'pages';

function AppRouter() {
return (
Expand All @@ -14,7 +23,9 @@ function AppRouter() {
{/* ์ถ”ํ›„ ๋กœ๊ทธ์ธ ์—ฌ๋ถ€ ํ™•์ธ ๋กœ์ง ํ•„์š” */}

<Route path="/save" element={<Save />} />
<Route path="/complete" element={<SaveComplete />} />
<Route path="/vote" element={<Vote />} />
<Route path="/votecomplete" element={<VoteComplete />} />
<Route path="/mypage" element={<MyPage />} />
<Route path="/mypage/save/:date" element={<SaveRecord />} />
<Route path="/" element={<Main />} />
Expand Down
33 changes: 33 additions & 0 deletions src/pages/Save/SaveComplete/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/* eslint-disable import/no-unresolved */
import React from 'react';
import { SaveBear, WhiteClose } from 'assets';
import {
StyledRoot,
MainText,
ImgBox,
HomeButton,
Text,
ExitButton,
ButtonBox,
} from './style';

function SaveComplete() {
return (
<StyledRoot>
<ButtonBox>
<button type="button">
<ExitButton src={WhiteClose} alt="์ฐฝ ๋‹ซ๊ธฐ ๋ฒ„ํŠผ" />
</button>
</ButtonBox>
<MainText>๋‚ ์”จ ๊ธฐ๋ก์ด ์ €์žฅ๋˜์—ˆ์–ด์š”</MainText>
<ImgBox>
<img src={SaveBear} alt="์ €์žฅํ•˜๋Š” ๊ณฐ๋Œ์ด ์ด๋ฏธ์ง€" />
</ImgBox>
<HomeButton>
<Text>ํ™ˆ์œผ๋กœ ๋Œ์•„๊ฐ€๊ธฐ</Text>
</HomeButton>
</StyledRoot>
);
}

export default SaveComplete;
103 changes: 103 additions & 0 deletions src/pages/Save/SaveComplete/style.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
/* eslint-disable import/no-unresolved */
import styled from 'styled-components';
import { applyMediaQuery } from 'styles/mediaQuery';

const StyledRoot = styled.div`
width: 100vw;
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background: ${({ theme: { color } }) => color.greenDarker};
`;

const ButtonBox = styled.div`
${applyMediaQuery('mobile')} {
button {
margin-bottom: 3rem;
margin-left: 37rem;
}
}
`;

const ExitButton = styled.img`
${applyMediaQuery('desktop')} {
display: none;
}
${applyMediaQuery('mobile')} {
width: 3rem;
height: 3rem;
}
`;

const MainText = styled.p`
font-family: 'Cafe24Ssurround';
font-size: ${({ theme: { font } }) => font.size.large};
color: ${({ theme: { color } }) => color.white};
/* margin-top: 7rem; */
margin-bottom: 5rem;
${applyMediaQuery('mobile')} {
font-size: ${({ theme: { font } }) => font.size.semiLarge};
margin-bottom: 4rem;
}
`;

const ImgBox = styled.div`
display: flex;
align-items: center;
justify-content: center;
width: 40rem;
height: 40rem;
background-color: ${({ theme: { color } }) => color.white};
border-radius: 0.6rem;
margin: 0rem;
img {
width: 92%;
height: 92%;
}
${applyMediaQuery('mobile')} {
width: 40rem;
height: 40rem;
}
`;

const HomeButton = styled.button`
width: 20rem;
height: 5rem;
margin-top: 5rem;
border-radius: 0.6rem;
background-color: ${({ theme: { color } }) => color.white};
${applyMediaQuery('mobile')} {
margin-top: 3rem;
width: 40rem;
height: 5rem;
}
`;

const Text = styled.p`
font-family: 'Cafe24Ssurround';
font-size: ${({ theme: { font } }) => font.size.small};
color: ${({ theme: { color } }) => color.greenDarker};
${applyMediaQuery('mobile')} {
font-family: 'Noto';
font-size: ${({ theme: { font } }) => font.size.small};
font-weight: ${({ theme: { font } }) => font.weight.bold};
}
`;

export {
StyledRoot,
ButtonBox,
ExitButton,
MainText,
ImgBox,
HomeButton,
Text,
};
28 changes: 28 additions & 0 deletions src/pages/Vote/VoteComplete/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* eslint-disable import/no-unresolved */
import React from 'react';
import {
StyledRoot,
MainText,
ContentBox,
Clothes,
Place,
HomeButton,
Text,
} from './style';

function VoteComplete() {
return (
<StyledRoot>
<MainText>ํˆฌํ‘œ๊ฐ€ ๋“ฑ๋ก๋˜์—ˆ์–ด์š”</MainText>
<ContentBox>
<Clothes>์˜ค๋Š˜ ์ฃผ๊ฒฝ๋ฐ”๋ง‰</Clothes>
<Place>์กฐํ˜•์˜ˆ์ˆ ๊ด€์—์„œ ํ—ˆ, ๋ถˆํ—ˆ?</Place>
</ContentBox>
<HomeButton>
<Text>ํ™ˆ์œผ๋กœ ๋Œ์•„๊ฐ€๊ธฐ</Text>
</HomeButton>
</StyledRoot>
);
}

export default VoteComplete;
86 changes: 86 additions & 0 deletions src/pages/Vote/VoteComplete/style.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/* eslint-disable import/no-unresolved */
import styled from 'styled-components';
import { applyMediaQuery } from 'styles/mediaQuery';

const StyledRoot = styled.div`
width: 100vw;
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background: ${({ theme: { color } }) => color.greenDarker};
`;

const MainText = styled.p`
font-family: 'Cafe24Ssurround';
font-size: ${({ theme: { font } }) => font.size.semiLarge};
color: ${({ theme: { color } }) => color.white};
margin-bottom: 10.2rem;
`;

const ContentBox = styled.div`
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 56rem;
height: 20rem;
border-radius: 0.6rem;
background-color: ${({ theme: { color } }) => color.greenLighter};
${applyMediaQuery('mobile')} {
width: 40rem;
height: 15rem;
}
`;

const Clothes = styled.p`
font-family: 'Noto';
font-size: ${({ theme: { font } }) => font.size.semiMedium};
color: ${({ theme: { color } }) => color.greenDarker};
margin-bottom: 2rem;
${applyMediaQuery('mobile')} {
font-size: ${({ theme: { font } }) => font.size.regular};
margin-bottom: 1rem;
}
`;

const Place = styled.p`
font-family: 'Noto';
font-size: ${({ theme: { font } }) => font.size.semiMedium};
color: ${({ theme: { color } }) => color.greenDarker};
${applyMediaQuery('mobile')} {
font-size: ${({ theme: { font } }) => font.size.regular};
}
`;

const HomeButton = styled.button`
width: 20rem;
height: 5rem;
margin-top: 13.5rem;
border-radius: 0.6rem;
background-color: ${({ theme: { color } }) => color.white};
${applyMediaQuery('mobile')} {
margin-top: 3rem;
width: 40rem;
height: 5rem;
}
`;

const Text = styled.p`
font-family: 'Cafe24Ssurround';
font-size: ${({ theme: { font } }) => font.size.small};
color: ${({ theme: { color } }) => color.greenDarker};
${applyMediaQuery('mobile')} {
font-family: 'Noto';
font-size: ${({ theme: { font } }) => font.size.small};
font-weight: ${({ theme: { font } }) => font.weight.bold};
}
`;

export { StyledRoot, MainText, ContentBox, Clothes, Place, HomeButton, Text };
69 changes: 65 additions & 4 deletions src/pages/Vote/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,74 @@
/* eslint-disable import/no-unresolved */
import React from 'react';
import { RecSun } from 'assets';
import { StyledRoot, Text } from './style';
import { useNavigate } from 'react-router-dom';
import { WhiteLeft } from 'assets';
import { HeaderIcon, PublicButton } from 'components';
import {
StyledRoot,
HeaderIconBox,
Text,
BackButton,
BackButtonBox,
SubText,
MainText,
ContentBox,
FormBox,
SubjectText,
Form,
ButtonBox,
} from './style';

function Vote() {
const navigate = useNavigate();
return (
<StyledRoot>
<Text>Vote</Text>
<img src={RecSun} alt="RecSunny" />
<HeaderIconBox>
<HeaderIcon />
</HeaderIconBox>
<BackButtonBox>
<button
className="backbutton"
type="button"
onClick={() => {
navigate(-1);
}}
>
<BackButton src={WhiteLeft} alt="BackButton" />
</button>
</BackButtonBox>
<Text>
<SubText>์˜ค๋Š˜ ์˜ท์ฐจ๋ฆผ์ด ๊ณ ๋ฏผ๋  ๋•,</SubText>
<MainText>๋ฒ—๋“ค์—๊ฒŒ ๋ฌผ์–ด๋ด!</MainText>
</Text>
<ContentBox>
<FormBox>
<SubjectText>
์˜ค๋Š˜ ์ด ์˜ท<span>*</span>
</SubjectText>
<Form>
<input
type="text"
name="clothes"
placeholder="์ž…๊ณ ์‹ถ์€ ์˜ท์„ ์ ์–ด์ฃผ์„ธ์š”"
required="required"
/>
</Form>
</FormBox>
<FormBox>
<SubjectText>์–ด๋””์—์„œ</SubjectText>
<Form>
<input
type="text"
name="place"
placeholder="์˜ท์„ ์ž…๊ณ  ๊ฐˆ ์žฅ์†Œ๋ฅผ ์ ์–ด์ฃผ์„ธ์š”"
/>
</Form>
</FormBox>
<SubjectText>ํ—ˆ, ๋ถˆํ—ˆ?</SubjectText>
</ContentBox>
<ButtonBox>
<PublicButton text="ํˆฌํ‘œ ๋งŒ๋“ค๊ธฐ" />
</ButtonBox>
</StyledRoot>
);
}
Expand Down
Loading

0 comments on commit 88a787b

Please sign in to comment.