From 490420726952bb3834e6a1cdda7a26c90ba9a7cb Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Fri, 23 Oct 2020 16:07:59 -0400 Subject: Replace parts tree with attachment list --- themes/alps/assets/style.css | 11 ++++++++-- themes/alps/message.html | 52 +++++++++++++++++++++----------------------- 2 files changed, 34 insertions(+), 29 deletions(-) (limited to 'themes/alps') 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}} - - {{if eq $.Part.PathString .PathString}}{{end}} - {{.String}} - {{if eq $.Part.PathString .PathString}}{{end}} - - {{if gt (len .Children) 0}} - - {{end}} - {{end}} -{{end}} -
{{ $current := .Mailbox }} {{ template "aside" . }} @@ -162,9 +136,32 @@ {{end}} + {{ $attachments := .Message.Attachments }} + {{ if $attachments }}
- {{template "message-part-tree" (tuple $ .Message.PartTree)}} +

Attachments

+
+ {{ end }}
{{define "addr-list"}} @@ -197,6 +194,7 @@ {{ end }} Raw email + {{if .View}} {{.View}} {{else}} -- cgit v1.2.3