mirror of
https://codeberg.org/uzu/strudel
synced 2026-08-19 10:36:42 -04:00
51 lines
1.9 KiB
Plaintext
51 lines
1.9 KiB
Plaintext
---
|
|
import HeadCommon from '../components/HeadCommon.astro';
|
|
import HeadSEO from '../components/HeadSEO.astro';
|
|
import Header from '../components/Header/Header.astro';
|
|
import PageContent from '../components/PageContent/PageContent.astro';
|
|
import RightSidebar from '../components/RightSidebar/RightSidebar.astro';
|
|
import * as CONFIG from '../config';
|
|
import type { MarkdownHeading } from 'astro';
|
|
import '../docs/docs.css';
|
|
import ReferenceSidebar from '../components/LeftSidebar/ReferenceSidebar.astro';
|
|
|
|
type Props = {
|
|
frontmatter: CONFIG.Frontmatter;
|
|
headings: MarkdownHeading[];
|
|
};
|
|
|
|
const { frontmatter, headings } = Astro.props as Props;
|
|
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
|
|
const currentPage = Astro.url.pathname;
|
|
const currentFile = `src/pages${currentPage.replace(/\/$/, '')}.mdx`;
|
|
const githubEditUrl = `${CONFIG.GITHUB_EDIT_URL}/${currentFile}`;
|
|
---
|
|
|
|
<html dir={frontmatter.dir ?? 'ltr'} lang={frontmatter.lang ?? 'en'} class="initial dark">
|
|
<head>
|
|
<HeadCommon />
|
|
<HeadSEO frontmatter={frontmatter} canonicalUrl={canonicalURL} />
|
|
<title>
|
|
{frontmatter.title ? `${frontmatter.title} 🌀 ${CONFIG.SITE.title}` : CONFIG.SITE.title}
|
|
</title>
|
|
</head>
|
|
|
|
<body class="h-app-height text-gray-50 bg-background">
|
|
<div class="w-full h-full space-y-4 flex flex-col">
|
|
<header class="max-w-full fixed top-0 w-full z-[100]">
|
|
<Header currentPage={currentPage} />
|
|
</header>
|
|
<main class="relative pt-16">
|
|
<div class="h-full top-0 overflow-auto min-w-[300px] flex xl:justify-center pr-4 pl-4 md:pl-[300px] xl:pl-0">
|
|
<aside title="Site Navigation" class="w-[300px] px-6 left-0 hidden md:block fixed h-full">
|
|
<ReferenceSidebar currentPage={currentPage} />
|
|
</aside>
|
|
<PageContent frontmatter={frontmatter} headings={headings} githubEditUrl={githubEditUrl}>
|
|
<slot />
|
|
</PageContent>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
</body>
|
|
</html>
|