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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>mailweb ({{account}}) — drafts</title>
<link rel="alternate" type="text/llm" href="/drafts"
      title="Same information as a compact plain-text rendering for machine and LLM consumption: identical semantics and links, far fewer tokens. Request it with: Accept: text/llm">
<style>
  :root {
    color-scheme: light dark;
    --bg:        #f5f5f5;
    --bg-card:   #ffffff;
    --border:    #dddddd;
    --text:      #111111;
    --text-meta: #666666;
    --link:      #3781b8;
  }
  @media (prefers-color-scheme: dark) {
    :root {
      --bg:        #1a1a1a;
      --bg-card:   #242424;
      --border:    #3a3a3a;
      --text:      #e8e8e8;
      --text-meta: #999999;
      --link:      #7ab3e0;
    }
  }
  body    { font-family: sans-serif; margin: 0; padding: 1rem;
            background: var(--bg); color: var(--text); }
  nav     { margin-bottom: 1rem; display: flex; gap: 1.5rem; font-size: 0.9rem; }
  a       { color: var(--link); text-decoration: none; }
  a:hover { text-decoration: underline; }
  h1      { font-size: 1.2rem; margin-bottom: 1rem; }
  .draft  {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 4px; padding: 0.6rem 0.9rem; margin-bottom: 0.6rem;
  }
  .draft h2 { margin: 0 0 0.2rem; font-size: 1rem; }
  .meta   { color: var(--text-meta); font-size: 0.85rem; }
  .empty  { color: var(--text-meta); }
{{/* Only for the compose button in the nav: this page mounts no editor. */}}
{{template "editorStyle"}}
</style>
</head>
<body>
<nav>
  <a href="/">← inbox</a>
  {{template "composeButton"}}
  <a href="{{.LLMViewURL}}" title="Compact plain-text rendering of this page">text view →</a>
</nav>
<h1>{{if .Drafts}}{{len .Drafts}} unsent draft{{if ne (len .Drafts) 1}}s{{end}}{{else}}Drafts{{end}}</h1>
{{if .Drafts}}
{{range .Drafts}}
<div class="draft">
  <h2><a href="/draft/{{.Token}}">{{if .Subject}}{{.Subject}}{{else}}(no subject){{end}}</a></h2>
  <div class="meta">
    last edited {{.UpdatedAt.Format "Mon, 02 Jan 2006 15:04"}}
    {{if .ParentID}} &nbsp;|&nbsp; <a href="/msg/{{.ParentID}}">answers this message</a>{{end}}
  </div>
</div>
{{end}}
{{else}}
<p class="empty">Nothing here. A draft is made by replying to a message.</p>
{{end}}
</body>
</html>