A webmail client. Forked from https://git.sr.ht/~migadu/alps
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

56 lines
1.6 KiB

  1. {{ define "mbox-link" }}
  2. {{ if not (.Info.HasAttr "\\Noselect") }}
  3. <li {{ if .Info.Active }}class="active"{{ end }}>
  4. <a href="{{.Info.URL}}">
  5. {{- if eq .Info.Name "INBOX" -}}
  6. Inbox
  7. {{- else -}}
  8. {{ .Info.Name }}
  9. {{- end -}}
  10. {{- if .Info.HasAttr "\\HasChildren" }}/{{ end }}
  11. </a>
  12. {{ if .Status }}
  13. {{ if .Status.Unseen }}
  14. <span class="unseen">({{.Status.Unseen}})</span>
  15. {{ end }}
  16. {{ end }}
  17. </li>
  18. {{ else }}
  19. <li class="noselect">
  20. {{.Info.Name}}{{- if .Info.HasAttr "\\HasChildren" }}/{{ end }}
  21. </li>
  22. {{ end }}
  23. {{ end }}
  24. {{ define "aside" }}
  25. <aside>
  26. <ul>
  27. <!-- the logo image, dimensions 200x32 may be present or not -->
  28. <li>
  29. <a href="/compose" class="new
  30. {{ if eq $.GlobalData.URL.Path "/compose" }}active{{ end }}
  31. ">Compose&nbsp;mail</a>
  32. </li>
  33. {{ with .CategorizedMailboxes }}
  34. {{ with .Common.Inbox }}{{ template "mbox-link" . }}{{ end }}
  35. {{ with .Common.Drafts }}{{ template "mbox-link" . }}{{ end }}
  36. {{ with .Common.Sent }}{{ template "mbox-link" . }}{{ end }}
  37. {{ with .Common.Junk }}{{ template "mbox-link" . }}{{ end }}
  38. {{ with .Common.Trash }}{{ template "mbox-link" . }}{{ end }}
  39. {{ with .Common.Archive }}{{ template "mbox-link" . }}{{ end }}
  40. {{ if .Additional }}
  41. <hr />
  42. {{ range .Additional }}
  43. {{ template "mbox-link" . }}
  44. {{ end }}
  45. {{ end }}
  46. {{ end }}
  47. <li>
  48. <a href="/new-mailbox" class="new
  49. {{ if eq $.GlobalData.URL.Path "/new-mailbox" }}active{{ end }}
  50. ">Create&nbsp;new&nbsp;folder</a>
  51. </li>
  52. </ul>
  53. </aside>
  54. {{ end }}