Skip to content

Commit

Permalink
Merge pull request #72 from kyubumjang/feature/54-mainpage-panel
Browse files Browse the repository at this point in the history
Feature/54 mainpage panel
  • Loading branch information
kyubumjang authored Mar 12, 2023
2 parents efe0403 + 71f7e49 commit 65c8337
Show file tree
Hide file tree
Showing 25 changed files with 187 additions and 8 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ const Header = () => {
<S.InnerContainer>
<S.LogoWrapper>
<Link href='/'>
<Logo />
<a>
<Logo />
</a>
</Link>
</S.LogoWrapper>
<S.MenuContainer>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import styled from '@emotion/styled';

export const Container = styled('div')({});
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import * as S from './IconDescription.styles';

const IconDescription = () => {
return <div></div>;
};

export default IconDescription;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import styled from '@emotion/styled';

export const Container = styled('div')({});
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import * as S from './IconServiceDescription.styles';

const IconServiceDescription = () => {
return <div></div>;
};

export default IconServiceDescription;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import styled from '@emotion/styled';

export const Container = styled('div')({
width: '400px',
});
16 changes: 16 additions & 0 deletions src/components/common/Panel/InfoDescription/InfoDescription.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import Text from '../../Text/Text';
import * as S from './InfoDescription.styles';

interface InfoDescriptionProps {
description: string;
}

const InfoDescription = ({ description }: InfoDescriptionProps) => {
return (
<S.Container>
<Text tag='h4'>{description}</Text>
</S.Container>
);
};

export default InfoDescription;
24 changes: 24 additions & 0 deletions src/components/common/Panel/InfoTitle/InfoTitle.styles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import styled from '@emotion/styled';

interface InfoTitleProps {
alignItems: 'flex-start' | 'flex-end';
}

export const Container = styled('div')<InfoTitleProps>(
{
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
width: '100%',
},
({ alignItems }) => {
return {
alignItems: alignItems,
};
},
);

export const SubTitleWrapper = styled('div')({
display: 'flex',
width: '400px',
});
22 changes: 22 additions & 0 deletions src/components/common/Panel/InfoTitle/InfoTitle.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import Text from '@/components/common/Text/Text';

import * as S from './InfoTitle.styles';

interface Props {
title: string;
subTitle: string;
alignItems?: 'flex-start' | 'flex-end';
}

const InfoTitle = ({ title, subTitle, alignItems }: Props) => {
return (
<S.Container alignItems={alignItems ?? 'flex-start'}>
<Text tag='h3'>{title}</Text>
<S.SubTitleWrapper>
<Text tag='h2'>{subTitle}</Text>
</S.SubTitleWrapper>
</S.Container>
);
};

export default InfoTitle;
Original file line number Diff line number Diff line change
Expand Up @@ -27,60 +27,69 @@ const Text = ({ children, tag, fontSize, fontWeight, color }: Props) => {
font-weight: 700;
line-height: 1.4;
color: rgb(0, 0, 0);
white-space: pre-line;
`;
if (tag === 'h2')
return css`
font-size: 50px;
font-weight: 700;
line-height: 1.4;
color: #191f28;
white-space: pre-line;
`;
if (tag === 'h3')
return css`
font-size: 40px;
font-size: 28px;
font-weight: 700;
line-height: 1.4;
color: rgb(51, 61, 75);
color: #3c5fa6;
white-space: pre-line;
`;
if (tag === 'h4')
return css`
font-size: 23px;
font-weight: 600;
line-height: 1.5;
color: rgb(51, 61, 75);
white-space: pre-line;
`;
if (tag === 'h5')
return css`
font-size: 22px;
font-weight: 600;
line-height: 1.5;
color: rgb(107, 118, 132);
white-space: pre-line;
`;
if (tag === 'h6')
return css`
font-size: 20px;
font-weight: 600;
line-height: 1.5;
color: #333d4b;
white-space: pre-line;
`;
if (tag === 'p')
return css`
font-size: 32px;
font-weight: 700;
line-height: 1.6;
color: #191f28;
white-space: pre-line;
`;
if (tag === 'span')
return css`
font-size: 23px;
font-weight: 600;
line-height: 1.5;
color: rgb(51, 61, 75);
white-space: pre-line;
`;
return css`
font-size: ${fontSize};
font-weight: ${fontWeight};
color: ${color};
white-space: pre-line;
`;
};

Expand Down
16 changes: 16 additions & 0 deletions src/constants/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,22 @@ const colors = {
darkLayeredBackground: inverseGrey50,
floatBackground: white,
darkFloatBackground: inverseGrey100,
primary: {
lavender: '#A0B3D9',
shipCove: '#698EBF',
blue: '#3C5FA6',
gulfBlue: '#021859',
blueCharcoal: '#010326',
contrastText: '#fff',
},
secondary: {
shipGray: '#3C3940',
holly: '#01261C',
yellow: '#F2BF80',
donkeyBrown: '#A69580',
codGray: '#0D0D0D',
contrastText: '#fff',
},
};

export default colors;
4 changes: 2 additions & 2 deletions src/layouts/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ReactNode } from 'react';

import Footer from '@/components/Footer/Footer';
import Header from '@/components/Header/Header';
import Footer from '@/components/common/Footer/Footer';
import Header from '@/components/common/Header/Header';

interface Props {
children: ReactNode;
Expand Down
4 changes: 3 additions & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import type { NextPage } from 'next';

import { Container } from '@/styles/common';
import Introduce from 'templates/main/Introduce/Introduce';
import Introduce from '@/templates/main/Introduce/Introduce';
import OrderStatus from '@/templates/main/OrderStatus/OrderStatus';

const Home: NextPage = () => {
return (
<Container>
<Introduce />
<OrderStatus />
</Container>
);
};
Expand Down
1 change: 1 addition & 0 deletions src/templates/main/Introduce/Introduce.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const SloganContainer = styled('div')({
});

export const ImgBgWrapper = styled('div')({
position: 'relative',
width: 'auto',
height: '100vh',
zIndex: -1,
Expand Down
2 changes: 1 addition & 1 deletion src/templates/main/Introduce/Introduce.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Link from 'next/link';
import { AiFillTool, AiFillShopping } from 'react-icons/ai';
import { SlArrowDown } from 'react-icons/sl';

import Text from '@/components/Text/Text';
import Text from '@/components/common/Text/Text';
import { LinkContentWrapper } from '@/styles/common';

import mainBg from '../../../../public/assets/images/main.png';
Expand Down
18 changes: 18 additions & 0 deletions src/templates/main/OrderStatus/OrderStatus.styles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import styled from '@emotion/styled';

export const Container = styled('div')({
height: '800px',
});

export const Wrapper = styled('div')({
display: 'flex',
flexDirection: 'column',
padding: '100px',
gap: '100px',
});

export const InfoDescriptionWrapper = styled('div')({
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-end',
});
27 changes: 27 additions & 0 deletions src/templates/main/OrderStatus/OrderStatus.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import InfoDescription from '@/components/common/Panel/InfoDescription/InfoDescription';
import InfoTitle from '@/components/common/Panel/InfoTitle/InfoTitle';

import * as S from './OrderStatus.styles';

const OrderStatus = () => {
return (
<S.Container>
<S.Wrapper>
<InfoTitle
title='홈 주문 현황'
subTitle='콜렛 주문 관리,
주문부터 일정까지 똑똑하게'
/>
<S.InfoDescriptionWrapper>
<InfoDescription
description={`P&S에서 콜렛을 주문해 보세요.
원하는 콜렛을 주문 제작은 기본,
일자별 주문 현황을 확인할 수 있어요.`}
/>
</S.InfoDescriptionWrapper>
</S.Wrapper>
</S.Container>
);
};

export default OrderStatus;
2 changes: 1 addition & 1 deletion src/templates/prepare/Prepare.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Link from 'next/link';
import { AiFillHome } from 'react-icons/ai';

import Text from '@/components/Text/Text';
import Text from '@/components/common/Text/Text';
import { LinkContentWrapper } from '@/styles/common';

import * as S from './Prepare.styles';
Expand Down
16 changes: 16 additions & 0 deletions src/types/emotion.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,22 @@ declare module '@emotion/react' {
darkLayeredBackground: string;
floatBackground: string;
darkFloatBackground: string;
primary: {
lavender: string;
shipCove: string;
blue: string;
gulfBlue: string;
blueCharcoal: string;
contrastText: string;
};
secondary: {
shipGray: string;
holly: string;
yellow: string;
donkeyBrown: string;
codGray: string;
contrastText: string;
};
};
fontSize: {
xl: string;
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"@/layouts/*": ["layouts/*"],
"@/pages/*": ["pages/*"],
"@/styles/*": ["styles/*"],
"@/templates/*": ["templates/*"],
"@/types/*": ["types/*"]
}
},
Expand Down

0 comments on commit 65c8337

Please sign in to comment.