From a6e6f8be88a93699765f25aee0e6109a3eb0b307 Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Tue, 3 May 2022 18:22:43 +0200 Subject: reworked templates based on purecss --- templates/webmail/readmail.html.ep | 70 +++++++++++++++++++++----------------- 1 file changed, 39 insertions(+), 31 deletions(-) (limited to 'templates/webmail/readmail.html.ep') diff --git a/templates/webmail/readmail.html.ep b/templates/webmail/readmail.html.ep index 0a9fde0..f39dd0e 100644 --- a/templates/webmail/readmail.html.ep +++ b/templates/webmail/readmail.html.ep @@ -3,54 +3,62 @@ % my $mail_fmt = begin % my ($category, $value) = @_;
<%= ucfirst l $category %>
-
<%= ref $value ? join(' ' . l('and') . ' ', map {"$_->{name} <$_->{address}>"} @$value) : $value %>
+
+ %= ref $value ? join(' ' . l('and') . ' ', map {"$_->{name} <$_->{address}>"} @$value) : $value +
% end -
- -

Read Mail

- -
-
<%= uc l 'subject' %>
-
<%= $msg->{head}{subject} %>
-%= $mail_fmt->('from', $msg->{head}{from}); -%= $mail_fmt->('to', $msg->{head}{to}); -%= $mail_fmt->('cc', $msg->{head}{cc}) if !ref $msg->{head}{cc} || @{ $msg->{head}{cc} }; -%= $mail_fmt->('bcc', $msg->{head}{bcc}) if !ref $msg->{head}{bcc} || @{ $msg->{head}{bcc} }; -
<%= uc l 'date' %>
-
<%= $msg->{head}{date} %>
-
<%= uc l 'size' %>
-
<%= print_sizes10 $msg->{size} %>
-
<%= uc l 'content-type' %>
-
<%= $msg->{head}{content_type} %>
-
+
+ +

Read Mail

+ +
+
<%= uc l 'subject' %>
+
<%= $msg->{head}{subject} %>
+ + %= $mail_fmt->('from', $msg->{head}{from}) + %= $mail_fmt->('to', $msg->{head}{to}) + %= $mail_fmt->('cc', $msg->{head}{cc}) if !ref $msg->{head}{cc} || @{ $msg->{head}{cc} } + %= $mail_fmt->('bcc', $msg->{head}{bcc}) if !ref $msg->{head}{bcc} || @{ $msg->{head}{bcc} } + +
<%= uc l 'date' %>
+
<%= $msg->{head}{date} %>
+ +
<%= uc l 'size' %>
+
<%= print_sizes10 $msg->{size} %>
+ +
<%= uc l 'content-type' %>
+
<%= $msg->{head}{content_type} %>
+
% my $body = $msg->{body}; % if ($msg->{head}{content_type} eq 'multipart/alternative') { % for (reverse @$body) { -
+
% my $x = mime_render($_->{head}{content_type}, $_->{body}); -%== $x; -
+ %== $x; +
% last if $x; % } % } % elsif (ref $body eq 'HASH') { % for (%$body) { -
-%== mime_render($_->{head}{content_type}, $_->{body}); -
+
+ %== mime_render($_->{head}{content_type}, $_->{body}); +
% } % } % else { -
-%== mime_render($msg->{head}{content_type}, $body); -
+
+ %== mime_render($msg->{head}{content_type}, $body); +
% } - +
-- cgit v1.2.3