-
[React] Footer UI ์ ์์นดํ ๊ณ ๋ฆฌ ์์ 2023. 7. 18. 14:37๋ฐ์ํ
๐ footer UI
styled component๋ก Footer ๋ง๋ค๊ธฐ
Footer.ts
import React from 'react'; import styled from 'styled-components'; import { Link } from 'react-router-dom'; const FooterContainer = styled.footer` background-color: var(--white-deepdark); width: 100%; height: 180px; bottom: 0; padding: 20px; display: flex; align-items: center; justify-content: center; @media ${props => props.theme.breakpoints.mobileSMax} { display: none; } `; const TextContainer = styled.div` max-width: ${({ theme }) => theme.widthSize.contentMax}; width: 100%; height: 100%; padding-top: 20px; display: flex; `; const TextArea1 = styled.div` display: flex; flex-direction: column; width: 50%; height: 90px; `; const TextArea2 = styled.div` display: flex; justify-content : flex-end; width: 50%; padding-top: 20px; `; const FooterText = styled.p` color: var(--gray-dark); font-size: 15px; `; const FooterText2 = styled.p` color: var(--gray-dark); font-size: 15px; padding: 20px 0 10px; `; const ImgArea = styled.div` display: flex; flex-direction: row; `; const UrlZone = styled.div` display: flex; flex-direction: column; `; const UrlArea = styled.div` display: flex; justify-content : flex-end; align-items: center; flex-direction: row; margin: 5px; `; const CircleContainer = styled.div` width: 50px; height: 50px; border-radius: 50%; background-color: white; display: flex; justify-content: center; align-items: center; margin: 5px; `; const Img = styled.img` display: flex; flex-direction: column; width: 30px; height: 30px; margin-right: 5px; `; // ์ด๋ฏธ์ง ํฌ๊ธฐ ์กฐ์ ์ผ๋ก ์ธํ ๋ถํ์ํ ์ฝ๋ ๋ฌธ์ ๋ก ๊ณ ์น ์ ์๋์ง ํ์ธํด๋ณด๊ธฐ const Img1 = styled.img` width: 90%; height: 90%; `; const Img2 = styled.img` width: 80%; height: 80%; `; const Img3 = styled.img` width: 100%; height: 100%; `; const Footer: React.FC = () => { return ( <footer> <FooterContainer> <TextContainer> <TextArea1> <FooterText>๋์๋ฏธ๋๋ํ๊ต ์ปดํจํฐ์ํํธ์จ์ด๊ณตํ๊ณผ</FooterText> <FooterText2>MOST</FooterText2> <FooterText>๊น์ ํ ๊น์ฃผ์ ๊น์งํ ์์์</FooterText> <ImgArea> <CircleContainer> <Img1 src={"/assets/images/jeonghwan.png"} /> </CircleContainer> <CircleContainer> <Img2 src={"/assets/images/juyoong.png"} /> </CircleContainer> <CircleContainer> <Img3 src={"/assets/images/jihyun.png"} /> </CircleContainer> <CircleContainer> <Img1 src={"/assets/images/sieun.png"} /> </CircleContainer> </ImgArea> </TextArea1> <TextArea2> <UrlZone> <Link to="https://github.com/dmu-most" target="_blank"> <UrlArea> <Img src={"/assets/images/github.png"} /> <FooterText>Github</FooterText> </UrlArea> </Link> <Link to="https://glowing-square-e84.notion.site/MOST-a193863e0d48447eb852ca003fc71d46" target="_blank"> <UrlArea> <Img src={"/assets/images/notion.png"} /> <FooterText>Notion</FooterText> </UrlArea> </Link> <UrlArea> <FooterText>ยฉ [vblog] [2023.07.04]</FooterText> </UrlArea> </UrlZone> </TextArea2> </TextContainer> </FooterContainer> </footer> ); }; export default Footer;
app.ts
import { ReactNode } from 'react'; import Header from '@layout/Header'; import Main from '@layout/Main'; import Footer from '@layout/Footer'; type LayoutProps = { children: ReactNode; }; const Layout = ({ children }: LayoutProps) => { return ( <> <Header /> <Main>{children}</Main> <Footer /> </> ); }; export default Layout;
์คํ ๊ฒฐ๊ณผ
๋ฐ์ํ