diff options
| author | aman333nolawz <amananudhiu@gmail.com> | 2026-03-02 21:49:13 +0530 |
|---|---|---|
| committer | aman333nolawz <amananudhiu@gmail.com> | 2026-03-02 21:49:13 +0530 |
| commit | d41eff9eccf66644c4c60f53cb516bf079937a28 (patch) | |
| tree | 248a0863a3181369f943d678ec4273911d35efac /src/layouts | |
Using astro-erudite for static site generation
Diffstat (limited to 'src/layouts')
| -rw-r--r-- | src/layouts/Layout.astro | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro new file mode 100644 index 0000000..6184f18 --- /dev/null +++ b/src/layouts/Layout.astro @@ -0,0 +1,41 @@ +--- +import '@/styles/global.css' +import '@/styles/typography.css' + +import Footer from '@/components/Footer.astro' +import Head from '@/components/Head.astro' +import Header from '@/components/Header.astro' +import { SITE } from '@/consts' +import { cn } from '@/lib/utils' + +interface Props { + class?: string +} + +const { class: className } = Astro.props +--- + +<!doctype html> +<html + class="bg-background text-foreground scheme-light-dark" + lang={SITE.locale} +> + <Head> + <slot name="head" /> + </Head> + <body class="flex h-fit min-h-screen flex-col gap-y-6 font-sans"> + <header + class="bg-background/50 sticky top-0 z-50 divide-y backdrop-blur-sm xl:divide-none" + > + <Header /> + <slot name="subposts-navigation" /> + <slot name="table-of-contents" /> + </header> + <main + class={cn('w-full mx-auto flex grow flex-col gap-y-6 px-4', className)} + > + <slot /> + </main> + <Footer /> + </body> +</html> |
