move navigation to aside proper mobile handling update logo.svg remove pirata-one/only use it for the logo
45 lines
1.6 KiB
Plaintext
45 lines
1.6 KiB
Plaintext
package auth
|
|
|
|
templ UserComp(user string) {
|
|
<div id="user-info" class="flex items-center gap-2 text-nowrap">
|
|
if user != "" {
|
|
<div class="inline-block group relative">
|
|
<button class="font-semibold py-2 px-4 inline-flex items-center">
|
|
<span class="mr-1">{ user }</span>
|
|
<!-- SVG is arrow down -->
|
|
<svg class="fill-current h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
|
|
<path d="M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z"></path>
|
|
</svg>
|
|
</button>
|
|
<div class="absolute hidden group-has-hover:block w-full z-2">
|
|
<ul class="w-fit float-right mr-4 p-3 border-2 border-gray-200 rounded-lg bg-white shadow-lg">
|
|
<li class="mb-1">
|
|
<a class="button w-full px-1 button-neglect block" hx-post="/api/auth/signout" hx-target="#user-info">Sign Out</a>
|
|
</li>
|
|
<li class="mb-4">
|
|
<a class="button w-full px-1 button-neglect block" href="/auth/change-password">Change Password</a>
|
|
</li>
|
|
<li class="mb-4">
|
|
<button
|
|
hx-post="/transaction/recalculate"
|
|
hx-swap="none"
|
|
type="button"
|
|
class="button text-left w-full px-1 button-neglect block mt-4"
|
|
>Recalculate</button>
|
|
</li>
|
|
<li>
|
|
<a class="button w-full px-1 button-neglect text-gray-400 block" href="/auth/delete-account">
|
|
Delete
|
|
Account
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
} else {
|
|
<a href="/auth/signup" class="text-xl button px-1 button-neglect">Sign Up</a>
|
|
<a href="/auth/signin" class="text-xl button px-1 button-neglect">Sign In</a>
|
|
}
|
|
</div>
|
|
}
|