From 53051b2f37e7d4900ffe5311996cd166ec5e80be Mon Sep 17 00:00:00 2001 From: Astro Date: Fri, 30 Oct 2020 17:01:35 +0100 Subject: [PATCH] serve: rotate .dtstart to the left --- ticker-serve/src/index.rs | 18 ++++++++++-------- ticker-serve/static/style.css | 12 +++++++++--- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/ticker-serve/src/index.rs b/ticker-serve/src/index.rs index 16a6920..4aecf70 100644 --- a/ticker-serve/src/index.rs +++ b/ticker-serve/src/index.rs @@ -99,7 +99,14 @@ fn render_index(app_state: &AppState) -> String { { day.events.iter().map(|e| html!( -
+
+

+ { text!("{}", &e.dtstart.format("%H:%S")) } +

{ match &e.url { None => html!(

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

@@ -113,14 +120,9 @@ fn render_index(app_state: &AppState) -> String { ), } } -

- { text!("{}", &e.dtstart.format("%H:%S")) } -

- { e.location.as_ref().map(|location| html!(

- { text!("{}", location) } -

- )) } + { text!("{}", e.location.as_ref().unwrap_or(&"".to_owned())) } +

)) } ) diff --git a/ticker-serve/static/style.css b/ticker-serve/static/style.css index 4a1cea8..bfe3422 100644 --- a/ticker-serve/static/style.css +++ b/ticker-serve/static/style.css @@ -72,11 +72,17 @@ h3 a { } .dtstart { - margin-right: 1.3em; + position: absolute; + transform: translate(-2.5rem, 2.5rem) rotate(270deg); + transform-origin: top left; + color: #F7F7F7; + font-weight: 500; + font-size: 85%; + line-height: 1.5rem; } -.dtstart, .location { +.location { line-height: 1.1em; - display: inline; + min-height: 1.1em; } footer {