aboutsummaryrefslogtreecommitdiff
path: root/themes/alps/util.html
blob: 93b845499d4138e233ad6c1393f9b0ca0f8815a9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{{ 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 }}
  ">Compose&nbsp;mail</a>
  {{ 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 }}
  <a href="/new-mailbox" class="new
    {{ if eq $.GlobalData.URL.Path "/new-mailbox" }}active{{ end }}
  ">Create&nbsp;new&nbsp;folder</a>
</aside>
{{ end }}