From 79b9876aa8f3611264be4d665b51051b17c3c8b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Mon, 17 Aug 2020 16:41:58 +0200 Subject: Selected event now glows. --- module/html/util.scm | 6 +++--- module/html/vcomponent.scm | 3 ++- static/style.scss | 9 +++++++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/module/html/util.scm b/module/html/util.scm index edbcf756..c9252122 100644 --- a/module/html/util.scm +++ b/module/html/util.scm @@ -42,6 +42,6 @@ ;; TODO? same event placed multiple times, when spanning multiple cells (define-public html-id (let ((id (make-object-property))) - (lambda (ev) - (or (id ev) - (set/r! (id ev) (symbol->string (gensym "__html_id_"))))))) + (lambda (ev) + (or (id ev) + (set/r! (id ev) (symbol->string (gensym "__html_id_"))))))) diff --git a/module/html/vcomponent.scm b/module/html/vcomponent.scm index 7d2cace1..6836e777 100644 --- a/module/html/vcomponent.scm +++ b/module/html/vcomponent.scm @@ -123,7 +123,8 @@ (class "CAL_" ,(html-attr (or (prop (parent ev) 'NAME) "unknown")))) fmt-header: (lambda body - `(a (@ (href "#" ,(date-link (as-date (prop ev 'DTSTART)))) + `(a (@ (href "#" ,(html-id ev) #; (date-link (as-date (prop ev 'DTSTART))) + ) (class "hidelink")) ,@body)))) (stream-filter diff --git a/static/style.scss b/static/style.scss index c1e99479..83b86c59 100644 --- a/static/style.scss +++ b/static/style.scss @@ -31,6 +31,15 @@ html, body { */ display: flex; flex-direction: column; + + .event:target { + box-shadow: + 1em 1em 0.5em gold, + -1em -1em 0.5em gold, + 1em -1em 0.5em gold, + -1em 1em 0.5em gold; + z-index: 1; + } } -- cgit v1.2.3