Continue Header, Footer, add SkipNavLink
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
---
|
||||
interface Props {
|
||||
contentId: string;
|
||||
}
|
||||
|
||||
const { contentId } = Astro.props;
|
||||
---
|
||||
|
||||
<a href={`#${contentId}`}>Skip to main content</a>
|
||||
|
||||
<style>
|
||||
a {
|
||||
position: fixed;
|
||||
left: -10000px;
|
||||
top: 1.35rem;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
overflow: hidden;
|
||||
|
||||
padding: 0.5rem 0.75rem;
|
||||
border-radius: 0.5rem;
|
||||
background-color: oklch(from var(--clr-ts-red-400) calc(l - 0.05) c h);
|
||||
font-weight: 600;
|
||||
|
||||
z-index: 10;
|
||||
opacity: 0;
|
||||
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
transition: opacity 250ms;
|
||||
}
|
||||
}
|
||||
|
||||
a:focus {
|
||||
left: 5rem;
|
||||
width: auto;
|
||||
height: auto;
|
||||
opacity: 1;
|
||||
|
||||
border: 2px solid var(--clr-light-400);
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user