diff options
Diffstat (limited to 'themes/sourcehut')
-rw-r--r-- | themes/sourcehut/address-book.html | 2 | ||||
-rw-r--r-- | themes/sourcehut/address-object.html | 2 | ||||
-rw-r--r-- | themes/sourcehut/compose.html | 2 | ||||
-rw-r--r-- | themes/sourcehut/login.html | 9 | ||||
-rw-r--r-- | themes/sourcehut/mailbox.html | 2 | ||||
-rw-r--r-- | themes/sourcehut/message.html | 2 | ||||
-rw-r--r-- | themes/sourcehut/nav.html | 41 | ||||
-rw-r--r-- | themes/sourcehut/settings.html | 2 |
8 files changed, 29 insertions, 33 deletions
diff --git a/themes/sourcehut/address-book.html b/themes/sourcehut/address-book.html index 4becfda..2df65c1 100644 --- a/themes/sourcehut/address-book.html +++ b/themes/sourcehut/address-book.html @@ -1,5 +1,5 @@ {{template "head.html"}} -{{template "nav.html"}} +{{template "nav.html" .Global}} <div class="container-fluid"> <div class="row"> diff --git a/themes/sourcehut/address-object.html b/themes/sourcehut/address-object.html index 4e4f2de..11db5e1 100644 --- a/themes/sourcehut/address-object.html +++ b/themes/sourcehut/address-object.html @@ -1,5 +1,5 @@ {{template "head.html"}} -{{template "nav.html"}} +{{template "nav.html" .Global}} {{$fn := .AddressObject.Card.Value "FN"}} diff --git a/themes/sourcehut/compose.html b/themes/sourcehut/compose.html index 2433553..7538a36 100644 --- a/themes/sourcehut/compose.html +++ b/themes/sourcehut/compose.html @@ -1,5 +1,5 @@ {{template "head.html"}} -{{template "nav.html"}} +{{template "nav.html" .Global}} <div class="container-fluid"> <div class="row"> diff --git a/themes/sourcehut/login.html b/themes/sourcehut/login.html index 08074fe..63edfd8 100644 --- a/themes/sourcehut/login.html +++ b/themes/sourcehut/login.html @@ -1,12 +1,5 @@ {{template "head.html"}} -<nav class="container navbar navbar-light navbar-expand-sm"> - <div class="col-md-12"> - <a class="navbar-brand" href="/"> - koushin - <span class="text-danger">webmail</span> - </a> - </div> -</nav> +{{template "nav.html" .Global}} <div class="container"> <form method="post" action="/login" class="col-md-6"> diff --git a/themes/sourcehut/mailbox.html b/themes/sourcehut/mailbox.html index 313b89d..e360f25 100644 --- a/themes/sourcehut/mailbox.html +++ b/themes/sourcehut/mailbox.html @@ -1,5 +1,5 @@ {{template "head.html"}} -{{template "nav.html"}} +{{template "nav.html" .Global}} <!-- TODO: Share tabs if reasonable --> <div class="container-fluid"> diff --git a/themes/sourcehut/message.html b/themes/sourcehut/message.html index 971b59f..4e1ab44 100644 --- a/themes/sourcehut/message.html +++ b/themes/sourcehut/message.html @@ -1,5 +1,5 @@ {{template "head.html"}} -{{template "nav.html"}} +{{template "nav.html" .Global}} <div class="container-fluid"> <div class="row"> 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> diff --git a/themes/sourcehut/settings.html b/themes/sourcehut/settings.html index d52b100..292d5cc 100644 --- a/themes/sourcehut/settings.html +++ b/themes/sourcehut/settings.html @@ -1,5 +1,5 @@ {{template "head.html"}} -{{template "nav.html"}} +{{template "nav.html" .Global}} <div class="container-fluid"> <div class="row"> |