Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,28 @@
@tailwind components;
@tailwind utilities;

.skip-to-content {
position: fixed;
top: 0.75rem;
left: 0.75rem;
z-index: 9999;
padding: 0.5rem 1rem;
border-radius: 0.5rem;
background-color: var(--accent-purple);
color: #fff;
font-weight: 500;
text-decoration: none;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
transform: translateY(-200%);
transition: transform 0.15s ease-in-out;
}

.skip-to-content:focus {
transform: translateY(0);
outline: 2px solid var(--accent-purple);
outline-offset: 2px;
}

.radix-themes {
--cursor-button: pointer;
--iris-9: var(--accent);
Expand Down
2 changes: 2 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type {Metadata} from 'next';
import {Rubik} from 'next/font/google';
import Script from 'next/script';
import PlausibleProvider from 'next-plausible';
import {SkipToContent} from 'sentry-docs/components/skipToContent';
import {ThemeProvider} from 'sentry-docs/components/theme-provider';

const rubik = Rubik({
Expand Down Expand Up @@ -43,6 +44,7 @@ export default function RootLayout({children}: {children: React.ReactNode}) {
disableTransitionOnChange
>
<Theme accentColor="iris" grayColor="sand" radius="large" scaling="95%">
<SkipToContent />
{children}
</Theme>
</ThemeProvider>
Expand Down
2 changes: 1 addition & 1 deletion app/not-found.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function NotFound() {
) : (
<Header pathname="/" searchPlatforms={[]} noSearch platforms={[]} />
)}
<main className="px-8 pt-28">
<main id="main" className="px-8 pt-28">
<h1 className="font-medium text-3xl mb-4">Page Not Found</h1>
<p className="text-lg">We couldn't find the page you were looking for :(</p>

Expand Down
Loading
Loading