crabmail

Static HTML email archive viewer in Rust
git clone git://git.alexwennerberg.com/crabmail
Log | Files | Refs | README | LICENSE

commit 1f53668c6f2d296d30ba29edb93dc2172ec79b02
parent 4bd33d5119c0226892ea59c7b6cf243b52ee9369
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Sun,  1 Aug 2021 14:32:29 -0700

Cleanup styling

Diffstat:
Mtemplates/base.html | 2+-
Atemplates/static/style.css | 80+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mtemplates/thread.html | 2++
3 files changed, 83 insertions(+), 1 deletion(-)

diff --git a/templates/base.html b/templates/base.html @@ -3,7 +3,7 @@ <head> <meta charset="utf-8"> <meta http-equiv="Permissions-Policy" content="interest-cohort=()"/> - <link rel="stylesheet" type="text/css" href="/style.css" /> + <link rel="stylesheet" type="text/css" href="style.css" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=0" /> <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>📧</text></svg> <meta name="description" content="Crabmail mailing list"> diff --git a/templates/static/style.css b/templates/static/style.css @@ -0,0 +1,80 @@ +body { + padding: 2ch; + padding-left: 4ch; + padding-right: 4ch; + margin: auto; + font-family: "Archivo", Helvetica, Arial, Sans-serif; + word-wrap: break-word; + line-height: 1.5; +} + +body > hr { margin-left: -1ch; } + +table { border-spacing: 0.5em 0.1em; } + +.adfa { + font-family: "Roboto Mono", monospace; +} + +.email-body { + white-space:pre-line; +} + +.filesize { + text-align: right; +} + +.footer { + text-align: center; + font-style: italic; + font-size: .9rem; +} + +hr.thin { + border: 0; + height: 0; + border-top: 1px solid; +} + +h1, h2, h3 { + margin: 0; +} + +h3 { + display: inline-block; + margin-right: 2em; +} + +pre { + line-height: 1.2; + font-size: 1rem; + overflow: auto; + margin: 0; + padding: 0; +} + +td { + white-space: nowrap; + margin: 0; + border-style:hidden; + padding: 0; +} + +table td { + padding: 0 0.1em; +} + +table.core { + width: 100%; + border-collapse: collapse; +} + +@media only screen and (max-width: 600px) { + body { + font-size: 16px; + } + + .junk { + display: none; + } +} diff --git a/templates/thread.html b/templates/thread.html @@ -8,7 +8,9 @@ <h3>{{message|get_header("subject")}}</h3> <b>From: </b>{{message|get_header("from")}}<br> <b>Date: </b>{{message|get_header("date")}}<br> + <div class="email-body"> {{message|get_body|safe}} + </div> {% endfor %} </div> </div>