aboutsummaryrefslogtreecommitdiff
path: root/themes/sourcehut/nav.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/sourcehut/nav.html')
-rw-r--r--themes/sourcehut/nav.html41
1 files changed, 22 insertions, 19 deletions
diff --git a/themes/sourcehut/nav.html b/themes/sourcehut/nav.html
index d41ccd8..972fc48 100644
--- a/themes/sourcehut/nav.html
+++ b/themes/sourcehut/nav.html
@@ -4,23 +4,26 @@
koushin
<span class="text-danger">mail</span>
</a>
- <ul class="navbar-nav mr-auto d-none d-sm-flex">
- <li class="nav-item active">
- <a href="/" class="nav-link">mail</a>
- </li>
- <!-- TODO: only show these links if plugins are loaded -->
- <li class="nav-item">
- <a href="/contacts" class="nav-link">contacts</a>
- </li>
- <li class="nav-item">
- <a href="/calendar" class="nav-link">calendar</a>
- </li>
- </ul>
- <div class="login">
- <span class="navbar-text">
- <a href="/settings">Settings</a>
- —
- <a href="/logout">Log out</a>
- </span>
- </div>
+ {{if .LoggedIn}}
+ <ul class="navbar-nav mr-auto d-none d-sm-flex">
+ <li class="nav-item active">
+ <a href="/" class="nav-link">mail</a>
+ </li>
+ <!-- TODO: only show these links if plugins are loaded -->
+ <li class="nav-item">
+ <a href="/contacts" class="nav-link">contacts</a>
+ </li>
+ <li class="nav-item">
+ <a href="/calendar" class="nav-link">calendar</a>
+ </li>
+ </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>