Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function Footer() {
return <div className="footer bg-blue-500 col-span-full row-span-1 row-start-12">Footer</div>
}
3 changes: 3 additions & 0 deletions app/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function Header() {
return <div className="header bg-red-500 col-span-full row-span-1">Header</div>
}
11 changes: 11 additions & 0 deletions app/components/MainWrapper.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export default function MainWrapper({
children,
}: Readonly<{
children: React.ReactNode
}>) {
return (
<main className="main-content bg-gray-500 col-span-full col-start-4 row-span-full row-start-2 row-end-[-2]">
{children}
</main>
)
}
5 changes: 5 additions & 0 deletions app/components/Sidebar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default function Sidebar() {
return (
<div className="sidebar bg-yellow-500 col-span-full col-end-4 row-span-full row-start-2 row-end-[-2]">Sidebar</div>
)
}
4 changes: 4 additions & 0 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
}
}

* {
border: 1px solid purple;
}

body {
background: var(--background);
color: var(--foreground);
Expand Down
13 changes: 12 additions & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import type { Metadata } from 'next'
import { Geist, Geist_Mono } from 'next/font/google'
import Footer from './components/Footer'
import Header from './components/Header'
import MainWrapper from './components/MainWrapper'
import Sidebar from './components/Sidebar'
import './globals.css'

const geistSans = Geist({
Expand All @@ -24,7 +28,14 @@ export default function RootLayout({
}>) {
return (
<html lang="en" className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`}>
<body className="min-h-full flex flex-col">{children}</body>
<body className="min-h-full">
<div className="home grid min-h-screen grid-cols-12 grid-rows-12">
<Header />
<MainWrapper>{children}</MainWrapper>
<Sidebar />
<Footer />
</div>
</body>
</html>
)
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"type-check": "tsc --noEmit",
"check": "npm run lint && npm run format:check && npm run type-check && npm run build",
"prepare": "husky",
"format:check": "prettier --check ."
"format:check": "prettier --check .",
"format": "prettier --write ."
},
"dependencies": {
"next": "16.2.7",
Expand Down
Loading