aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--module/calp/html/view/calendar/week.scm13
-rw-r--r--static/style.scss7
2 files changed, 18 insertions, 2 deletions
diff --git a/module/calp/html/view/calendar/week.scm b/module/calp/html/view/calendar/week.scm
index fb28923e..556c3d85 100644
--- a/module/calp/html/view/calendar/week.scm
+++ b/module/calp/html/view/calendar/week.scm
@@ -71,11 +71,17 @@
(define (lay-out-day day)
(let* (((day-date . events) day)
(time-obj (datetime date: day-date))
+ (short-events (stream->list events))
+ #;
(zero-length-events short-events
(partition event-zero-length? (stream->list events))))
- (fix-event-widths! short-events event-length-key:
- (lambda (e) (event-length/day day-date e)))
+ (fix-event-widths!
+ short-events
+ event-length-key: (lambda (e)
+ (if (event-zero-length? e)
+ (time hour: 1)
+ (event-length/day day-date e))))
`(div (@ (class "events event-container") (id ,(date-link day-date))
(data-start ,(date->string day-date))
@@ -83,6 +89,7 @@
,@(map (lambda (time)
`(div (@ (class "clock clock-" ,time))))
(iota 12 0 2))
+ #;
(div (@ (class "zero-width-events"))
,(map make-block zero-length-events))
,@(map (lambda (e) (create-block day-date e)) short-events))))
@@ -117,6 +124,8 @@
(make-block
ev `((class
+ ,(when (event-zero-length? ev)
+ " zero-length")
,(when (date<? (as-date (prop ev 'DTSTART)) date)
" continued")
,(when (and (prop ev 'DTEND) (date<? date (as-date (prop ev 'DTEND))))
diff --git a/static/style.scss b/static/style.scss
index 5a006684..a29bb24b 100644
--- a/static/style.scss
+++ b/static/style.scss
@@ -469,6 +469,11 @@ along with their colors.
width: calc(100% * var(--editmode));
}
+ &.zero-length {
+ border-radius: 0 1cm 1cm 0;
+ height: calc(100% * 1/24) !important;
+ }
+
&.continuing {
border-bottom: none;
background-image: linear-gradient(to top, #0007 0%,#FFF0 2em);
@@ -593,6 +598,7 @@ along with their colors.
}
}
+/*
.zero-width-events .event {
width: initial;
padding: 0.5em;
@@ -601,6 +607,7 @@ along with their colors.
position: relative;
float: left;
}
+*/
.repeating {