aboutsummaryrefslogtreecommitdiff
path: root/themes/alps
diff options
context:
space:
mode:
Diffstat (limited to 'themes/alps')
-rw-r--r--themes/alps/mailbox.html20
-rw-r--r--themes/alps/message.html11
2 files changed, 20 insertions, 11 deletions
diff --git a/themes/alps/mailbox.html b/themes/alps/mailbox.html
index 8d9aa54..93a45ce 100644
--- a/themes/alps/mailbox.html
+++ b/themes/alps/mailbox.html
@@ -5,18 +5,22 @@
<aside>
<!-- the logo image, dimensions 200x32 may be present or not -->
<a href="/compose" class="new">Compose&nbsp;Mail</a>
- {{$current := .Mailbox}}
{{range .Mailboxes}}
- <a href="{{.URL}}"
- {{ if eq $current.Name .Name }}class="active"{{ end }}>
+ <a href="{{.URL}}" {{ if eq $.Mailbox.Name .Name }}class="active"{{ end }}>
{{ if eq .Name "INBOX" }}
Inbox
- {{else}}
- {{.Name}}
- {{end}}
- {{ if eq $current.Name .Name }}
- {{ if $current.Unseen }}({{ $current.Unseen }}){{ end }}
+ {{ else }}
+ {{ .Name }}
{{ end }}
+
+ {{ $unseen := 0 }}
+ {{ if eq .Name "INBOX" }}
+ {{ $unseen = $.Inbox.Unseen }}
+ {{ end }}
+ {{ if eq .Name $.Mailbox.Name }}
+ {{ $unseen = $.Mailbox.Unseen }}
+ {{ end }}
+ {{ if $unseen }}({{ $unseen }}){{ end }}
</a>
{{end}}
</aside>
diff --git a/themes/alps/message.html b/themes/alps/message.html
index 521e835..1d74489 100644
--- a/themes/alps/message.html
+++ b/themes/alps/message.html
@@ -32,7 +32,6 @@
<aside>
<!-- the logo image, dimensions 200x32 may be present or not -->
<a href="/compose" class="new">Compose&nbsp;Mail</a>
- {{$current := .Mailbox}}
{{range .Mailboxes}}
<a href="{{.URL}}"
{{ if eq $current.Name .Name }}class="active"{{ end }}>
@@ -41,9 +40,15 @@
{{else}}
{{.Name}}
{{end}}
- {{ if eq $current.Name .Name }}
- {{ if $current.Unseen }}({{ $current.Unseen }}){{ end }}
+
+ {{ $unseen := 0 }}
+ {{ if eq .Name "INBOX" }}
+ {{ $unseen = $.Inbox.Unseen }}
+ {{ end }}
+ {{ if eq .Name $.Mailbox.Name }}
+ {{ $unseen = $.Mailbox.Unseen }}
{{ end }}
+ {{ if $unseen }}({{ $unseen }}){{ end }}
</a>
{{end}}
</aside>