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.
 
 
 
 

50 lines
986 B

  1. {{template "head"}}
  2. <h1>koushin</h1>
  3. <p>
  4. <a href="/mailbox/{{.Mailbox.Name | pathescape}}">Back</a>
  5. </p>
  6. <h2>{{.Message.Envelope.Subject}}</h2>
  7. {{define "message-part-tree"}}
  8. {{/* nested templates can't access the parent's context */}}
  9. {{$ = index . 0}}
  10. {{with index . 1}}
  11. <a
  12. {{if .IsText}}
  13. href="{{$.Message.Uid}}?part={{.PathString}}"
  14. {{else}}
  15. href="{{$.Message.Uid}}/raw?part={{.PathString}}"
  16. {{end}}
  17. >
  18. {{if eq $.PartPath .PathString}}<strong>{{end}}
  19. {{.String}}
  20. {{if eq $.PartPath .PathString}}</strong>{{end}}
  21. </a>
  22. {{if gt (len .Children) 0}}
  23. <ul>
  24. {{range .Children}}
  25. <li>{{template "message-part-tree" (tuple $ .)}}</li>
  26. {{end}}
  27. </ul>
  28. {{end}}
  29. {{end}}
  30. {{end}}
  31. <p>Parts:</p>
  32. {{template "message-part-tree" (tuple $ .Message.PartTree)}}
  33. <hr>
  34. {{if .Body}}
  35. <pre>{{.Body}}</pre>
  36. {{else}}
  37. <p>Can't preview this message part.</p>
  38. <a href="{{.Message.Uid}}/raw?part={{.PartPath}}">Download</a>
  39. {{end}}
  40. {{template "foot"}}