5.1 앱 레이아웃/헤더/푸터/사이드바 구성

This commit is contained in:
koreacomp5
2025-10-09 15:22:05 +09:00
parent af206652cb
commit 37a5a5efde
4 changed files with 43 additions and 1 deletions

View File

@@ -0,0 +1,9 @@
export function AppFooter() {
return (
<footer style={{ padding: 12, borderTop: "1px solid #eee", marginTop: 24 }}>
© msg App
</footer>
);
}

View File

@@ -0,0 +1,13 @@
export function AppHeader() {
return (
<header style={{ display: "flex", justifyContent: "space-between", padding: 12 }}>
<div>msg App</div>
<nav style={{ display: "flex", gap: 12 }}>
<a href="/"></a>
<a href="/boards"></a>
</nav>
</header>
);
}

View File

@@ -0,0 +1,12 @@
export function AppSidebar() {
return (
<aside style={{ width: 200, borderRight: "1px solid #eee", padding: 12 }}>
<ul style={{ display: "flex", flexDirection: "column", gap: 8 }}>
<li><a href="/boards"></a></li>
<li><a href="/admin"></a></li>
</ul>
</aside>
);
}

View File

@@ -1,6 +1,9 @@
import type { Metadata } from "next";
import "./globals.css";
import QueryProvider from "@/app/QueryProvider";
import { AppHeader } from "@/app/components/AppHeader";
import { AppSidebar } from "@/app/components/AppSidebar";
import { AppFooter } from "@/app/components/AppFooter";
export const metadata: Metadata = {
@@ -17,7 +20,12 @@ export default function RootLayout({
<html lang="en">
<body>
<QueryProvider>
{children}
<AppHeader />
<div style={{ display: "flex", minHeight: "80vh" }}>
<AppSidebar />
<main style={{ flex: 1, padding: 16 }}>{children}</main>
</div>
<AppFooter />
</QueryProvider>
</body>
</html>