From 3a7b499742c56ced418959e36a5199c982f5cf77 Mon Sep 17 00:00:00 2001 From: glyph Date: Mon, 21 Mar 2022 16:41:52 +0200 Subject: [PATCH] use splices for template rendering --- peach-web/src/routes/home.rs | 4 ++-- peach-web/src/routes/status/scuttlebutt.rs | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/peach-web/src/routes/home.rs b/peach-web/src/routes/home.rs index e3b6477..eaaf060 100644 --- a/peach-web/src/routes/home.rs +++ b/peach-web/src/routes/home.rs @@ -55,7 +55,7 @@ pub fn build_template() -> PreEscaped { } (PreEscaped("")) a class="middle" { - div class={ "circle circle-large" (circle_color) } { + div class={ "circle circle-large " (circle_color) } { p style="font-size: 4rem; color: var(--near-black);" { (center_circle_text) } @@ -64,7 +64,7 @@ pub fn build_template() -> PreEscaped { (PreEscaped("")) (PreEscaped("")) a class="bottom-left" href="/status/scuttlebutt" title="Status" { - div class={ "circle circle-small border-circle-small" (circle_border) } { + div class={ "circle circle-small border-circle-small " (circle_border) } { img class="icon-medium" src="/icons/heart-pulse.svg"; } } diff --git a/peach-web/src/routes/status/scuttlebutt.rs b/peach-web/src/routes/status/scuttlebutt.rs index 2a59029..5ebfd00 100644 --- a/peach-web/src/routes/status/scuttlebutt.rs +++ b/peach-web/src/routes/status/scuttlebutt.rs @@ -6,6 +6,9 @@ use crate::utils::sbot; // HTML RENDERING FOR ELEMENTS +// TODO: refactor this to make better use of splices +// https://maud.lambda.xyz/splices-toggles.html + fn downtime_element(downtime: &Option) -> Markup { match downtime { Some(time) => {