Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#34] Footer 작업 #37

Merged
merged 11 commits into from
Aug 14, 2023
79 changes: 79 additions & 0 deletions components/reusable/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import { styled } from 'styled-components';
import theme from '../../styles/theme';
import Spacing from './Spacing';

interface TextProps {
size: 'M' | 'L';
}

const Footer = () => {
return (
<Container>
<Spacing direction="vertical" size={62} />
<FooterFlex>
<WhiteLogo />
<TextFlex>
<WhiteText size="L">Contact</WhiteText>
<WhiteText size="M">[email protected]</WhiteText>
</TextFlex>
</FooterFlex>
<Spacing direction="vertical" size={150} />
<Line />
<Spacing direction="vertical" size={32} />
<FooterFlex>
<WhiteText size="M">Copyright ⓒ Soongcharo All Rights Reserved.</WhiteText>
<TextFlex>
<WhiteText size="M">이용약관</WhiteText>
<WhiteText size="M">숭차로 운영 정책</WhiteText>
<WhiteText size="L">개인정보 처리방침</WhiteText>
</TextFlex>
</FooterFlex>
</Container>
);
};

export default Footer;

const Container = styled.div`
width: 100%;
height: 352px;
padding-left: 240px;
padding-right: 240px;
position: relative;
bottom: 0;
background-color: ${theme.colors.footer};
border-bottom: 2px solid ${theme.colors.gray1};
align-items: center;
`;

const WhiteLogo = styled.div`
width: 68px;
height: 24px;
background-image: url('whiteLogo.svg');
`;

const FooterFlex = styled.div`
display: flex;
flex-direction: row;
justify-content: space-between;
`;

const TextFlex = styled.div`
display: flex;
flex-direction: row;
gap: 30px;
`;

const WhiteText = styled.div<TextProps>`
color: ${theme.colors.white};
font-size: ${(props) =>
props.size === 'M' ? theme.fontStyles.Text_M.fontSize : theme.fontStyles.Text_L.fontSize}px;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거 true일 경우, px이 안 들어가있어서 그런거 아닐까용?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{}px 한꺼번에 묶어서 한건데.. 후우움

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

엣 그러네요,,

font-weight: ${(props) =>
props.size === 'M' ? theme.fontStyles.Text_M.fontWeight : theme.fontStyles.Text_L.fontWeight};
`;

const Line = styled.div`
width: 100%;
height: 1px;
background-color: ${theme.colors.gray2};
`;
2 changes: 2 additions & 0 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { AppProps } from 'next/app';
import { RecoilRoot } from 'recoil';
import { QueryClient, QueryClientProvider } from 'react-query';
import { GlobalStyle } from '../styles/globalStyle';
import Footer from '../components/reusable/Footer';

const MyApp = ({ Component, pageProps }: AppProps) => {
const queryClient = new QueryClient();
Expand All @@ -11,6 +12,7 @@ const MyApp = ({ Component, pageProps }: AppProps) => {
<RecoilRoot>
<GlobalStyle />
<Component {...pageProps} />
<Footer />
</RecoilRoot>
</QueryClientProvider>
);
Expand Down
2 changes: 0 additions & 2 deletions pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import Card from '@/components/reusable/Card';
import type { NextPage } from 'next';

const Home: NextPage = () => {
return (
<>
<h1>Home Page</h1>
<Card />
</>
);
};
Expand Down
7 changes: 0 additions & 7 deletions pages/signup.tsx

This file was deleted.

3 changes: 3 additions & 0 deletions public/whiteLogo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.