Load theme when navbar is closed

Previously, ThemeToggle only rendered when the navbar was open. Since it handles the theme code, the saved theme wouldn't load automatically on smaller screens.
This commit is contained in:
2023-08-05 14:02:53 -05:00
parent 09f94e67ee
commit 0fc01898d3

View File

@ -84,6 +84,8 @@
>
<!-- Slot for the progress bar -->
<slot />
<!-- Nav without links -->
<div class="flex items-center justify-between w-full">
<Logo />
<button
@ -97,7 +99,9 @@
/>
</button>
</div>
{#if showMenu}
<!-- Nav with links -->
<div class={showMenu ? "contents" : "hidden"}>
<div
class="
{linkContainerStyles}
@ -116,7 +120,7 @@
{/each}
<ThemeToggle />
</div>
{/if}
</div>
</nav>
<noscript>