From 6ba418c9b2fd02b2f784c20f83bd040585689c5f Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 22 Oct 2020 13:03:50 -0400 Subject: Generalize sidebar categorization logic --- themes/alps/util.html | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 themes/alps/util.html (limited to 'themes/alps/util.html') diff --git a/themes/alps/util.html b/themes/alps/util.html new file mode 100644 index 0000000..68736f1 --- /dev/null +++ b/themes/alps/util.html @@ -0,0 +1,41 @@ +{{ define "mbox-link" }} +{{ if not (.HasAttr "\\Noselect") }} + + {{- if eq .Name "INBOX" -}} + Inbox + {{- else -}} + {{ .Name }} + {{- end -}} + {{- if .HasAttr "\\HasChildren" }}/{{ end }} + + {{ if and (ne .Unseen -1) (ne .Unseen 0) }}({{ .Unseen }}){{ end }} + +{{ else }} + + {{.Name}}{{- if .HasAttr "\\HasChildren" }}/{{ end }} + +{{ end }} +{{ end }} + +{{ define "aside" }} + +{{ end }} -- cgit v1.2.3