themes/sourcehut: display username in navbar

This commit is contained in:
Simon Ser 2020-02-12 01:20:21 +01:00
parent 73d54ca35c
commit 2733dcd528
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
8 changed files with 29 additions and 33 deletions

View file

@ -1,5 +1,5 @@
{{template "head.html"}} {{template "head.html"}}
{{template "nav.html"}} {{template "nav.html" .Global}}
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">

View file

@ -1,5 +1,5 @@
{{template "head.html"}} {{template "head.html"}}
{{template "nav.html"}} {{template "nav.html" .Global}}
{{$fn := .AddressObject.Card.Value "FN"}} {{$fn := .AddressObject.Card.Value "FN"}}

View file

@ -1,5 +1,5 @@
{{template "head.html"}} {{template "head.html"}}
{{template "nav.html"}} {{template "nav.html" .Global}}
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">

View file

@ -1,12 +1,5 @@
{{template "head.html"}} {{template "head.html"}}
<nav class="container navbar navbar-light navbar-expand-sm"> {{template "nav.html" .Global}}
<div class="col-md-12">
<a class="navbar-brand" href="/">
koushin
<span class="text-danger">webmail</span>
</a>
</div>
</nav>
<div class="container"> <div class="container">
<form method="post" action="/login" class="col-md-6"> <form method="post" action="/login" class="col-md-6">

View file

@ -1,5 +1,5 @@
{{template "head.html"}} {{template "head.html"}}
{{template "nav.html"}} {{template "nav.html" .Global}}
<!-- TODO: Share tabs if reasonable --> <!-- TODO: Share tabs if reasonable -->
<div class="container-fluid"> <div class="container-fluid">

View file

@ -1,5 +1,5 @@
{{template "head.html"}} {{template "head.html"}}
{{template "nav.html"}} {{template "nav.html" .Global}}
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">

View file

@ -4,23 +4,26 @@
koushin koushin
<span class="text-danger">mail</span> <span class="text-danger">mail</span>
</a> </a>
<ul class="navbar-nav mr-auto d-none d-sm-flex"> {{if .LoggedIn}}
<li class="nav-item active"> <ul class="navbar-nav mr-auto d-none d-sm-flex">
<a href="/" class="nav-link">mail</a> <li class="nav-item active">
</li> <a href="/" class="nav-link">mail</a>
<!-- TODO: only show these links if plugins are loaded --> </li>
<li class="nav-item"> <!-- TODO: only show these links if plugins are loaded -->
<a href="/contacts" class="nav-link">contacts</a> <li class="nav-item">
</li> <a href="/contacts" class="nav-link">contacts</a>
<li class="nav-item"> </li>
<a href="/calendar" class="nav-link">calendar</a> <li class="nav-item">
</li> <a href="/calendar" class="nav-link">calendar</a>
</ul> </li>
<div class="login"> </ul>
<span class="navbar-text"> <div class="login">
<a href="/settings">Settings</a> <span class="navbar-text">
Logged in as {{.Username}} —
<a href="/logout">Log out</a> <a href="/settings">Settings</a>
</span>
</div> <a href="/logout">Log out</a>
</span>
</div>
{{end}}
</nav> </nav>

View file

@ -1,5 +1,5 @@
{{template "head.html"}} {{template "head.html"}}
{{template "nav.html"}} {{template "nav.html" .Global}}
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">