Err, try again

This commit is contained in:
Felix Albrigtsen 2024-08-17 23:59:17 +02:00
parent 8bcadd1d2d
commit a29d3fe803
2 changed files with 11 additions and 28 deletions

View File

@ -65,24 +65,6 @@ img.float-right {
list-style: none;
}
.calendar-events ul li :not(.date):not(.time) {
display: inline-block;
width: calc(100% - 7em);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.calendar-events ul .date {
color: rgba(0, 0, 0, 0.5);
font-size: 0.8em;
margin-top: 0.2em;
}
.calendar-events > li > p {
border-bottom: 0.1em dotted rgba(0, 0, 0, 0.2);
}
.calendar-events ul {
list-style: none;
padding: 0;
@ -92,16 +74,14 @@ img.float-right {
color: rgba(0,0,0, 0.85);
}
.calendar-events ul .time {
.calendar-events ul .datetime {
color: rgba(0, 0, 0, 0.5);
float: right;
margin-left: 0.2em;
}
.calendar-events ul .icon,
.calendar-events ul .date {
float: right;
margin-right: 0.5em;
.calendar-events ul li {
margin-bottom: 0.4em;
}
main.contentsplit {

View File

@ -77,17 +77,20 @@ $doorTime = date("H:i", $doorEntry->time);
<?php } else { ?>
<strong><?= $event->getName(); ?></strong>
<?php } ?>
<span class="datetime">
<?php if ($period !== \pvv\side\Agenda::TODAY) {
echo '<span class="time">' . $event->getStart()->format('H:i') . ' </span>';
echo $event->getStart()->format('H:i') . " " ;
if (\pvv\side\Agenda::isThisWeek($event->getStart()) || $event->getStart()->sub(new DateInterval('P3D'))->getTimestamp() < time()) {
echo '<span class="time">' . $event->getStart()->format('D') . '</span>';
echo $event->getStart()->format('D');
} else {
echo '<span class="time">' . $event->getStart()->format('j. F') . '</span>';
echo $event->getStart()->format('j. F');
}
} else {
echo '<span class="time">' . $event->getStart()->format('H:i') . '</span>';
echo $event->getStart()->format('H:i');
}
?>
</span>
</li>
<?php } ?>
</ul>