Skip to content

Commit

Permalink
feat: define layout
Browse files Browse the repository at this point in the history
  • Loading branch information
naruko-hstk committed Nov 20, 2024
1 parent a62d501 commit 2728d7b
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
8 changes: 6 additions & 2 deletions app/_components/header/logo.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import Link from "next/link"

export default function Logo() {
return (
<>
{/* TODO: Put Logo Here */}
<span>Logo</span>
<Link href="/">
{/* TODO: Put Logo Here */}
<span>Logo</span>
</Link>
</>
)
}
8 changes: 6 additions & 2 deletions app/_components/header/nav-bar.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import Link from "next/link"

export default function NavBar() {
const navItems = [{ name: "", link: "" }]
return (
<>
<nav>
<Link href="/about">About</Link>
<Link href="/contact">Contact</Link>
{navItems.map((item, index) => (
<Link href={item.link} key={index}>
{item.name}
</Link>
))}
</nav>
</>
)
Expand Down
1 change: 1 addition & 0 deletions app/_components/layout/app-footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Copyright from "@/app/_components/footer/copyright"
export default function AppFooter() {
return (
<>
<div className="footer-copyright"></div>
<Copyright />
</>
)
Expand Down
5 changes: 3 additions & 2 deletions app/_components/layout/app-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import NavBar from "@/app/_components/header/nav-bar"
export default function AppHeader() {
return (
<>
<div>
<div className="header-logo">
<Logo />
</div>
<div>
<div className="header-nav">
<NavBar />
</div>
<div></div>
</>
)
}
6 changes: 3 additions & 3 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ export default function RootLayout({
return (
<html lang="en">
<body className="app">
<header>
<header className="app-header">
<AppHeader />
</header>
<main>{children}</main>
<footer>
<main className="app-main">{children}</main>
<footer className="app-footer">
<AppFooter />
</footer>
</body>
Expand Down

0 comments on commit 2728d7b

Please sign in to comment.