Skip to content button

This commit is contained in:
Michał Gdula 2024-06-07 23:13:22 +01:00
parent e62077348d
commit 6fac6596b2
8 changed files with 39 additions and 5 deletions

View file

@ -114,6 +114,7 @@ const address = import.meta.env.PUBLIC_ADDRESS;
)}
</head>
<body>
<a href="#content-skip" tabindex="0" id="content-skip-button">Skip to content</a>
<div class="banner">
<img
src={Banner.src}
@ -135,3 +136,28 @@ const address = import.meta.env.PUBLIC_ADDRESS;
document.addEventListener("DOMContentLoaded", () => update(img))
</script>
</html>
<style lang="scss">
@import "../styles/vars.scss";
#content-skip-button {
padding: 16px 32px;
position: absolute;
top: -1000000px;
left: -1000000px;
z-index: 999999999;
font-weight: bolder;
text-decoration: none;
background-color: $accent;
color: $light;
&:focus {
top: 0;
left: 0;
outline: 0 solid transparent;
}
}
</style>