Layout.jsx

 1import Link from 'next/link'
 2import { motion } from 'framer-motion'
 3
 4import { Footer } from '@/components/Footer'
 5import { Header } from '@/components/Header'
 6import { Logo } from '@/components/Logo'
 7import { Navigation } from '@/components/Navigation'
 8import { Prose } from '@/components/Prose'
 9import { SectionProvider } from '@/components/SectionProvider'
10
11export function Layout({ children, sections = [] }) {
12  return (
13    <SectionProvider sections={sections}>
14      <div className="lg:ml-72 xl:ml-80">
15        <motion.header
16          layoutScroll
17          className="contents lg:pointer-events-none lg:fixed lg:inset-0 lg:z-40 lg:flex"
18        >
19          <div className="contents lg:pointer-events-auto lg:block lg:w-72 lg:overflow-y-auto lg:border-r lg:border-zinc-900/10 lg:px-6 lg:pb-8 lg:pt-4 lg:dark:border-white/10 xl:w-80">
20            <div className="hidden lg:flex">
21              <Link href="/" aria-label="Home">
22                <Logo className="h-6" />
23              </Link>
24            </div>
25            <Header />
26            <Navigation className="hidden lg:mt-10 lg:block" />
27          </div>
28        </motion.header>
29        <div className="relative px-4 pt-14 sm:px-6 lg:px-8">
30          <main className="py-16">
31            <Prose as="article">{children}</Prose>
32          </main>
33          <Footer />
34        </div>
35      </div>
36    </SectionProvider>
37  )
38}