From aa5693789634aaf56d4dd7780db4cec88668c8a4 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 29 May 2022 17:57:01 +0100 Subject: [PATCH] Banner style --- epicyon-calendar.css | 21 +++++++++++++++++++++ webapp_calendar.py | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/epicyon-calendar.css b/epicyon-calendar.css index 64d0acabb..770c41e5b 100644 --- a/epicyon-calendar.css +++ b/epicyon-calendar.css @@ -16,6 +16,9 @@ --title-text: white; --title-background: grey; --focus-color: white; + --banner-height: 20vh; + --banner-height-mobile: 10vh; + --banner-height-tiny: 10vh; --calendar-horizontal-padding: 0; --calendar-cell-size: 1.5vw; --calendar-cell-size-mobile: 1.5vw; @@ -250,6 +253,12 @@ tr:nth-child(even) > .calendar__day__cell:nth-child(even) { } @media screen and (min-width: 400px) { + .timeline-banner { + vertical-align: top; + object-fit: cover; + width: 100%; + max-height: var(--banner-height); + } .calendar { table-display: fixed; margin: 0 20%; @@ -274,6 +283,12 @@ tr:nth-child(even) > .calendar__day__cell:nth-child(even) { } @media screen and (max-width: 1000px) { + .timeline-banner { + vertical-align: top; + object-fit: cover; + width: 98vw; + max-height: var(--banner-height-mobile); + } .calendar { table-display: fixed; margin: 0 0; @@ -298,6 +313,12 @@ tr:nth-child(even) > .calendar__day__cell:nth-child(even) { } @media screen and (max-width: 480px) { + .timeline-banner { + vertical-align: top; + object-fit: cover; + width: 98vw; + max-height: var(--banner-height-tiny); + } .calendar { table-display: fixed; margin: 0 0; diff --git a/webapp_calendar.py b/webapp_calendar.py index b51e6f70a..3ff9ed02b 100644 --- a/webapp_calendar.py +++ b/webapp_calendar.py @@ -436,7 +436,7 @@ def html_calendar(person_cache: {}, css_cache: {}, translate: {}, '\n' calendar_str += '