Skip to content

Commit

Permalink
CSS 깨짐 현상 (버튼 패딩, 게시물 해시태그) (#590)
Browse files Browse the repository at this point in the history
* design: 버튼 width, 해시태그 css 수정

* feat: 프로필 수정 뒤로가기 추가

* refactor: ul 태그 추가
  • Loading branch information
gyeongza authored Sep 21, 2023
1 parent a14f2cb commit 13a75bc
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 23 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/ListFilter/ListFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const S = {
}
`,

FilterItem: styled.li`
FilterItem: styled.div`
display: flex;
justify-content: center;
Expand All @@ -103,7 +103,7 @@ const S = {
}
`,

ButtonWrapper: styled.div`
ButtonWrapper: styled.li`
width: 150px;
`,
};
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const underLine = css`
`;

const S = {
FilterContainer: styled.div``,
FilterContainer: styled.ul``,

LabelList: styled.li`
display: flex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,19 +128,18 @@ const S = {

TagContainer: styled.div`
@media (max-width: 768px) {
max-width: 200px;
display: flex;
flex-wrap: wrap;
}
`,

& span {
margin-right: 10px;
Tag: styled.span`
margin-right: 10px;
font-size: 14px;
color: var(--gray-600);
}
font-size: 14px;
color: var(--gray-600);
`,

Tag: styled.span``,

LeftSideContainer: styled.div``,

RightSideContainer: styled.div`
Expand Down
16 changes: 11 additions & 5 deletions frontend/src/pages/NoticePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ const NoticePage = () => {

<S.EventMessageTitle>🔎 미션 보러가기</S.EventMessageTitle>
<S.ButtonContainer>
<Button colorTheme="BLACK" width="100%">
<Button colorTheme="BLACK" width="120px">
<S.Anchor href="https://github.com/baton-mission/java-boss-monster" target="_blank">
<img src={githubIcon} />
<S.GoToGitHub>java</S.GoToGitHub>
</S.Anchor>
</Button>
<Button colorTheme="BLACK" width="100%">
<Button colorTheme="BLACK" width="120px">
<S.Anchor href="https://github.com/baton-mission/javascript-boss-monster" target="_blank">
<img src={githubIcon} />
<S.GoToGitHub>javascript</S.GoToGitHub>
Expand All @@ -143,13 +143,13 @@ const NoticePage = () => {
</S.EventGuide>
</S.EventMessageTitleContainer>
<S.ButtonContainer>
<Button dataType="java" colorTheme="RED" onClick={openConfirmModal} width="100%">
<Button dataType="java" colorTheme="RED" onClick={openConfirmModal} width="120px">
<S.Anchor>
<JavaIconWhite color="#000000" />
<S.Language>java</S.Language>
</S.Anchor>
</Button>
<Button dataType="javascript" colorTheme="RED" onClick={openConfirmModal} width="100%">
<Button dataType="javascript" colorTheme="RED" onClick={openConfirmModal} width="120px">
<S.Anchor>
<JavascriptIcon />
<S.Language>javascript</S.Language>
Expand All @@ -167,7 +167,13 @@ const NoticePage = () => {
</S.ProfileContainer>
</S.PostBodyContainer>
<S.PostFooterContainer>
<Button colorTheme="GRAY" fontSize={isMobile ? '14px' : ''} fontWeight={700} onClick={goBack}>
<Button
colorTheme="GRAY"
width={isMobile ? '60px' : '180px'}
fontSize={isMobile ? '14px' : ''}
fontWeight={700}
onClick={goBack}
>
목록
</Button>
</S.PostFooterContainer>
Expand Down
28 changes: 22 additions & 6 deletions frontend/src/pages/ProfileEditPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Button from '@/components/common/Button/Button';
import { ERROR_DESCRIPTION, ERROR_TITLE, TOAST_COMPLETION_MESSAGE, TOAST_ERROR_MESSAGE } from '@/constants/message';
import { ToastContext } from '@/contexts/ToastContext';
import { useFetch } from '@/hooks/useFetch';
import { usePageRouter } from '@/hooks/usePageRouter';
import Layout from '@/layout/Layout';
import {
Profile,
Expand All @@ -25,6 +26,7 @@ const ProfileEditPage = () => {
const { getRequestWithAuth, patchRequestWithAuth } = useFetch();

const { showErrorToast, showCompletionToast } = useContext(ToastContext);
const { goBack } = usePageRouter();

const [isRunner, setIsRunner] = useState(true);

Expand Down Expand Up @@ -231,9 +233,14 @@ const ProfileEditPage = () => {
);
};

const handleGoBack = () => {
goBack();
};

return (
<Layout>
<S.TitleWrapper>
<S.BackButton onClick={handleGoBack}>{'<'}</S.BackButton>
<S.Title>프로필 수정</S.Title>
</S.TitleWrapper>
<S.ProfileContainer>
Expand Down Expand Up @@ -327,9 +334,7 @@ const ProfileEditPage = () => {
</S.TechTagsList>
</S.InputContainer>
</S.Form>
) : (
'Loading'
)}
) : null}
</S.ProfileContainer>

{isModalOpen && (
Expand All @@ -347,7 +352,19 @@ export default ProfileEditPage;

const S = {
TitleWrapper: styled.div`
margin: 72px 0 53px 0;
display: flex;
justify-content: center;
position: relative;
margin: 72px 0 40px 0;
`,

BackButton: styled.div`
position: absolute;
margin-right: 530px;
font-size: 36px;
cursor: pointer;
`,

Title: styled.h1`
Expand All @@ -356,8 +373,7 @@ const S = {
`,

ProfileContainer: styled.div`
width: 900px;
max-width: 900px;
margin: 0 auto;
`,

Expand Down
13 changes: 12 additions & 1 deletion frontend/src/pages/RunnerPostDetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ const RunnerPostPage = () => {
</S.PostBodyContainer>
<S.PostFooterContainer>
<Button
width={isMobile ? '100%' : '180px'}
width={isMobile ? '60px' : '180px'}
colorTheme="GRAY"
fontSize={isMobile ? '14px' : ''}
fontWeight={700}
Expand Down Expand Up @@ -317,6 +317,17 @@ const S = {
align-items: center;
justify-content: space-between;
gap: 10px;
@media (max-width: 768px) {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 10px;
& > div {
margin-left: auto;
}
}
`,

PostTitle: styled.h1`
Expand Down

0 comments on commit 13a75bc

Please sign in to comment.