From 119e221856e1938f2070b7632b68c705f4759af2 Mon Sep 17 00:00:00 2001 From: Astro Date: Sun, 10 Jul 2022 22:54:40 +0200 Subject: [PATCH] ticker-serve: delint template syntax --- ticker-serve/src/index.rs | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/ticker-serve/src/index.rs b/ticker-serve/src/index.rs index 1fc3c6d..b7b7415 100644 --- a/ticker-serve/src/index.rs +++ b/ticker-serve/src/index.rs @@ -86,7 +86,7 @@ fn render_index(app_state: &AppState) -> String { html!(

- + { text!("{}", day.date.day()) } @@ -101,18 +101,15 @@ fn render_index(app_state: &AppState) -> String { { day.events.iter().map(|e| html!(
-

- { if e.recurrence { - html!("⭯") - } else { - html!(" ") - } } + style=( format!("border-left: 1.5rem solid {}", &config.calendars.get(&e.calendar).map(|o| &o.color[..]).unwrap_or("white")) )> +

+ { if e.recurrence { + html!("⭯") + } else { + html!(" ") + } } + title=( format!("{}", e.dtstart.format("%c")) )> { text!("{}", &e.dtstart.format("%H:%M")) }

@@ -122,7 +119,7 @@ fn render_index(app_state: &AppState) -> String { ), Some(url) => html!(

- + { text!("{}", &e.summary) }