Skip to content

Commit

Permalink
docs(nxdev): add skip to content shortcut (#9558)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcabanes committed Mar 28, 2022
1 parent 8b0f9d2 commit c058c30
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nx-dev/nx-dev/pages/[...segments].tsx
Expand Up @@ -85,7 +85,7 @@ export default function DocumentationPage({
return (
<>
<Header isDocViewer={true} />
<main>
<main id="main" role="main">
{vm.entryComponent}
<button
type="button"
Expand Down
8 changes: 8 additions & 0 deletions nx-dev/nx-dev/pages/_app.tsx
Expand Up @@ -48,6 +48,14 @@ export default function CustomApp({ Component, pageProps }: AppProps) {
<meta name="theme-color" content="#ffffff" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</Head>
<a
id="skip-to-content-link"
href="#main"
tabIndex={0}
className="bg-green-nx-base absolute top-3 left-8 -translate-y-24 rounded-md px-4 py-2 text-white transition focus:translate-y-0"
>
Skip to content
</a>
<div className="documentation-app bg-white text-gray-700 antialiased">
<Component {...pageProps} />
</div>
Expand Down
2 changes: 1 addition & 1 deletion nx-dev/nx-dev/pages/community.tsx
Expand Up @@ -190,7 +190,7 @@ export function Community(props: CommunityProps): ReactComponentElement<any> {
}}
/>
<Header useDarkBackground={false} />
<main>
<main id="main" role="main">
<div className="w-full">
<article
id="getting-started"
Expand Down
2 changes: 2 additions & 0 deletions nx-dev/nx-dev/pages/conf.tsx
Expand Up @@ -37,6 +37,8 @@ export function ConfPage(): ReactComponentElement<any> {
/>
<Header useDarkBackground={true} />
<main
id="main"
role="main"
style={{
background: 'linear-gradient(180deg, #143055 0%, #0b1a2d 100%)',
}}
Expand Down
2 changes: 1 addition & 1 deletion nx-dev/nx-dev/pages/index.tsx
Expand Up @@ -51,7 +51,7 @@ export function Index(): ReactComponentElement<any> {
/>
<h1 className="sr-only">Next generation monorepo tool</h1>
<Header useDarkBackground={false} />
<main role="main">
<main id="main" role="main">
<div className="w-full">
{/*INTRO COMPONENT*/}
<header
Expand Down

1 comment on commit c058c30

@vercel
Copy link

@vercel vercel bot commented on c058c30 Mar 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.