crabmail

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

commit 88873d16954536a1c08484b23ab81cde452dc8ab
parent 6ff1faba6a372d7ef1c808acbcbff6a81081100b
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Sat,  8 Jan 2022 09:17:06 -0800

Make patches monospace

Diffstat:
MREADME.md | 3+++
Msrc/main.rs | 10++++++++--
Msrc/style.css | 3+++
3 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md @@ -37,3 +37,6 @@ https://lists.flounder.online/crabmail/ Crabmail is AGPLv3 licenses, but I'm happy to release code snippets from this repo (which reimplements some common Rust functions) in a less permissive license. Email me! + +See also +https://git.causal.agency/bubger/about/ diff --git a/src/main.rs b/src/main.rs @@ -322,8 +322,14 @@ impl<'a> MailThread<'a> { } } br; br; - div(class="email-body") { - : Raw(utils::email_body(&message.body)) + @ if message.subject.starts_with("[PATCH") { + div(class="email-body monospace") { + : Raw(utils::email_body(&message.body)) + } + } else { + div(class="email-body") { + : Raw(utils::email_body(&message.body)) + } } br; div(class="bold"){ diff --git a/src/style.css b/src/style.css @@ -36,6 +36,9 @@ table { border-spacing: 0.5em 0.1em; } margin-bottom: 12px; } +.monospace { + font-family: monospace; +} .right { text-align: right; }