1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-08-01 03:05:18 +02:00

Update theme handling and add theme selection dropdown in Navbar.svelte

This commit is contained in:
Sean Morley 2024-04-17 00:01:19 +00:00
parent 3892a3ea39
commit b76e655e38
7 changed files with 55 additions and 9 deletions

View file

@ -97,5 +97,18 @@
<UserAvatar {user} />
{/if}
<button class="btn btn-neutral ml-4" on:click={showModal}>About</button>
<div class="dropdown dropdown-bottom dropdown-end">
<div tabindex="0" role="button" class="btn m-1 ml-4">Themes</div>
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<ul
tabindex="0"
class="dropdown-content z-[1] menu p-2 shadow bg-base-100 rounded-box w-52"
>
<form method="POST">
<li><button formaction="/?/setTheme&theme=light">Light</button></li>
<li><button formaction="/?/setTheme&theme=dark">Dark</button></li>
</form>
</ul>
</div>
</div>
</div>