aboutsummaryrefslogtreecommitdiff
path: root/themes/sourcehut/mailbox.html
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-12-16 12:57:30 +0100
committerSimon Ser <contact@emersion.fr>2019-12-16 12:58:21 +0100
commite93346ffa90f6c09a9a57b48c6607925dc7ff46e (patch)
tree5e1f356017c763a604cc8bcf247759037ae51d74 /themes/sourcehut/mailbox.html
parentd897eeee5c4d163891d0b6a8f85d328ccada7575 (diff)
downloadalps-e93346ffa90f6c09a9a57b48c6607925dc7ff46e.tar.gz
alps-e93346ffa90f6c09a9a57b48c6607925dc7ff46e.zip
Remove the public/ directory
Now that all templates are provided by plugins, there's no need to have a public/ directory. Themes can be in /themes instead of /public/themes.
Diffstat (limited to 'themes/sourcehut/mailbox.html')
-rw-r--r--themes/sourcehut/mailbox.html84
1 files changed, 84 insertions, 0 deletions
diff --git a/themes/sourcehut/mailbox.html b/themes/sourcehut/mailbox.html
new file mode 100644
index 0000000..cefe1d8
--- /dev/null
+++ b/themes/sourcehut/mailbox.html
@@ -0,0 +1,84 @@
+{{template "head.html"}}
+{{template "nav.html"}}
+
+<!-- TODO: Share tabs if reasonable -->
+<div class="container-fluid">
+ <div class="row">
+ <div class="col-md-12 header-tabbed">
+ <h2>{{.Mailbox.Name}}</h2>
+ <ul class="nav nav-tabs">
+ <li class="nav-item">
+ <a
+ class="nav-link active"
+ href="/mailbox/{{.Mailbox.Name | pathescape }}"
+ >Mailbox</a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link" href="/compose">Compose</a>
+ </li>
+ </ul>
+ </div>
+ </div>
+</div>
+<div class="container-fluid mailbox-container">
+ <div class="row">
+ <div class="col-md-2 mailboxes-column">
+ <ul class="nav flex-column">
+ {{$current := .Mailbox }}
+ {{range .Mailboxes}}
+ <li class="nav-item">
+ <a
+ {{ if eq $current.Name .Name }}
+ class="nav-link active"
+ {{ else }}
+ class="nav-link"
+ {{ end }}
+ href="/mailbox/{{.Name | pathescape}}"
+ >{{.Name}}</a>
+ </li>
+ {{end}}
+ </ul>
+ </div>
+ <div class="col-md-10 messages-column">
+ {{if .Messages}}
+ <ul class="nav flex-column">
+ {{range .Messages}}
+ <li class="nav-item">
+ <a
+ class="nav-link"
+ href="/message/{{$.Mailbox.Name | pathescape}}/{{.Uid}}?part={{.TextPartName}}"
+ >
+ <span class="text-muted date">
+ {{ .Envelope.Date.Format "Mon Jan 02 15:04" }}
+ </span>
+ <span class="text-normal from">
+ {{ range .Envelope.From }}
+ {{ .PersonalName }}
+ {{ end }}
+ </span>
+ {{if .Envelope.Subject}}
+ {{.Envelope.Subject}}
+ {{else}}
+ (No subject)
+ {{end}}
+ </a></li>
+ {{end}}
+ </ul>
+
+ <p>
+ {{if ge .PrevPage 0}}
+ <a href="?page={{.PrevPage}}">Prev</a>
+ {{end}}
+ {{if and (ge .PrevPage 0) (ge .NextPage 0)}}ยท{{end}}
+ {{if ge .NextPage 0}}
+ <a href="?page={{.NextPage}}">Next</a>
+ {{end}}
+ </p>
+ {{else}}
+ <p>Mailbox is empty.</p>
+ {{end}}
+ </div>
+ </div>
+</div>
+
+{{template "foot.html"}}