Add currentUser template func

This commit is contained in:
2024-08-29 23:22:04 -04:00
parent 530672437c
commit c4e5d3575e
2 changed files with 15 additions and 2 deletions

View File

@@ -16,12 +16,15 @@
<a class="text-base font-semibold hover:text-blue-100 pr-8" href="/faq">FAQ</a>
</div>
<div class="space-x-4">
{{if currentUser }}
<form action="/signout" method="post" class="inline pr-4">
{{csrfField}}
<button type="submit">Sign out</button>
</form>
{{else}}
<a href="/signin">Sign in</a>
<a href="/signup" clss="px-4 py-2 bg-blue-700 hover:bg-blue-600 rounded">Sign up</a>
{{end}}
</div>
</nav>
</header>