git.alexw.nyc home about git garden
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
<nav>
  <a href="/">home</a>
{{ if .AuthUser.LoggedIn }}
  <a href="/my_site">my_site</a>
  <a href="/me">me</a>
  {{ if .AuthUser.IsAdmin }}
  <a href="/admin">admin</a>
  {{ end }}
  <a href="/logout">logout</a>
  {{ if .AuthUser.ImpersonatingUser }}
<div class="impersonate">
  ({{.AuthUser.Username}} impersonated by {{.AuthUser.ImpersonatingUser}})</div>
  {{ end }}
{{ else }}
  <a href="/login">login</a>
  <b><a href="/register">register</a></b>

{{ end }}
</nav>