From d0d5dd92a4065dc03626e27e78f5469bb25aeebe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Fri, 26 Apr 2019 10:43:17 +0200 Subject: Made HTML day headers better. --- module/output/html.scm | 5 +++-- static/style.css | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/module/output/html.scm b/module/output/html.scm index 851f9b54..f72122bb 100644 --- a/module/output/html.scm +++ b/module/output/html.scm @@ -84,8 +84,9 @@ (fix-event-widths! (date->time-utc date) (stream->list events)) `(div (@ (class "day")) (div (@ (class "meta")) - (span (@ (class "dayname")) ,(date->string date "~a")) - (span (@ (class "daydate")) ,(date->string date "~Y-~m-~d"))) + ,(let ((str (date->string date "~Y-~m-~d"))) + `(span (@ (id ,str) (class "daydate")) ,str)) + (span (@ (class "dayname")) ,(date->string date "~a"))) (div (@ (class "events")) ,@(map (lambda (time) `(div (@ (class "clock " diff --git a/static/style.css b/static/style.css index f20b9430..3c3e7e9d 100644 --- a/static/style.css +++ b/static/style.css @@ -90,11 +90,21 @@ .meta { height: 50px; width: 100%; - + display: flex; + justify-content: center; + align-items: center; + position: relative; } .meta .dayname { - font-size: 2em; + position: absolute; + left: 5; + top: 2; + color: grey; +} + +.meta .daydate { + font-size: 200%; } .event { -- cgit v1.2.3