blob: ce9fb2b769972b433a56b70497c9fbea217e057b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
<nav class="container-fluid navbar navbar-light navbar-expand-sm">
<a class="navbar-brand" href="/">
alps
<span class="text-danger">mail</span>
</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 }}
</nav>
|