mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-08-05 21:25:19 +02:00
Fix log in and signup buttons in reactive navbar
This commit is contained in:
parent
755dc68301
commit
d4c24df0aa
1 changed files with 18 additions and 4 deletions
|
@ -89,7 +89,7 @@
|
||||||
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
|
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
|
||||||
<ul
|
<ul
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
class="menu menu-sm dropdown-content mt-3 z-[1] p-2 shadow bg-base-100 rounded-box w-52"
|
class="menu menu-sm dropdown-content mt-3 z-[1] p-2 shadow bg-base-100 rounded-box w-52 gap-2"
|
||||||
>
|
>
|
||||||
<li>
|
<li>
|
||||||
<button on:click={() => goto("/log")}>My Log</button>
|
<button on:click={() => goto("/log")}>My Log</button>
|
||||||
|
@ -103,6 +103,15 @@
|
||||||
<li>
|
<li>
|
||||||
<button on:click={() => goto("/featured")}>Featured</button>
|
<button on:click={() => goto("/featured")}>Featured</button>
|
||||||
</li>
|
</li>
|
||||||
|
{#if !user}
|
||||||
|
<li>
|
||||||
|
<button class="btn btn-primary" on:click={toToLogin}>Login</button>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<button class="btn btn-primary" on:click={goToSignup}>Signup</button
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
{/if}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<a class="btn btn-ghost text-xl" href="/">AdventureLog 🗺️</a>
|
<a class="btn btn-ghost text-xl" href="/">AdventureLog 🗺️</a>
|
||||||
|
@ -129,14 +138,19 @@
|
||||||
>Featured</button
|
>Featured</button
|
||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
|
{#if !user}
|
||||||
|
<li>
|
||||||
|
<button class="btn btn-primary" on:click={toToLogin}>Login</button>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<button class="btn btn-primary" on:click={goToSignup}>Signup</button>
|
||||||
|
</li>
|
||||||
|
{/if}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-end">
|
<div class="navbar-end">
|
||||||
{#if user}
|
{#if user}
|
||||||
<UserAvatar {user} />
|
<UserAvatar {user} />
|
||||||
{:else}
|
|
||||||
<button class="btn btn-primary mr-2" on:click={toToLogin}>Login</button>
|
|
||||||
<button class="btn btn-primary" on:click={goToSignup}>Signup</button>
|
|
||||||
{/if}
|
{/if}
|
||||||
<div class="dropdown dropdown-bottom dropdown-end">
|
<div class="dropdown dropdown-bottom dropdown-end">
|
||||||
<div tabindex="0" role="button" class="btn m-1 ml-4">
|
<div tabindex="0" role="button" class="btn m-1 ml-4">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue