aboutsummaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
Diffstat (limited to 'themes')
-rw-r--r--themes/alps/assets/style.css11
-rw-r--r--themes/alps/message.html52
2 files changed, 34 insertions, 29 deletions
diff --git a/themes/alps/assets/style.css b/themes/alps/assets/style.css
index 91435e0..77aaf3c 100644
--- a/themes/alps/assets/style.css
+++ b/themes/alps/assets/style.css
@@ -261,14 +261,21 @@ main.message .message-header {
}
main.message .message-header .parts {
+ width: 30%;
margin-left: 0.3rem;
- padding: 0.3rem 1rem;
+ padding: 0.3rem 0.5rem;
background: white;
border-top: 1px solid #f2f2f2;
}
main.message .message-header .parts ul {
- margin-left: 1rem;
+ margin: 0;
+ padding: 0;
+ list-style: none;
+}
+
+main.message .message-header .parts li {
+ margin-left: 0;
}
main.contact dl {
diff --git a/themes/alps/message.html b/themes/alps/message.html
index 74e2d0b..28287ab 100644
--- a/themes/alps/message.html
+++ b/themes/alps/message.html
@@ -2,32 +2,6 @@
{{template "nav.html" .}}
{{template "util.html" .}}
-{{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="?part={{.PathString}}"
- {{else}}
- href="{{$.Message.URL}}raw?part={{.PathString}}"
- {{end}}
- >
- {{if eq $.Part.PathString .PathString}}<strong>{{end}}
- {{.String}}
- {{if eq $.Part.PathString .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="page-wrap">
{{ $current := .Mailbox }}
{{ template "aside" . }}
@@ -162,9 +136,32 @@
</tr>
{{end}}
</table>
+ {{ $attachments := .Message.Attachments }}
+ {{ if $attachments }}
<section class="parts">
- {{template "message-part-tree" (tuple $ .Message.PartTree)}}
+ <h3>Attachments</h3>
+ <ul>
+ {{ range .Message.Attachments }}
+ <li>
+ <a
+ class="nav-link"
+ {{if .IsText}}
+ href="?part={{.PathString}}"
+ {{else}}
+ href="{{$.Message.URL}}/raw?part={{.PathString}}"
+ {{end}}
+ >
+ {{- if .Filename -}}
+ {{.Filename}}
+ {{- else -}}
+ (no filename)
+ {{- end -}}
+ </a> ({{.MIMEType}}, {{.SizeString}})
+ </li>
+ {{ end }}
+ </ul>
</section>
+ {{ end }}
</div>
{{define "addr-list"}}
@@ -197,6 +194,7 @@
{{ end }}
<a href="{{.Message.URL}}/raw?plain=1">Raw email</a>
</div>
+
{{if .View}}
{{.View}}
{{else}}