[components/sidebar][f]: layout prep for sidebar
This commit is contained in:
parent
f440456dd0
commit
6b8a0f2699
|
|
@ -1,7 +1,10 @@
|
||||||
import Head from 'next/head'
|
import Head from 'next/head'
|
||||||
import Nav from './Nav'
|
|
||||||
import siteConfig from '../config/siteConfig'
|
import siteConfig from '../config/siteConfig'
|
||||||
import navLinks from '../config/navLinks.js'
|
import navLinks from '../config/navLinks'
|
||||||
|
import Nav from './Nav'
|
||||||
|
import Sidebar from './Sidebar'
|
||||||
|
|
||||||
|
|
||||||
export default function Layout({ children }) {
|
export default function Layout({ children }) {
|
||||||
return (
|
return (
|
||||||
|
|
@ -14,7 +17,8 @@ export default function Layout({ children }) {
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="" />
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="" />
|
||||||
</Head>
|
</Head>
|
||||||
<Nav />
|
<Nav />
|
||||||
<main>
|
<main className="max-w-7xl mx-auto px-2 sm:px-6 lg:px-8">
|
||||||
|
<Sidebar />
|
||||||
{children}
|
{children}
|
||||||
</main>
|
</main>
|
||||||
<footer className="w-full h-24 mt-16">
|
<footer className="w-full h-24 mt-16">
|
||||||
|
|
@ -53,4 +57,4 @@ export default function Layout({ children }) {
|
||||||
</footer>
|
</footer>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
export default function Sidebar (props) {
|
||||||
|
// max-w-7xl = max-w-80rem
|
||||||
|
// w-60 = 15rem
|
||||||
|
return (
|
||||||
|
<div className="hidden lg:block w-[16rem] fixed top-16 left-[max(0px,calc(50%-40rem))] bottom-0 right-auto px-2 sm:px-6 lg:px-8 overflow-y-auto">
|
||||||
|
{/* TODO LHS TOC */}
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<li>Heading 1</li>
|
||||||
|
<li>Heading 2</li>
|
||||||
|
<li>Heading 3</li>
|
||||||
|
<li>Heading 4</li>
|
||||||
|
<li>Heading 5</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</div>)
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue