mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-30 00:06:59 -04:00
22 lines
690 B
Plaintext
22 lines
690 B
Plaintext
---
|
|
import TableOfContents from './TableOfContents';
|
|
import MoreMenu from './MoreMenu.astro';
|
|
import type { MarkdownHeading } from 'astro';
|
|
import AvatarList from '../Footer/AvatarList.astro';
|
|
|
|
type Props = {
|
|
headings: MarkdownHeading[];
|
|
githubEditUrl?: string;
|
|
};
|
|
|
|
const { headings, githubEditUrl } = Astro.props as Props;
|
|
let currentPage = Astro.url.pathname;
|
|
// remove slash before #
|
|
currentPage = currentPage.endsWith('/') ? currentPage.slice(0, -1) : currentPage;
|
|
---
|
|
|
|
<nav aria-labelledby="grid-right" class="w-64 text-foreground">
|
|
<TableOfContents client:media="(min-width: 50em)" headings={headings} currentPage={currentPage} />
|
|
<MoreMenu editHref={githubEditUrl} />
|
|
</nav>
|