From 6c8c7dca109f46201423c5469170fcb986765afb Mon Sep 17 00:00:00 2001 From: Josh Collinsworth Date: Wed, 21 Aug 2024 11:04:12 -0500 Subject: [PATCH] Implement skip link (#729) --- _components/Header.tsx | 4 ++-- _includes/doc.tsx | 5 ++++- _includes/layout.tsx | 6 ++++++ examples.page.tsx | 9 ++++++--- index.page.tsx | 7 +++++-- 5 files changed, 23 insertions(+), 8 deletions(-) diff --git a/_components/Header.tsx b/_components/Header.tsx index 53aa9e064..77f022c8d 100644 --- a/_components/Header.tsx +++ b/_components/Header.tsx @@ -7,7 +7,7 @@ export default function Header({ }) { const reference = url.startsWith("/api"); return ( -
)} -
+ ); } diff --git a/_includes/doc.tsx b/_includes/doc.tsx index e8e6da598..7dbea7e2f 100644 --- a/_includes/doc.tsx +++ b/_includes/doc.tsx @@ -103,7 +103,10 @@ export default function Page(props: Lume.Data, helpers: Lume.Helpers) { class="absolute top-16 bottom-0 left-0 right-0 lg:left-74 overflow-y-auto lg:grid lg:grid-cols-7 lg:gap-8 max-w-screen-2xl mx-auto" style={{ scrollbarGutter: "stable" }} > -
+
+ + Skip to main content + {props.children} diff --git a/examples.page.tsx b/examples.page.tsx index e4d747b8b..85fb1c8dd 100644 --- a/examples.page.tsx +++ b/examples.page.tsx @@ -67,7 +67,7 @@ export default function* (_data: Lume.Data, helpers: Lume.Helpers) { title: `${example.parsed.title} - Deno by Example`, content: (
-
+

+

-
+
), }; } diff --git a/index.page.tsx b/index.page.tsx index f1534047f..07908252b 100644 --- a/index.page.tsx +++ b/index.page.tsx @@ -36,7 +36,10 @@ export const sidebar = [ export default function () { return ( -
+
{/* Hero section */}
@@ -449,7 +452,7 @@ export default function () {
-
+
); }