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/about.html.ep | 106 +++++++++++++++---------------- templates/webmail/displayheaders.html.ep | 44 ++++--------- templates/webmail/login.html.ep | 69 +++++++------------- templates/webmail/readmail.html.ep | 70 +++++++++++--------- templates/webmail/writemail.html.ep | 61 ++++++++---------- 5 files changed, 153 insertions(+), 197 deletions(-) (limited to 'templates/webmail') diff --git a/templates/webmail/about.html.ep b/templates/webmail/about.html.ep index 5cee603..6221bcc 100644 --- a/templates/webmail/about.html.ep +++ b/templates/webmail/about.html.ep @@ -2,70 +2,64 @@ % layout 'mainlayout'; - +
-
- - +
-
- - + - - - -
- About JWebmail <%= $version %> -
-
    -
  • - JWebmail <%= $version %> is a Webmail solution meant to be used with - s/qmail -
  • +

    About JWebmail <%= $version %>

    -
  • Features: -
      - -
    • multiple language support
    • -
    • session management
    • -
    • search for mails
    • -
    • CGI support but also psgi/plack and fcgi
    • -
    -
  • +

    + JWebmail <%= $version %> is a Webmail solution meant to be used with + s/qmail +

    -
  • - This is a - GPL - licensed project, created by Oliver 'omnis' Müller - and currently maintained by - Jannis M. Hoffmann -
  • +

    +

    Features

    +
      + +
    • multiple language support
    • +
    • session management
    • +
    • search for mails
    • +
    • CGI support but also psgi/plack and fcgi
    • +
    +

    + +

    + This is a + GPL + licensed project, created by Oliver 'omnis' Müller + and currently maintained by + Jannis M. Hoffmann +

    -
  • Supported languages: -

    +

    +

    Supported languages

    +
      % foreach (@$languages) { - %= link_to $_ => {lang => $_} +
    • + %= link_to $_ => {lang => $_} +
    • % } -

      - +
    +

    + +

    + JWebmail is programmed in Perl, and is + a complete rewrite of oMail-webmail. +

    -
  • - JWebmail is programmed in Perl, and is - a complete rewrite of oMail-webmail. -
  • + -
-
- -
+ diff --git a/templates/webmail/displayheaders.html.ep b/templates/webmail/displayheaders.html.ep index d823d9e..42e52fd 100644 --- a/templates/webmail/displayheaders.html.ep +++ b/templates/webmail/displayheaders.html.ep @@ -1,46 +1,26 @@ % layout 'mainlayout'; - +
-
- - - + %= include 'headers/_display_folders'; % if (my $loginmessage = stash 'loginmessage') { - - - +

+ %= $loginmessage +

% } - - - - + %= include 'headers/_display_top_nav'; - - - - - - - - - - + %= include 'headers/_display_bot_nav'; -
- %= include 'headers/_displayfolders'; -
<%= $loginmessage %>
% if (@$msgs) { - %= include 'headers/_display_headers'; + %= include 'headers/_display_headers'; % } % else { -

<%= l 'empty_folder' %>

+

+ %= l 'empty_folder' +

% } -
\ No newline at end of file + diff --git a/templates/webmail/login.html.ep b/templates/webmail/login.html.ep index 4b2da5d..3e224a8 100644 --- a/templates/webmail/login.html.ep +++ b/templates/webmail/login.html.ep @@ -1,55 +1,34 @@ % layout 'mainlayout'; - - - - - - +
+ +

+ JWebmail – <%= ucfirst l 'login' %> +

-
% if (my $msg = flash('message') || stash('warning')) { - - +

+ %= $msg +

% } - - - + %= form_for login => (name => 'login1') => (method => 'post') => (class => 'pure-form pure-form-aligned jwm-round') => begin +
+
+ %= label_for userid => ucfirst l 'userid' + %= text_field 'userid' => '' => (required => '') +
+
+ %= label_for password => ucfirst l 'passwd' + %= password_field 'password' => (required => '') +
+
+ %= submit_button l('login') => (class => 'pure-button pure-button-primary') +
+
+ % end - -
JWebmail – <%= ucfirst l 'login' %>
- %= $msg - -
+ %= javascript begin if (!document.login1.userid.value) { 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); +
% } - +
diff --git a/templates/webmail/writemail.html.ep b/templates/webmail/writemail.html.ep index 8375bdf..6342927 100644 --- a/templates/webmail/writemail.html.ep +++ b/templates/webmail/writemail.html.ep @@ -1,51 +1,46 @@ % layout 'mainlayout'; -
+
-

Write Message

+

Write Message

-% if (my $msg = stash('warning')) { -

<%= $msg %>

-% } + % if (my $msg = stash('warning')) { +

<%= $msg %>

+ % } -%= form_for '' => (method => 'post') => (enctype => 'multipart/form-data') => (id => 'write-form') => begin + %= form_for '' => (method => 'post') => (enctype => 'multipart/form-data') => (class => 'pure-form pure-form-stacked') => begin +
- %= label_for mail => ucfirst l 'send_to' - %= email_field 'to', id => 'mail', multiple => '', required => '' -
+ %= label_for mail => ucfirst l 'send_to' + %= email_field 'to' => (id => 'mail') => (multiple => '') => (required => '') - %= label_for subject => ucfirst l 'subject' - %= text_field 'subject', 'required' => '' -
+ %= label_for subject => ucfirst l 'subject' + %= text_field 'subject' => (required => '') - %= label_for cc => 'CC' - %= email_field 'cc', 'multiple' => '' -
+ %= label_for cc => 'CC' + %= email_field 'cc' => (multiple => '') - %= label_for bcc => 'BCC' - %= email_field 'bcc', 'multiple' => '' -
+ %= label_for bcc => 'BCC' + %= email_field 'bcc' => (multiple => '') - %= label_for back_to => ucfirst l 'answer_to' - %= email_field 'back_to' -
+ %= label_for back_to => ucfirst l 'answer_to' + %= email_field 'back_to' - %= label_for txt => ucfirst l 'content' - %= text_area body => (cols => 80) => (rows => 24) => (id => 'txt') -
+ %= label_for txt => ucfirst l 'content' + %= text_area body => (cols => 80) => (rows => 24) => (name => 'txt') - %= file_field 'attach' -
+ %= label_for attach => ucfirst l 'attach file' + %= file_field 'attach' - %= submit_button l 'send' + %= submit_button l('send') => (class => 'pure-button pure-button-primary') - %= csrf_field + %= csrf_field -% end +
+ % end - +
-- cgit v1.2.3