blob: 142e69bc5b35db46dc0a023d335308591c5b7197 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
---
import TableOfContents from './TableOfContents.tsx';
import ThemeToggleButton from './ThemeToggleButton.tsx';
import MoreMenu from './MoreMenu.astro';
const { content, githubEditUrl } = Astro.props;
const headers = content.astro?.headers;
---
<nav class="sidebar-nav" aria-labelledby="grid-right">
<div class="sidebar-nav-inner">
{headers && <TableOfContents client:media="(min-width: 50em)" headers={headers} />}
<MoreMenu editHref={githubEditUrl} />
<div style="margin: 2rem 0; text-align: center;">
<ThemeToggleButton client:visible />
</div>
</div>
</nav>
<style>
.sidebar-nav {
width: 100%;
position: sticky;
top: 0;
}
.sidebar-nav-inner {
height: 100%;
padding: 0;
padding-top: var(--doc-padding);
overflow: auto;
}
</style>
|