mirror of
https://github.com/ProjectSegfault/website.git
synced 2025-05-31 14:12:04 +05:30
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:
@ -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>
|
||||
|
Reference in New Issue
Block a user