alps/themes/alps/util.html

56 lines
1.6 KiB
HTML
Raw Normal View History

{{ define "mbox-link" }}
2020-11-19 18:14:12 +00:00
{{ if not (.Info.HasAttr "\\Noselect") }}
<li {{ if .Info.Active }}class="active"{{ end }}>
<a href="{{.Info.URL}}">
{{- if eq .Info.Name "INBOX" -}}
2020-11-13 18:23:29 +00:00
Inbox
{{- else -}}
2020-11-19 18:14:12 +00:00
{{ .Info.Name }}
2020-11-13 18:23:29 +00:00
{{- end -}}
2020-11-19 18:14:12 +00:00
{{- if .Info.HasAttr "\\HasChildren" }}/{{ end }}
2020-11-13 18:23:29 +00:00
</a>
2020-11-19 18:14:12 +00:00
{{ if .Status }}
{{ if .Status.Unseen }}
<span class="unseen">({{.Status.Unseen}})</span>
{{ end }}
2020-11-13 18:23:29 +00:00
{{ end }}
</li>
{{ else }}
2020-11-13 18:23:29 +00:00
<li class="noselect">
2020-11-19 18:14:12 +00:00
{{.Info.Name}}{{- if .Info.HasAttr "\\HasChildren" }}/{{ end }}
2020-11-13 18:23:29 +00:00
</li>
{{ end }}
{{ end }}
{{ define "aside" }}
<aside>
2020-11-13 18:23:29 +00:00
<ul>
<!-- the logo image, dimensions 200x32 may be present or not -->
<li>
<a href="/compose" class="new
{{ if eq $.GlobalData.URL.Path "/compose" }}active{{ end }}
">Compose&nbsp;mail</a>
</li>
{{ with .CategorizedMailboxes }}
{{ with .Common.Inbox }}{{ template "mbox-link" . }}{{ end }}
{{ with .Common.Drafts }}{{ template "mbox-link" . }}{{ end }}
{{ with .Common.Sent }}{{ template "mbox-link" . }}{{ end }}
{{ with .Common.Junk }}{{ template "mbox-link" . }}{{ end }}
{{ with .Common.Trash }}{{ template "mbox-link" . }}{{ end }}
{{ with .Common.Archive }}{{ template "mbox-link" . }}{{ end }}
{{ if .Additional }}
<hr />
{{ range .Additional }}
{{ template "mbox-link" . }}
{{ end }}
{{ end }}
{{ end }}
<li>
<a href="/new-mailbox" class="new
{{ if eq $.GlobalData.URL.Path "/new-mailbox" }}active{{ end }}
">Create&nbsp;new&nbsp;folder</a>
</li>
</ul>
</aside>
{{ end }}