aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-08-17 16:41:58 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-08-17 16:41:58 +0200
commit79b9876aa8f3611264be4d665b51051b17c3c8b7 (patch)
tree251c0f5d0e0565a3d7a32f03647b2cf22991912f
parentCan add events spanning midnight. (diff)
downloadcalp-79b9876aa8f3611264be4d665b51051b17c3c8b7.tar.gz
calp-79b9876aa8f3611264be4d665b51051b17c3c8b7.tar.xz
Selected event now glows.
-rw-r--r--module/html/util.scm6
-rw-r--r--module/html/vcomponent.scm3
-rw-r--r--static/style.scss9
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;
+ }
}