Update theme handling and add theme selection dropdown in Navbar.svelte
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
<li><a>Profile</a></li>
|
||||
<li><button on:click={navToLog}>My Log</button></li>
|
||||
<li><button on:click={navToSettings}>Settings</button></li>
|
||||
<form method="post" action="/" use:enhance>
|
||||
<li><button>Logout</button></li>
|
||||
<form method="post">
|
||||
<li><button formaction="/?/logout">Logout</button></li>
|
||||
</form>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user