diff options
Diffstat (limited to 'src/jwebmail/templates')
-rw-r--r-- | src/jwebmail/templates/_bot_nav.html | 48 | ||||
-rw-r--r-- | src/jwebmail/templates/_folders.html | 48 | ||||
-rw-r--r-- | src/jwebmail/templates/_main_table.html | 37 | ||||
-rw-r--r-- | src/jwebmail/templates/_top_nav.html | 48 | ||||
-rw-r--r-- | src/jwebmail/templates/about.html | 62 | ||||
-rw-r--r-- | src/jwebmail/templates/displayheaders.html | 32 | ||||
-rw-r--r-- | src/jwebmail/templates/exception_.html | 30 | ||||
-rw-r--r-- | src/jwebmail/templates/login.html | 83 | ||||
-rw-r--r-- | src/jwebmail/templates/mainlayout.html | 34 | ||||
-rw-r--r-- | src/jwebmail/templates/not_found.html | 25 | ||||
-rw-r--r-- | src/jwebmail/templates/readmail.html | 17 | ||||
-rw-r--r-- | src/jwebmail/templates/writemail.html | 82 |
12 files changed, 546 insertions, 0 deletions
diff --git a/src/jwebmail/templates/_bot_nav.html b/src/jwebmail/templates/_bot_nav.html new file mode 100644 index 0000000..e54fd4c --- /dev/null +++ b/src/jwebmail/templates/_bot_nav.html @@ -0,0 +1,48 @@ +<div class="columns"> + + <div class="column"> + {{ pgn.links }} + </div> + + <div class="column"> + <form href="{{ url_for('move', folder=folder) }}" id='move-mail'> + <div class="field is-horizontal"> + <div class="field-label is-normal"> + <label for="select-folder" class="label">{% trans %}Move to{% endtrans %}</label> + </div> + <div class=field-body> + <div class="field is-grouped"> + <div class=control> + <div class=select> + <select name=select-folder> + {% for f in mail_folders if f is ne folder %} + <option type=select name="folder" value="{{ f }}">{{ f or gettext('Home') }}</option> + {% endfor %} + </select> + </div> + </div> + {# csrf_field #} + <div class=control> + <input type=submit class=button value="{{ gettext('Move') }}"> + </div> + </div> + </div> + </div> + </form> + </div> + + <div class=column> + <form href="{{ url_for('move', folder=folder) }}" id="remove-mail" method=POST> + {# csrf_field #} + <div class=control> + <input id=remove type=submit class=button value="{{ gettext('Remove') }}"> + </div> + </form> + </div> + + <div class="column has-text-right"> + <label for=allbox>{% trans %}check all{% endtrans %}</label> + <input name=allbox type=checkbox id=check-all> + </div> + +</div> diff --git a/src/jwebmail/templates/_folders.html b/src/jwebmail/templates/_folders.html new file mode 100644 index 0000000..fd62ab2 --- /dev/null +++ b/src/jwebmail/templates/_folders.html @@ -0,0 +1,48 @@ +<div class="columns"> + + <div class="column"> + <nav class="navbar"> + + <div class="navbar-brand"> + <span class=navbar-item> + <b>{{ folder }}</b> + </span> + <a role="button" class="navbar-burger" data-target="navMenu" id=navbar-toggle> + <span aria-hidden="true"></span> + <span aria-hidden="true"></span> + <span aria-hidden="true"></span> + </a> + </div> + + <div class="navbar-menu" id="navMenu"> + <div class=navbar-start> + {% for f in mail_folders if f is ne folder %} + <a href="{{ url_for('displayheaders', folder=f) }}" class="navbar-item"> + {{ f or gettext('Home') }} + </a> + {% endfor %} + </div> + </div> + </nav> + </div> + + <div class="column"> + <div class="columns is-multiline is-mobile"> + <span class="column is-half-mobile has-text-centered"> + {{ pgn.info }} + </span> + <span class="column is-half-mobile has-text-centered"> + {% if total_new_mails %} + {% trans %}{{ total_new_mails }} new{% endtrans %} + {% endif %} + </span> + <span class="column has-text-centered"> + {% if total_size %} + {% trans %}mailbox size: {% endtrans %} + {{ total_size|byte_size10 }} + {% endif %} + </span> + </div> + </div> + +</div> diff --git a/src/jwebmail/templates/_main_table.html b/src/jwebmail/templates/_main_table.html new file mode 100644 index 0000000..02f9f81 --- /dev/null +++ b/src/jwebmail/templates/_main_table.html @@ -0,0 +1,37 @@ +<section class="box"> + + {% for msg in msgs %} + + <tag class="media {{ jwm-new-mail if msg.unread else '' }}" id="{{ msg.message_handle }}"> + <div class="media-left is-hidden-mobile"> + {{ loop.index + (pgn.page - 1) * pgn.per_page }} + </div> + + <div class="media-content"> + <div class="columns is-gapless is-multiline"> + <div class="column is-10"> + {{ msg.head.sender.0.display_name or msg.head.sender.0.address or msg.head.from.0.display_name or msg.head.from.0.address }} + </div> + + <div class="column is-2"> + {{ parse_iso_date(msg.head.date)|datetimeformat }} + </div> + + <div class="column is-10"> + <a href="{{ url_for('read', msgid=msg.message_handle) }}">{{ msg.head.subject or '_' }}</a> + </div> + + <div class="column is-2"> + {{ msg.byte_size|byte_size10 }} + </div> + </div> + </div> + + <div class=media-right> + <input type="checkbox" name="{{ msg.message_handle }}" form="move-mail remove-mail" class="jwm-mail-checkbox"> + </div> + </tag> + + {% endfor %} + +</section> diff --git a/src/jwebmail/templates/_top_nav.html b/src/jwebmail/templates/_top_nav.html new file mode 100644 index 0000000..bc4afa5 --- /dev/null +++ b/src/jwebmail/templates/_top_nav.html @@ -0,0 +1,48 @@ +<div class="columns"> + + <nav class="column"> + <a href="{{ url_for('logout') }}" class="button">{% trans %}Logout{% endtrans %}</a> + <a href="{{ url_for('write') }}" class="button">{% trans %}Write{% endtrans %}</a> + </nav> + + <form class=column> + <div class="field is-horizontal"> + <div class="field-label is-normal"> + <label for=search class=label>{% trans %}Search{% endtrans %}</label> + </div> + <div class=field-body> + <div class=field> + <div class=control> + <input type=search id=search size=8 class=input /> + </div> + </div> + </div> + </div> + </form> + + <form class=column> + <div class="field is-horizontal"> + <div class="field-label is-normal"> + <label for=sort class=label>{% trans %}Sort{% endtrans %}</label> + </div> + <div class=field-body> + <div class=field> + <div class="select" id=sort-select> + <select name=sort id=sort> + <option value="!date">{% trans %}Date{% endtrans %} - {% trans %}Descending{% endtrans %}</option> + <option value="date">{% trans %}Date{% endtrans %} - {% trans %}Ascending{% endtrans %}</option> + <option value="!size">{{ gettext('Size') }} - {{ gettext('Descending') }}</option> + <option value="!sender">{{ gettext('Sender') }} - {{ gettext('Descending') }}</option> + <option value="sender">{{ gettext('Sender') }} - {{ gettext('Ascending') }}</option> + </select> + </div> + </div> + </div> + </div> + </form> + + <div class=column> + {{ pgn.links }} + </div> + +</div> diff --git a/src/jwebmail/templates/about.html b/src/jwebmail/templates/about.html new file mode 100644 index 0000000..e197275 --- /dev/null +++ b/src/jwebmail/templates/about.html @@ -0,0 +1,62 @@ +{% extends 'mainlayout.html' %} + +{% block content %} +<div class="section container"> + + <article class=content> + + <h1>About JWebmail {{ version }}</h1> + + <p> + JWebmail {{ version }} is a Webmail solution meant to be used with + <a href="https://www.fehcom.de/sqmail/sqmail.html">s/qmail</a> + </p> + + <h3>Features</h3> + <ul> + <!-- + <li>qmail, vmailmgr and vpopmail authentication support (<em>not</em> sendmail)</li> + <li>multiple signatures und headers support</li> + <li>basic folders support (4 defined folders)</li> + <li>featured addressbook</li> + <li>100% Maildir based</li> + <li>reads the mail directely from the server disk, without need for POP3 or IMAP</li> + --> + <li>multiple language support</li> + <li>session management </li> + <li>search for mails</li> + <li>CGI support but also psgi/plack and fcgi</li> + </ul> + + <p> + This is a + <a href="http://www.gnu.org/copyleft/gpl.html" target="_new">GPL</a> + licensed project, created by <a href="mailto:">Oliver 'omnis' Müller</a> + and currently maintained by + <a href="mailto:jannis@fehcom.de">Jannis M. Hoffmann</a> + </p> + + <h3>Supported languages</h3> + <ul> +{% for lang in languages %} + <li> + {{ get_locale().languages[lang.language] }} + </li> +{% endfor %} + </ul> + + <p> + JWebmail is programmed in <a href="http://www.perl.org">Perl</a>, and is + a complete rewrite of oMail-webmail. + </p> + + </article> + + <nav class=navbar> + <div class=navbar-item> + <a href="{{ url_for('login') }}" class="button">{% trans %}Login{% endtrans %}</a> + </div> + </nav> + +</div> +{% endblock %} diff --git a/src/jwebmail/templates/displayheaders.html b/src/jwebmail/templates/displayheaders.html new file mode 100644 index 0000000..ce9ea6e --- /dev/null +++ b/src/jwebmail/templates/displayheaders.html @@ -0,0 +1,32 @@ +{% extends 'mainlayout.html' %} + +{% block scripts %} + <script src="{{ url_for('static', filename='src/displayheaders.js') }}" defer> + </script> +{% endblock %} + +{% block content %} + <section class="section container"> + + {% include '_folders.html' %} + + {% if loginmessage is defined %} + <p id=loginmessage> + {{ loginmessage }} + </p> + {% endif %} + + {% include '_top_nav.html' %} + + {% if msgs %} + {% include '_main_table.html' %} + {% else %} + <p class="section"> + {% trans %}This folder is empty!{% endtrans %} + </p> + {% endif %} + + {% include '_bot_nav.html' %} + + </section> +{% endblock %} diff --git a/src/jwebmail/templates/exception_.html b/src/jwebmail/templates/exception_.html new file mode 100644 index 0000000..0b093b1 --- /dev/null +++ b/src/jwebmail/templates/exception_.html @@ -0,0 +1,30 @@ +<!doctype html> + +<html> + + <head> + <title>Error</title> + </head> + + <body> + <h1>Error</h1> + <p class=center> + {% if error is defined %} + {{ error }} + {% else %} + Uwu :( + {% endif %} + </p> + + {% if links is defined %} + See: + <nav> + {% for link in links %} + <a href="{{ link }}">{{ link }}</a> + <br> + {% endif %} + </nav> + {% endif %} + </body> + +</html> diff --git a/src/jwebmail/templates/login.html b/src/jwebmail/templates/login.html new file mode 100644 index 0000000..2915de3 --- /dev/null +++ b/src/jwebmail/templates/login.html @@ -0,0 +1,83 @@ +{% extends 'mainlayout.html' %} + +{% block content %} +<section class=section> + <div class="container is-max-desktop box"> + + <h1 class=title> + {% trans %}Login{% endtrans %} + </h1> + <h2 class=subtitle> + JWebmail + </h2> + +{% if login_form.errors %} + <div class="message is-warning"> + <div class=message-header> + {{ login_form.errors }} + </div> + </div> +{% endif %} +{% if warn %} + <div class="message is-warning"> + <div class=message-header> + {{ warn }} + </div> + </div> +{% endif %} + + <form name="login1" method="POST" class="pure-form pure-form-aligned jwm-round"> + + {{ login_form.csrf_token }} + + <div class="field is-horizontal"> + <div class="field-label is-normal"> + {{ login_form.username.label(class='label') }} + </div> + <div class=field-body> + <div class=field> + <div class=control> + {{ login_form.username(class='input') }} + </div> + </div> + </div> + </div> + + <div class="field is-horizontal"> + <div class="field-label is-normal"> + {{ login_form.password.label(class='label') }} + </div> + <div class=field-body> + <div class=field> + <div class=control> + {{ login_form.password(class='input') }} + </div> + </div> + </div> + </div> + <div class="field is-horizontal"> + <div class=field-label> + </div> + <div class=field-body> + <div class=field> + <div class=control> + <input type=submit class="button is-primary" name=submit_button value="{{ gettext('Login') }}"> + </div> + </div> + </div> + </div> + </form> + + </div> +</section> +{% endblock %} + +{% block scripts %} + <script type="text/javascript"> + if (!document.login1.userid.value) { + document.login1.userid.focus(); + } else { + document.login1.password.focus(); + } + </script> +{% endblock %} diff --git a/src/jwebmail/templates/mainlayout.html b/src/jwebmail/templates/mainlayout.html new file mode 100644 index 0000000..46a07af --- /dev/null +++ b/src/jwebmail/templates/mainlayout.html @@ -0,0 +1,34 @@ +<!doctype html> + +<html lang="{{ get_locale().language }}"> + +<head> + <meta charset=utf-8> + <meta name="viewport" content="width=device-width, initial-scale=1"> + + <link rel=stylesheet href="{{ url_for('static', filename="css/my_bulma.css") }}" > + + <title> + {{ title or 'JWebmail' }} + </title> +</head> + +<body> + {% block content required %}{% endblock %} + + <footer class=footer> + <div class="content has-text-centered"> + <a href="{{ url_for('about') }}"> + {% trans %}About{% endtrans %} JWebmail + </a> + <br> + {% trans %}Version{% endtrans %} + {{ version }} + </div> + </footer> + + {% block scripts %}{% endblock %} + +</body> + +</html> diff --git a/src/jwebmail/templates/not_found.html b/src/jwebmail/templates/not_found.html new file mode 100644 index 0000000..1dc8f0c --- /dev/null +++ b/src/jwebmail/templates/not_found.html @@ -0,0 +1,25 @@ +<html> + + <head> + <meta charset=utf-8> + <meta name="viewport" content="width=device-width, initial-scale=1"> + + <title>Not Found</title> + + <link type=stylesheet href="{{ url_for('static', filename='css/my_bulma.css') }}"> + </head> + + <body> + <section class=hero> + <div class=hero-body> + <h1 class=title> + Not the page you are looking for. + </h1> + <p> + Go back or go to the <a href="{{ url_for('login') }}">{% trans %}start page{% endtrans %}</a>. + </p> + </div> + </section> + </body> + +</html> diff --git a/src/jwebmail/templates/readmail.html b/src/jwebmail/templates/readmail.html new file mode 100644 index 0000000..f41197a --- /dev/null +++ b/src/jwebmail/templates/readmail.html @@ -0,0 +1,17 @@ +{% extends 'mainlayout.html' %} + +{% block content %} + <div class="section container"> + + <h1 class=title>Read Mail</h1> + + {{ format_mail(msg) }} + + <nav> + <a href="javascript:history.back()" class="button"> + {% trans %}back{% endtrans %} + </a> + </nav> + + </div> +{% endblock %} diff --git a/src/jwebmail/templates/writemail.html b/src/jwebmail/templates/writemail.html new file mode 100644 index 0000000..31adff1 --- /dev/null +++ b/src/jwebmail/templates/writemail.html @@ -0,0 +1,82 @@ +{% extends 'mainlayout.html' %} + +{% block content %} + <div class="section container"> + + <h1 class=title>Write Message</h1> + + {% if warning is defined %} + <p class=message> {{ warning }} </p> + {% endif %} + + <form method="post" enctype="multipart/form-data"> + + <div class=field> + {{ form.send_to.label(class='label') }} + <div class=control> + {{ form.send_to(class='input') }} + </div> + </div> + + <div class=field> + {{ form.subject.label(class='label') }} + <div class=control> + {{ form.subject(class='input') }} + </div> + </div> + + <div class=field> + {{ form.cc.label(class='label') }} + <div class=control> + {{ form.cc(class='input') }} + </div> + </div> + + <div class=field> + {{ form.bcc.label(class='label') }} + <div class=control> + {{ form.bcc(class='input') }} + </div> + </div> + + <div class=field> + {{ form.answer_to.label(class='label') }} + <div class=control> + {{ form.answer_to(class='input') }} + </div> + </div> + + <div class=field> + {{ form.content.label(class='label') }} + <div class=control> + {{ form.content(class='textarea', rows=10) }} + </div> + </div> + + <div class=field> + <div class=file> + <label class=file-label> + {{ form.attachments(class='file-input') }} + <span class="file-cta"> + <span class=file-label> + {% trans %}attach file{% endtrans %} + </span> + </span> + </label> + </div> + </div> + + <div class=field> + <div class=control> + <input type=submit class=button value="{{ gettext('Send') }}"> + </div> + </div> + + </form> + + <nav> + <a href="javascript:history.back()" class="button">{% trans %}back{% endtrans %}</a> + </nav> + + </div> +{% endblock %} |