alps/themes/sourcehut/nav.html

45 lines
1.1 KiB
HTML
Raw Normal View History

2019-12-12 18:54:57 +00:00
<nav class="container-fluid navbar navbar-light navbar-expand-sm">
<a class="navbar-brand" href="/">
2020-05-13 12:07:44 +00:00
alps
<span class="text-danger">mail</span>
2019-12-12 18:54:57 +00:00
</a>
{{ if .LoggedIn }}
{{ $page := (index .Path 0) }}
<ul class="navbar-nav mr-auto d-none d-sm-flex">
<li class="nav-item
{{ if or (eq $page "mailbox") (eq $page "message") (eq $page "compose") }}
active
{{ end }}
">
<a href="/" class="nav-link">mail</a>
</li>
{{ if call .HavePlugin "carddav" }}
<li class="nav-item
{{ if eq $page "contacts" }}
active
{{ end }}
">
<a href="/contacts" class="nav-link">contacts</a>
</li>
{{ end }}
{{ if call .HavePlugin "caldav" }}
<li class="nav-item
{{ if eq $page "calendar" }}
active
{{ end }}
">
<a href="/calendar" class="nav-link">calendar</a>
</li>
{{ end }}
</ul>
<div class="login">
<span class="navbar-text">
Logged in as {{ .Username }} —
<a href="/settings">Settings</a>
<a href="/logout">Log out</a>
</span>
</div>
{{ end }}
2019-12-12 18:54:57 +00:00
</nav>