BrainMinder/assets/templates/partials/nav.tmpl

16 lines
417 B
Cheetah
Raw Normal View History

2024-08-22 10:13:16 +02:00
{{define "partial:nav"}}
<nav>
{{if .AuthenticatedUser}}
<form method="POST" action="/logout">
<input type='hidden' name='csrf_token' value='{{.CSRFToken}}'>
{{.AuthenticatedUser.Email}}
&middot;
<button class="link">Logout</button>
</form>
{{else}}
<a href="/signup">Signup</a>
<a href="/login">Login</a>
{{end}}
</nav>
{{end}}