Skip to content

Commit

Permalink
Merge pull request #20 from whatever-mentoring/dev
Browse files Browse the repository at this point in the history
style: ๋ชจ๋ฐ”์ผ์— ๋งž๊ฒŒ ๋””์ž์ธ ์ˆ˜์ •
  • Loading branch information
chaeyeonan authored Sep 20, 2023
2 parents 8a177ea + 26eaad9 commit ab182ff
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 27 deletions.
8 changes: 7 additions & 1 deletion src/assets/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import { Palette } from 'styles/Palette';
export const EntireContainer = styled.div<{
homebar?: boolean;
background?: string;
padding?: string;
}>`
padding: 25px 30px;
padding: ${({ padding }) => (padding ? padding : '25px 30px')};
background: ${({ background }) => (background ? background : Palette.White)};
height: ${({ homebar }) =>
homebar ? 'calc(100dvh - 156px)' : 'calc(100dvh - 60px)'};
Expand All @@ -16,6 +17,11 @@ export const EntireContainer = styled.div<{
display: none;
}
// ์ฅฌ์‹œ๊ธ€ ๋‘˜๋Ÿฌ๋ณด๊ธฐ ๋ฉ”์ธํŽ˜์ด์ง€
.padding-container {
padding: 0px 30px;
}
// ๋งˆ์ดํŽ˜์ด์ง€
.mypage-submenu-container {
padding: 40px 0px;
Expand Down
1 change: 0 additions & 1 deletion src/components/Answer/Notice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const Notice = () => {
export default Notice;

const Container = styled(Column)`
padding: 30px;
padding-bottom: 10px;
gap: 5px;
`;
2 changes: 1 addition & 1 deletion src/components/Category/CategoryBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const Categories = ({ ctgAll }: { ctgAll: boolean }) => {
const Container = styled(Column)`
width: 100%;
gap: 6px;
padding: 10px 30px;
padding: 10px 0;
`;
const Title = () => {
return <Typo.s1>์นดํ…Œ๊ณ ๋ฆฌ</Typo.s1>;
Expand Down
9 changes: 6 additions & 3 deletions src/components/common/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ export const QTitleCard = () => {
<Tag tagType={'question'}>
<CategoryLabel>์ผ์ƒ</CategoryLabel>
</Tag>
<Title>๊ธ€ ์ œ๋ชฉ์ž…๋‹ˆ๋‹ค ๊ธ€ ์ œ๋ชฉ์ž…๋‹ˆ๋‹ค ๊ธ€ ์ œ๋ชฉ์ž…๋‹ˆ๋‹ค ๊ธ€ ์ œ๋ชฉ์ž…๋‹ˆ๋‹ค</Title>
<Title>
์ผ์ด์‚ผ์‚ฌ์˜ค๋ฅ™์น ํŒ”๊ตฌ์‹ญ์ผ์ด์‚ผ์‚ฌ์˜ค๋ฅ™์น ํŒ”๊ตฌ์‹ญ์ผ์ด์‚ผ์‚ฌ์˜ค๋ฅ™์น ํŒ”๊ตฌ์‹ญ์ผ์ด์‚ผ์‚ฌ์˜ค๋ฅ™์น ํŒ”๊ตฌ์‹ญ์ผ์ด์‚ผ์‚ฌ์˜ค๋ฅ™์น ํŒ”๊ตฌ์‹ญ
</Title>
<Date>2023.09.11</Date>
</Container>
);
Expand All @@ -30,7 +32,7 @@ export const QContentCard = () => {
return (
<Container height={317} color={Palette.Main05} gap={14}>
<Tag tagType={'question'}>
<Typo.b2 color={Palette.Main}>์งˆ๋ฌธ ๋‚ด์šฉ</Typo.b2>
<Typo.b2>์งˆ๋ฌธ ๋‚ด์šฉ</Typo.b2>
</Tag>
<ScrollBox>
๋กœ๋ ˜ ์ž…์ˆจ(lorem ipsum; ์ค„์—ฌ์„œ ๋ฆฝ์ˆจ, lipsum)์€ ์ถœํŒ์ด๋‚˜ ๊ทธ๋ž˜ํ”ฝ ๋””์ž์ธ
Expand Down Expand Up @@ -145,7 +147,7 @@ const Date = ({ children }: { children: string }) => {
/* styles */

const Container = styled(Column)<{ height?: number; color: string }>`
width: 330px;
width: 100%;
${({ height }) => height && `height: ${height}px`};
padding: 27px 28px;
Expand All @@ -167,6 +169,7 @@ const Title = styled(Typo.h1)`
display: flex;
justify-content: center;
align-items: center;
text-align: center;
`;
const AnsTitle = styled(Typo.h2)`
height: 100%;
Expand Down
4 changes: 2 additions & 2 deletions src/components/common/Homebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ const Homebar = () => {
<Typo.homebar isOn={icons.isAnsOn}>๋‹ต๋ณ€ํ•˜๊ธฐ</Typo.homebar>
</Menu>
) : (
<Menu to="/answer">
<Icon src={`${pathname === '/answer' ? askOn : askOff}`} />
<Menu to="/ask">
<Icon src={`${pathname === '/ask' ? askOn : askOff}`} />
<Typo.homebar isOn={icons.isAskOn}>์งˆ๋ฌธํ•˜๊ธฐ</Typo.homebar>
</Menu>
)}
Expand Down
7 changes: 5 additions & 2 deletions src/pages/Answer/WriteAnswer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ import { Palette } from 'styles/Palette';
const WriteAnswer = () => {
return (
<Column>
<Header borderBottom={true} color={Palette.Main}>
<Header borderBottom={true} color={Palette.Main} btn="back">
๋‹ต๋ณ€ํ•˜๊ธฐ
</Header>
<EntireContainer>
<EntireContainer
homebar={false}
style={{ height: 'calc(100dvh - 119px)' }}
>
<Column gap={22} alignItems="center">
<QDetailCard />
<WriteInputBox
Expand Down
12 changes: 7 additions & 5 deletions src/pages/Answer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ const Answer = () => {
return (
<Column>
<Header borderBottom={true}>๋‹ต๋ณ€ํ•˜๊ธฐ</Header>
<Notice></Notice>
<CategoryBar.container>
<CategoryBar.ctgs ctgAll={true} />
</CategoryBar.container>
<EntireContainer>
<EntireContainer homebar={true}>
<div style={{ padding: '10px 0' }}>
<Notice />
<CategoryBar.container>
<CategoryBar.ctgs ctgAll={true} />
</CategoryBar.container>
</div>
<AnswersContainer />
</EntireContainer>
<Homebar />
Expand Down
5 changes: 4 additions & 1 deletion src/pages/Ask/WriteQuestion/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ const WriteQuestion = () => {
<Header borderBottom={false} btn={'back'}>
์งˆ๋ฌธํ•˜๊ธฐ
</Header>
<EntireContainer>
<EntireContainer
homebar={false}
style={{ height: 'calc(100dvh - 119px)' }}
>
<Column gap={18} alignItems="flex-start">
<Typo.s2>์ œ๋ชฉ(์ตœ๋Œ€ 100์ž)</Typo.s2>
<Title />
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Ask/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Ask = () => {
return (
<Column>
<Header borderBottom={false}>์งˆ๋ฌธํ•˜๊ธฐ</Header>
<EntireContainer>
<EntireContainer homebar={true}>
<InnerContainer justifyContent="space-between">
<CTAText />
<InnerContents>
Expand Down
24 changes: 14 additions & 10 deletions src/pages/Main/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,21 @@ const Main = () => {
<Header borderBottom={false} btn={'search'}>
์ฅฌ์‹œ๊ธ€
</Header>
<Column color={Palette.Gray05}>
<CategoryBar ctgAll={true} />
<CallToAction />
</Column>
<EntireContainer>
<Column gap={26}>
<StyledLink to="/post/1">
<CardSlider cards={cards} />
</StyledLink>
<CardSlider cards={cards} />
<EntireContainer homebar={true} padding="25px 0px">
<Column color={Palette.Gray05}>
<div className="padding-container">
<CategoryBar ctgAll={true} />
</div>
<CallToAction />
</Column>
<div className="padding-container">
<Column gap={26}>
<StyledLink to="/post/1">
<CardSlider cards={cards} />
</StyledLink>
<CardSlider cards={cards} />
</Column>
</div>
</EntireContainer>
<Homebar />
</Column>
Expand Down

0 comments on commit ab182ff

Please sign in to comment.