alps/themes/alps/util.html

43 lines
1.3 KiB
HTML
Raw Normal View History

{{ define "mbox-link" }}
{{ if not (.HasAttr "\\Noselect") }}
<a href="{{.URL}}" {{ if .Active }}class="active"{{ end }}>
{{- if eq .Name "INBOX" -}}
Inbox
{{- else -}}
{{ .Name }}
{{- end -}}
{{- if .HasAttr "\\HasChildren" }}/{{ end }}
</a>
{{ else }}
<span class="noselect">
{{.Name}}{{- if .HasAttr "\\HasChildren" }}/{{ end }}
</span>
{{ end }}
{{ end }}
{{ define "aside" }}
<aside>
<!-- the logo image, dimensions 200x32 may be present or not -->
<a href="/compose" class="new
{{ if eq $.GlobalData.URL.Path "/compose" }}active{{ end }}
2020-10-30 17:41:25 +00:00
">Compose&nbsp;mail</a>
{{ with .CategorizedMailboxes }}
2020-10-30 19:21:33 +00:00
{{ 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 }}
2020-10-30 17:41:25 +00:00
<a href="/new-mailbox" class="new
{{ if eq $.GlobalData.URL.Path "/new-mailbox" }}active{{ end }}
">Create&nbsp;new&nbsp;folder</a>
</aside>
{{ end }}