mirror of
https://github.com/eliasstepanik/strudel.git
synced 2026-01-18 17:08:30 +00:00
42 lines
1.0 KiB
Plaintext
42 lines
1.0 KiB
Plaintext
---
|
|
import type { Frontmatter } from '../../config';
|
|
import MoreMenu from '../RightSidebar/MoreMenu.astro';
|
|
import TableOfContents from '../RightSidebar/TableOfContents';
|
|
import type { MarkdownHeading } from 'astro';
|
|
|
|
type Props = {
|
|
frontmatter: Frontmatter;
|
|
headings: MarkdownHeading[];
|
|
githubEditUrl: string;
|
|
};
|
|
|
|
const { frontmatter, headings, githubEditUrl } = Astro.props as Props;
|
|
const title = frontmatter.title;
|
|
---
|
|
|
|
<article id="article" class="content">
|
|
<section class="main-section">
|
|
<!-- TODO: add dropdown toc on mobile -->
|
|
<!-- <nav class="block sm:hidden mb-8">
|
|
<span>On this Page:</span>
|
|
<TableOfContents client:media="(max-width: 50em)" headings={headings} />
|
|
</nav> -->
|
|
<div class="prose prose-invert max-w-full pb-8">
|
|
<slot />
|
|
</div>
|
|
</section>
|
|
<nav class="block sm:hidden">
|
|
<MoreMenu editHref={githubEditUrl} />
|
|
</nav>
|
|
</article>
|
|
<style>
|
|
.content {
|
|
padding: 0;
|
|
max-width: 75ch;
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
</style>
|