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.
 
 
 
 

71 lines
1.7 KiB

  1. {{ define "mbox-link" }}
  2. {{ if not (.HasAttr "\\Noselect") }}
  3. <li {{ if .Active }}class="active"{{ end }}>
  4. <a href="{{.URL}}">
  5. {{- if eq .Name "INBOX" -}}
  6. Inbox
  7. {{- else -}}
  8. {{ .Name }}
  9. {{- end -}}
  10. {{- if .HasAttr "\\HasChildren" }}/{{ end }}
  11. </a>
  12. <!-- TODO
  13. <button
  14. type="submit"
  15. name="subscribe"
  16. value="{{.Name}}"
  17. form="subscribe-form"
  18. {{ if eq .Name "INBOX" }}
  19. title="Unsubscribe"
  20. {{ else }}
  21. title="Subscribe"
  22. {{ end }}
  23. >
  24. {{ if eq .Name "INBOX" }}
  25. {{ else }}
  26. {{ end }}
  27. </button>
  28. -->
  29. </li>
  30. {{ else }}
  31. <li class="noselect">
  32. {{.Name}}{{- if .HasAttr "\\HasChildren" }}/{{ end }}
  33. </li>
  34. {{ end }}
  35. {{ end }}
  36. {{ define "aside" }}
  37. <form id="subscribe-form" method="POST"></form>
  38. <aside>
  39. <ul>
  40. <!-- the logo image, dimensions 200x32 may be present or not -->
  41. <li>
  42. <a href="/compose" class="new
  43. {{ if eq $.GlobalData.URL.Path "/compose" }}active{{ end }}
  44. ">Compose&nbsp;mail</a>
  45. </li>
  46. {{ with .CategorizedMailboxes }}
  47. {{ with .Common.Inbox }}{{ template "mbox-link" . }}{{ end }}
  48. {{ with .Common.Drafts }}{{ template "mbox-link" . }}{{ end }}
  49. {{ with .Common.Sent }}{{ template "mbox-link" . }}{{ end }}
  50. {{ with .Common.Junk }}{{ template "mbox-link" . }}{{ end }}
  51. {{ with .Common.Trash }}{{ template "mbox-link" . }}{{ end }}
  52. {{ with .Common.Archive }}{{ template "mbox-link" . }}{{ end }}
  53. {{ if .Additional }}
  54. <hr />
  55. {{ range .Additional }}
  56. {{ template "mbox-link" . }}
  57. {{ end }}
  58. {{ end }}
  59. {{ end }}
  60. <li>
  61. <a href="/new-mailbox" class="new
  62. {{ if eq $.GlobalData.URL.Path "/new-mailbox" }}active{{ end }}
  63. ">Create&nbsp;new&nbsp;folder</a>
  64. </li>
  65. </ul>
  66. </aside>
  67. {{ end }}