diff options
author | Simon Ser <contact@emersion.fr> | 2019-12-16 12:57:30 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-12-16 12:58:21 +0100 |
commit | e93346ffa90f6c09a9a57b48c6607925dc7ff46e (patch) | |
tree | 5e1f356017c763a604cc8bcf247759037ae51d74 /themes/sourcehut/message.html | |
parent | d897eeee5c4d163891d0b6a8f85d328ccada7575 (diff) | |
download | alps-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/message.html')
-rw-r--r-- | themes/sourcehut/message.html | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/themes/sourcehut/message.html b/themes/sourcehut/message.html new file mode 100644 index 0000000..07b4ad9 --- /dev/null +++ b/themes/sourcehut/message.html @@ -0,0 +1,86 @@ +{{template "head.html"}} +{{template "nav.html"}} + +<div class="container-fluid"> + <div class="row"> + <div class="col-md-12 header-tabbed"> + <h2 style="margin-bottom: 1rem;" class="d-block"> + {{if .Message.Envelope.Subject}} + {{.Message.Envelope.Subject}} + {{else}} + (No subject) + {{end}} + </h2> + <div class="container message-tabs"> + <ul class="nav nav-tabs"> + <li class="nav-item"> + <a class="nav-link active" href="#">View message</a> + </li> + <li class="nav-item"> + <a + class="nav-link" + href="{{.Message.Uid}}/reply?part={{.PartPath}}" + >Reply</a> + </li> + <li class="mr-auto d-none d-sm-flex"></li> + <li class="nav-item"> + <a + class="nav-link" + href="/mailbox/{{.Mailbox.Name | pathescape}}?page={{.MailboxPage}}" + > + <span class="icon icon-caret-left"> + {{template "caret-left.html"}} + </span> + Back + </a> + </li> + </ul> + </div> + </div> + </div> +</div> + +{{define "message-part-tree"}} + {{/* nested templates can't access the parent's context */}} + {{$ = index . 0}} + {{with index . 1}} + <a + class="nav-link" + {{if .IsText}} + href="{{$.Message.Uid}}?part={{.PathString}}" + {{else}} + href="{{$.Message.Uid}}/raw?part={{.PathString}}" + {{end}} + > + {{if eq $.PartPath .PathString}}<strong>{{end}} + {{.String}} + {{if eq $.PartPath .PathString}}</strong>{{end}} + </a> + {{if gt (len .Children) 0}} + <ul class="nav flex-column"> + {{range .Children}} + <li class="nav-item">{{template "message-part-tree" (tuple $ .)}}</li> + {{end}} + </ul> + {{end}} + {{end}} +{{end}} + +<div class="container message-container"> + <div class="row"> + <div class="col-md-10 body-column"> + {{if .Body}} + <pre>{{.Body}}</pre> + {{else}} + <p>Can't preview this message part.</p> + <a href="{{.Message.Uid}}/raw?part={{.PartPath}}">Download</a> + {{end}} + </div> + <div class="col-md-2 parts-column"> + {{template "message-part-tree" (tuple $ .Message.PartTree)}} + </div> + </div> +</div> + +{{template "foot.html"}} + |