Skip to content

Commit 30bb11a

Browse files
brabojclaude
andcommitted
fix: move mobile ToC inside main content for proper sticky behavior
Sticky positioning requires the element to be inside the scrolling container. Moved from between Header and site-main to inside main. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 97c671a commit 30bb11a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

astro-site/src/layouts/DocLayout.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ const ogImage = new URL("/tutorial-git/images/og-banner.png", Astro.site);
6262
<body>
6363
<a href="#main-content" class="skip-link">Skip to main content</a>
6464
<Header currentPath={currentPath} />
65-
<MobileToc headings={headings} />
6665
<div class="site-main">
6766
<TableOfContents headings={headings} />
6867
<div class="resize-handle" data-side="left"></div>
6968
<main class="content" id="main-content">
69+
<MobileToc headings={headings} />
7070
<h1>{title}</h1>
7171
<slot />
7272
</main>

0 commit comments

Comments
 (0)