Merge pull request #8 from TeamBNBN/fe/layout

[Front-End] layout 컴포넌트 추가
This commit is contained in:
mauercho 2024-07-15 16:58:23 +09:00 committed by GitHub
commit 58eef10152
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 122 additions and 10 deletions

View File

@ -4,10 +4,9 @@ import styles from './Footer.module.css';
export default function Footer() { export default function Footer() {
return ( return (
<footer className={styles.footer}> <footer className={styles.footer}>
<div> <div className={styles.footerContent}>
<div className={styles.title}>EduFocus</div> <div className={styles.title}>EduFocus</div>
<div>Copyright © 2024 EduFocus 모든 권리 보유.</div> <div>Copyright © 2024 EduFocus 모든 권리 보유.</div>
</div>
<ul className={styles.linkList}> <ul className={styles.linkList}>
<li> <li>
<Link to={'/'}>서비스 이용약관</Link> <Link to={'/'}>서비스 이용약관</Link>
@ -17,6 +16,7 @@ export default function Footer() {
<Link to={'/'}>개인정보 처리방침</Link> <Link to={'/'}>개인정보 처리방침</Link>
</li> </li>
</ul> </ul>
</div>
</footer> </footer>
); );
} }

View File

@ -0,0 +1,38 @@
import { Link } from 'react-router-dom';
import styles from './Header.module.css';
export default function Header() {
return (
<header className={styles.header}>
<nav className={styles.nav}>
<ul className={styles.group}>
<li>
<Link
to={'/'}
className={styles.logo}
>
Logo
</Link>
</li>
<li>
<Link to={'/'}>전체 강의</Link>
</li>
<li>
<Link to={'/'}>수강중인 강의</Link>
</li>
<li>
<Link to={'/'}> 학습</Link>
</li>
</ul>
<ul className={styles.group}>
<li>
<Link to={'/'}>마이페이지</Link>
</li>
<li>
<Link to={'/'}>로그인</Link>
</li>
</ul>
</nav>
</header>
);
}

View File

@ -0,0 +1,35 @@
.header {
display: flex;
align-items: center;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 80px;
background-color: var(--background);
border-bottom: 1px solid var(--border-color);
}
.nav {
display: flex;
justify-content: space-between;
align-items: center;
gap: 20px;
width: 100%;
max-width: 1320px;
padding: 0 40px;
margin: 0 auto;
font-size: 16px;
line-height: 1.4;
font-weight: 700;
color: var(--text-color);
}
.group {
display: flex;
align-items: center;
gap: 24px;
list-style: none;
padding: 0;
margin: 0;
}

View File

@ -0,0 +1 @@
export { default as Header } from './Header';

View File

@ -0,0 +1,5 @@
import styles from './MaxWidthLayout.module.css';
export default function MaxWidthLayout({ children }) {
return <div className={styles.area}>{children}</div>;
}

View File

@ -0,0 +1,5 @@
.area {
max-width: 1320px;
padding: 0 40px;
margin: 0 auto;
}

View File

@ -0,0 +1,15 @@
import { Footer } from '../Footer';
import { Header } from '../Header';
import styles from './PageLayout.module.css';
export default function PageLayout({ children }) {
return (
<>
<Header />
<div className={styles.body}>
<div className={styles.contents}>{children}</div>
<Footer />
</div>
</>
);
}

View File

@ -0,0 +1,10 @@
.body {
display: flex;
flex-direction: column;
justify-content: space-between;
min-height: 100vh;
}
.contents {
margin-top: 100px;
}

View File

@ -0,0 +1,2 @@
export { default as PageLayout } from './PageLayout';
export { default as MaxWidthLayout } from './MaxWidthLayout';

View File

@ -132,6 +132,7 @@
body { body {
font-family: font-family:
Pretendard, Pretendard,
Pretendard Variable,
-apple-system, -apple-system,
BlinkMacSystemFont, BlinkMacSystemFont,
Apple SD Gothic Neo, Apple SD Gothic Neo,