mirror of
https://github.com/ProjectSegfault/website.git
synced 2024-11-26 16:52:08 +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 for the progress bar -->
|
||||||
<slot />
|
<slot />
|
||||||
|
|
||||||
|
<!-- Nav without links -->
|
||||||
<div class="flex items-center justify-between w-full">
|
<div class="flex items-center justify-between w-full">
|
||||||
<Logo />
|
<Logo />
|
||||||
<button
|
<button
|
||||||
@ -97,7 +99,9 @@
|
|||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
{#if showMenu}
|
|
||||||
|
<!-- Nav with links -->
|
||||||
|
<div class={showMenu ? "contents" : "hidden"}>
|
||||||
<div
|
<div
|
||||||
class="
|
class="
|
||||||
{linkContainerStyles}
|
{linkContainerStyles}
|
||||||
@ -116,7 +120,7 @@
|
|||||||
{/each}
|
{/each}
|
||||||
<ThemeToggle />
|
<ThemeToggle />
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<noscript>
|
<noscript>
|
||||||
|
Loading…
Reference in New Issue
Block a user