Refactored sidebar layout to have better control on design; made sidebar sticky

This commit is contained in:
2025-11-14 12:26:40 +13:00
parent 55ad345d1c
commit d657d88e94
2 changed files with 15 additions and 6 deletions

View File

@@ -3,13 +3,10 @@ import Navbar from "src/components/index/navbar.astro"
import Footer from "./footer.astro" import Footer from "./footer.astro"
--- ---
<div class="w-[32%] py-14 h-screen text-center flex flex-col"> <div>
<a href="/" class="b1-no-underline text-4xl">breadone dot net</a> <a href="/" class="b1-no-underline text-4xl">breadone dot net</a>
<Navbar/> <Navbar/>
<!-- Lil spacer -->
<div class="mt-8"/> <div class="mt-8"/>
<slot/> <slot/>
<Footer/>
</div> </div>

View File

@@ -1,5 +1,7 @@
--- ---
import BaseHead from "./BaseHead.astro" import BaseHead from "./BaseHead.astro"
import Sidebar from "@components/sidebar"
import Footer from "@components/footer"
--- ---
<html> <html>
@@ -9,8 +11,18 @@ import BaseHead from "./BaseHead.astro"
</head> </head>
<body> <body>
<main id="main" class="flex-1"> <main id="main" class="flex flex-row">
<slot /> <div class="w-[32%] sticky top-0 py-14 h-screen text-center flex flex-col">
<Sidebar>
<slot name="sidebar" />
</Sidebar>
<Footer/>
</div>
<div class="content-panel">
<slot name="content"/>
</div>
</main> </main>
</body> </body>
</html> </html>