Refactored sidebar layout to have better control on design; made sidebar sticky
This commit is contained in:
@@ -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>
|
||||||
@@ -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>
|
||||||
Reference in New Issue
Block a user