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.
 
 
 
 

48 lines
963 B

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