diff --git a/css/calendar.css b/css/calendar.css index 8ef57ce..637dead 100644 --- a/css/calendar.css +++ b/css/calendar.css @@ -73,6 +73,9 @@ .calendar tbody tr td.hour span { display: block; } +.calendar tbody tr td.active { + border: 1px solid yellow; +} #pointer { position: absolute; left: 0; @@ -83,6 +86,9 @@ .pointer-label { color: red; } +.pointer-label-wrapper { + color: yellow; +} .show-title { position: relative; z-index: 2; diff --git a/schedule/calendar.php b/schedule/calendar.php index a549aff..bc90c08 100644 --- a/schedule/calendar.php +++ b/schedule/calendar.php @@ -66,21 +66,26 @@ for ($i = 0; $i < 86400; $i += 1800) { break; } } + $active = false; + if (!$wrotepointer) { + // If current time is in this range, draw pointer. + $end = DateTimeImmutable::createFromMutable($merge)->add($halfhour); + if ($now >= $merge && $now < $end) { + $active = true; + $props .= ' class="active"'; + } + } echo "
all times in UTC. current time is =formatdate("now")?> (—).
+all times in UTC. current time is =formatdate("now")?> +(—).
this schedule is also available in iCalendar format. point your calendar client at https://tilderadio.org/schedule/ics.php
.