This commit is contained in:
lbenedar
2026-03-06 14:44:08 +03:00
parent 894d152aae
commit 94345eff97
6 changed files with 42 additions and 17 deletions

View File

@@ -2,14 +2,19 @@
<nav>
<div>
<a href='/'>Home</a>
<a href='/snippet/create'>Create snippet</a>
{{if .IsAuthenticated}}
<a href='/snippet/create'>Create snippet</a>
{{end}}
</div>
<div>
<a href='/user/signup'>Signup</a>
<a href='/user/login'>Login</a>
<form action='/user/logout' method='POST'>
<button>Logout</button>
</form>
{{if .IsAuthenticated}}
<form action='/user/logout' method='POST'>
<button>Logout</button>
</form>
{{else}}
<a href='/user/signup'>Signup</a>
<a href='/user/login'>Login</a>
{{end}}
</div>
</nav>
{{end}}