mirror of
https://github.com/ProjectSegfault/website.git
synced 2024-12-23 05:29:58 +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:
parent
09f94e67ee
commit
0fc01898d3
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user