T48a Docs · Frame: titles and the list read plain words, links with a section route, long code wraps, the rail stays in flow on narrow screens, check.sh holds every docs example to Cargo.toml

This commit is contained in:
ZacharyZhang-NY committed 2026-10-01 11:52:29 -04:00
1 parent fba90c22e6
commit b2a4633333
4 files changed
+22 -11

No files matched your search

+3 -2
View File
@@ -37,7 +37,8 @@ export function Docs() {
const link = target.closest<HTMLAnchorElement>("a[href^='/']");
if (!link || e.metaKey || e.ctrlKey || e.shiftKey || e.button !== 0) return;
e.preventDefault();
navigate({ to: link.getAttribute("href")! });
const url = new URL(link.href);
navigate({ to: url.pathname, hash: url.hash.slice(1) || undefined });
};
return (
@@ -66,7 +67,7 @@ export function Docs() {
</nav>
</article>
{guide.toc.length > 0 && (
<nav className="doc-toc" aria-label="On this page">
<nav className="doc-toc" aria-label="On this page" data-lenis-prevent>
<ol>
{guide.toc.map((h) => (
<li key={h.id}>