aboutsummaryrefslogtreecommitdiff
path: root/themes/sourcehut/nav.html
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-02-12 01:20:21 +0100
committerSimon Ser <contact@emersion.fr>2020-02-12 01:20:21 +0100
commit2733dcd52807c21a2831a524fb175c5b03ab9ea4 (patch)
tree448ea06359a08882eec85c1327071ad01456b722 /themes/sourcehut/nav.html
parent73d54ca35c043eecbee51f6b1f5a051e0c0779c1 (diff)
downloadalps-2733dcd52807c21a2831a524fb175c5b03ab9ea4.tar.gz
alps-2733dcd52807c21a2831a524fb175c5b03ab9ea4.zip
themes/sourcehut: display username in navbar
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>