feat: add skip navigation button (#140)

Co-authored-by: afn <hey@afn.im>
This commit is contained in:
zalnars 2023-08-09 19:23:03 +02:00 committed by GitHub
parent 806a5de320
commit 36229adc78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 5 deletions

View File

@ -51,6 +51,8 @@
<svelte:window bind:scrollY={y} />
<nav class:scrolled={y > 10}>
<a class="menu-btn skiptab-btn" href="#skiptab">Skip navigation</a>
<button
class="menu-btn mobile-only"
on:click={() => (menuOpen = !menuOpen)}
@ -321,4 +323,21 @@
.menu-btn.open .menu-btn__burger::after {
transform: rotate(-45deg) translate(10px, 10px);
}
.skiptab-btn {
position: fixed;
left: -300px;
border-radius: 100px;
text-decoration: none;
background-color: var(--accent-color);
z-index: 10;
color: var(--grey-four);
font-weight: 600;
font-size: 0.95rem;
padding: 16px 24px;
}
.skiptab-btn:focus {
left: 12px;
}
</style>

View File

@ -105,10 +105,12 @@
</svelte:fragment>
</Dialogue>
{#if $show_loading_animation}
<Spinner />
{:else}
<slot />
{/if}
<div id="skiptab">
{#if $show_loading_animation}
<Spinner />
{:else}
<slot />
{/if}
</div>
<!-- <Footer> -->
</QueryClientProvider>