Merge pull request #8 from TeamBNBN/fe/layout
[Front-End] layout 컴포넌트 추가
This commit is contained in:
commit
58eef10152
@ -4,10 +4,9 @@ import styles from './Footer.module.css';
|
||||
export default function Footer() {
|
||||
return (
|
||||
<footer className={styles.footer}>
|
||||
<div>
|
||||
<div className={styles.footerContent}>
|
||||
<div className={styles.title}>EduFocus</div>
|
||||
<div>Copyright © 2024 EduFocus 모든 권리 보유.</div>
|
||||
</div>
|
||||
<ul className={styles.linkList}>
|
||||
<li>
|
||||
<Link to={'/'}>서비스 이용약관</Link>
|
||||
@ -17,6 +16,7 @@ export default function Footer() {
|
||||
<Link to={'/'}>개인정보 처리방침</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
}
|
||||
|
38
frontend/src/components/Header/Header.jsx
Normal file
38
frontend/src/components/Header/Header.jsx
Normal 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>
|
||||
);
|
||||
}
|
35
frontend/src/components/Header/Header.module.css
Normal file
35
frontend/src/components/Header/Header.module.css
Normal 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;
|
||||
}
|
1
frontend/src/components/Header/index.js
Normal file
1
frontend/src/components/Header/index.js
Normal file
@ -0,0 +1 @@
|
||||
export { default as Header } from './Header';
|
5
frontend/src/components/Layout/MaxWidthLayout.jsx
Normal file
5
frontend/src/components/Layout/MaxWidthLayout.jsx
Normal file
@ -0,0 +1,5 @@
|
||||
import styles from './MaxWidthLayout.module.css';
|
||||
|
||||
export default function MaxWidthLayout({ children }) {
|
||||
return <div className={styles.area}>{children}</div>;
|
||||
}
|
5
frontend/src/components/Layout/MaxWidthLayout.module.css
Normal file
5
frontend/src/components/Layout/MaxWidthLayout.module.css
Normal file
@ -0,0 +1,5 @@
|
||||
.area {
|
||||
max-width: 1320px;
|
||||
padding: 0 40px;
|
||||
margin: 0 auto;
|
||||
}
|
15
frontend/src/components/Layout/PageLayout.jsx
Normal file
15
frontend/src/components/Layout/PageLayout.jsx
Normal 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>
|
||||
</>
|
||||
);
|
||||
}
|
10
frontend/src/components/Layout/PageLayout.module.css
Normal file
10
frontend/src/components/Layout/PageLayout.module.css
Normal file
@ -0,0 +1,10 @@
|
||||
.body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.contents {
|
||||
margin-top: 100px;
|
||||
}
|
2
frontend/src/components/Layout/index.js
Normal file
2
frontend/src/components/Layout/index.js
Normal file
@ -0,0 +1,2 @@
|
||||
export { default as PageLayout } from './PageLayout';
|
||||
export { default as MaxWidthLayout } from './MaxWidthLayout';
|
@ -132,6 +132,7 @@
|
||||
body {
|
||||
font-family:
|
||||
Pretendard,
|
||||
Pretendard Variable,
|
||||
-apple-system,
|
||||
BlinkMacSystemFont,
|
||||
Apple SD Gothic Neo,
|
||||
|
Loading…
Reference in New Issue
Block a user