Skip to content

Commit

Permalink
#4 [Fix] Style
Browse files Browse the repository at this point in the history
  • Loading branch information
zhtmahthgus committed Aug 6, 2022
1 parent f8773e0 commit add1c86
Show file tree
Hide file tree
Showing 11 changed files with 136 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ๋ฉ”์ธ ๋ธŒ๋žœ์น˜์— ํ‘ธ์‹œ ๋ฐœ์ƒ ์‹œ ์‹คํ–‰๋จ
name: S3 Deploy
name: Publish
on:
push:
branches:
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Build
run: npm run build

# AWS S3 ๋ฒ„ํ‚ท ๋‚ด ๋นŒ๋“œ ํŒŒ์ผ ์—…๋กœ๋“œ
# AWS S3 ๋ฒ„ํ‚ท ๋‚ด ๋นŒ๋“œ ํŒŒ์ผ ์—…๋กœ๋“œ
- name: Deploy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down
21 changes: 11 additions & 10 deletions src/components/Common/HeaderIcon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
StyledLink,
Line,
LogoutButton,
LoginButton,
} from './style';

function HeaderIcon() {
Expand All @@ -33,22 +34,22 @@ function HeaderIcon() {
useClickOutside(Ref);
return (
<StyledRoot ref={Ref}>
<IconButton type="button" onClick={() => setIsClicked(prev => !prev)}>
<Image src={User} alt="HeaderIcon" />
</IconButton>
{localStorage.getItem('token') ? (
<IconButton type="button" onClick={() => setIsClicked(prev => !prev)}>
<Image src={User} alt="HeaderIcon" />
</IconButton>
) : (
<NavLink to="/login">
<LoginButton>๋กœ๊ทธ์ธ</LoginButton>
</NavLink>
)}
{isClicked ? (
<div>
<ToolTipArrow />
<ToolTip>
<StyledLink to="/MyPage">๋งˆ์ดํŽ˜์ด์ง€</StyledLink>
<Line />
{localStorage.getItem('token') ? (
<LogoutButton onClick={logout}>๋กœ๊ทธ์•„์›ƒ</LogoutButton>
) : (
<NavLink to="/login">
<LogoutButton>๋กœ๊ทธ์ธ</LogoutButton>
</NavLink>
)}
<LogoutButton onClick={logout}>๋กœ๊ทธ์•„์›ƒ</LogoutButton>
</ToolTip>
</div>
) : null}
Expand Down
12 changes: 12 additions & 0 deletions src/components/Common/HeaderIcon/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,17 @@ const LogoutButton = styled.button`
font-weight: ${({ theme: { font } }) => font.weight.bold};
`;

const LoginButton = styled.button`
width: 9rem;
height: 3rem;
border-radius: 2rem;
background-color: ${({ theme: { color } }) => color.white};
color: #3b3829;
font-family: 'Cafe24Ssurround';
font-size: ${({ theme: { font } }) => font.size.micro};
font-weight: ${({ theme: { font } }) => font.weight.bold};
`;

export {
StyledRoot,
ToolTipArrow,
Expand All @@ -86,4 +97,5 @@ export {
StyledLink,
Line,
LogoutButton,
LoginButton,
};
4 changes: 4 additions & 0 deletions src/components/CustomCalendar/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ const CalendarContainer = styled.div`
line-height: 2rem;
text-align: center;
}
.react-calendar__tile {
margin: 0;
border: 0;
}
button {
background-color: ${({ theme: { color } }) => color.white};
height: 7rem;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Login/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { applyMediaQuery } from 'styles/mediaQuery';

const StyledRoot = styled.div`
width: 100vw;
height: 100vh;
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/MyPage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function MyPage() {
<button
type="button"
onClick={() => {
navigate(-1);
navigate('/');
}}
>
<BackButton src={WhiteLeft} alt="BackButton" />
Expand Down
6 changes: 6 additions & 0 deletions src/pages/MyPage/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ const MobileHeader = styled.div`
${applyMediaQuery('desktop')} {
display: none;
}
${applyMediaQuery('tablet')} {
display: none;
}
`;

const BackButton = styled.img`
Expand Down Expand Up @@ -119,6 +122,9 @@ const MobileFooter = styled.div`
${applyMediaQuery('desktop')} {
display: none;
}
${applyMediaQuery('tablet')} {
display: none;
}
justify-content: center;
`;

Expand Down
19 changes: 15 additions & 4 deletions src/pages/Save/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ import {
MobileWeatherBox,
ContentBox,
RecordBox,
ButtonBox,
DeskTopButtonBox,
MobileButtonBox,
TemBox,
Temperature,
VerticalLine,
Expand Down Expand Up @@ -63,7 +64,7 @@ function Save() {
className="backbutton"
type="button"
onClick={() => {
navigate(-1);
navigate('/');
}}
>
<BackButton src={WhiteLeft} alt="BackButton" />
Expand Down Expand Up @@ -135,7 +136,7 @@ function Save() {
) : (
<ContentBox />
)}
<ButtonBox>
<DeskTopButtonBox>
<PublicButton
onClick={() => {
PostCalendars(privateAxios, AvaterState, CurrentWeather, text);
Expand All @@ -144,8 +145,18 @@ function Save() {
text="์ €์žฅํ•˜๊ธฐ"
isDisabled={text.length > 0 ? 0 : 1}
/>
</ButtonBox>
</DeskTopButtonBox>
</MainBox>
<MobileButtonBox>
<PublicButton
onClick={() => {
PostCalendars(privateAxios, AvaterState, CurrentWeather, text);
navigate('/savecomplete');
}}
text="์ €์žฅํ•˜๊ธฐ"
isDisabled={text.length > 0 ? 0 : 1}
/>
</MobileButtonBox>
</StyledRoot>
);
}
Expand Down
32 changes: 26 additions & 6 deletions src/pages/Save/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ const StyledRoot = styled.div`
height: 90%;
}
}
${applyMediaQuery('tablet')} {
.mainbox {
width: 95vw;
}
}
`;

const HeaderIconBox = styled.div`
Expand Down Expand Up @@ -88,7 +93,7 @@ const MainBox = styled.div`
background-color: ${({ theme: { color } }) => color.white};
border-radius: 1.4rem;
${applyMediaQuery('mobile')} {
margin-top: 4rem;
margin-top: 5rem;
}
`;

Expand All @@ -98,7 +103,7 @@ const DateText = styled.p`
font-size: ${({ theme: { font } }) => font.size.semiMedium};
color: ${({ theme: { color } }) => color.greenDarker};
${applyMediaQuery('mobile')} {
font-family: 'Noto';
font-family: 'Noto', [monospace];
font-size: ${({ theme: { font } }) => font.size.regular};
font-weight: ${({ theme: { font } }) => font.weight.semiBold};
padding: 2.6rem 0rem 2rem 2rem;
Expand Down Expand Up @@ -176,7 +181,7 @@ const RecordBox = styled.div`
}
textarea::placeholder {
font-family: 'Noto';
font-family: 'Noto', [monospace];
font-weight: ${({ theme: font }) => font.light};
color: ${({ theme: { color } }) => color.grey};
}
Expand Down Expand Up @@ -257,13 +262,27 @@ const VerticalLine = styled.hr`
background: ${({ theme: { color } }) => color.greenLighter};
`;

const ButtonBox = styled.div`
const DeskTopButtonBox = styled.div`
width: 100rem;
display: flex;
justify-content: center;
margin-bottom: 4rem;
${applyMediaQuery('mobile')} {
width: 80vw;
display: none;
}
${applyMediaQuery('tablet')} {
width: 95vw;
}
`;
const MobileButtonBox = styled.div`
width: 80vw;
display: flex;
justify-content: center;
${applyMediaQuery('desktop')} {
display: none;
}
${applyMediaQuery('tablet')} {
display: none;
}
`;

Expand All @@ -290,7 +309,8 @@ export {
MobileWeatherBox,
ContentBox,
RecordBox,
ButtonBox,
DeskTopButtonBox,
MobileButtonBox,
TemBox,
Temperature,
VerticalLine,
Expand Down
19 changes: 16 additions & 3 deletions src/pages/SaveRecord/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ import {
MobileWeatherBox,
ContentBox,
RecordBox,
ButtonBox,
DeskTopButtonBox,
MobileButtonBox,
TemBox,
Temperature,
VerticalLine,
Expand Down Expand Up @@ -168,7 +169,7 @@ function SaveRecord() {
<HorizonLineBottom width="100%" />
</RecordBox>
</ContentBox>
<ButtonBox>
<DeskTopButtonBox>
{isEditMode ? (
<PublicButton
text="์ €์žฅํ•˜๊ธฐ"
Expand All @@ -179,8 +180,20 @@ function SaveRecord() {
}}
/>
) : null}
</ButtonBox>
</DeskTopButtonBox>
</MainBox>
<MobileButtonBox>
{isEditMode ? (
<PublicButton
text="์ €์žฅํ•˜๊ธฐ"
isDisabled={0}
onClick={() => {
EditCalendars(privateAxios, data.id, input);
setIsEditMode(0);
}}
/>
) : null}
</MobileButtonBox>
{isSaveVisible ? (
<EditModal
ctext1="์•„์ง ๊ธฐ๋ก์ด ์ €์žฅ๋˜์ง€ ์•Š์•˜์–ด์š”."
Expand Down
Loading

0 comments on commit add1c86

Please sign in to comment.