Skip to content

Commit 7e21d2b

Browse files
committed
web: show docs toc in mobile above content. closes #63
1 parent c14440f commit 7e21d2b

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

deno.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/layouts/docs.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ export default {view: ({attrs, children}) => m(layout, Object.assign({
66
heading: "Documentation"
77
}, attrs),
88
<section>
9-
<div class="row justify-center items-start" style="gap: var(--16);">
10-
<nav class="md:hidden" style="flex: none; min-width: 256px; position: sticky; top: 0px;">
9+
<div class="row justify-center items-start sm:stack" style="gap: var(--16);">
10+
<nav style="flex: none; min-width: 256px;">
1111
<h5><a href="/docs/quickstart">Quickstart</a></h5>
1212
<ul>
1313
<li><a href="/docs/quickstart#using-from-cdn">Using from CDN</a></li>

web/static/style/site.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ body.blog > section nav > div {
140140
line-height: var(--7);
141141
}
142142

143+
body.docs > section nav {
144+
position: sticky; top: 0px;
145+
}
143146
body.docs > section nav ul {
144147
list-style-type: none;
145148
margin-top: 0;
@@ -295,6 +298,10 @@ pre > code > div {
295298
--h3-size: var(--5);
296299
}
297300

301+
body.docs > section nav {
302+
position: relative;
303+
}
304+
298305
body > header > nav {
299306
padding-top: var(--4);
300307
padding-bottom: var(--4);

0 commit comments

Comments
 (0)