Better alignment of date/time for today
This commit is contained in:
parent
0a2c08eb9b
commit
faff3a2a8d
|
@ -33,7 +33,6 @@ img.float-right {
|
||||||
.calendar-events ul .time {
|
.calendar-events ul .time {
|
||||||
color: rgba(0,0,0,.5);
|
color: rgba(0,0,0,.5);
|
||||||
float: right;
|
float: right;
|
||||||
width: 4em;
|
|
||||||
}
|
}
|
||||||
.calendar-events ul .icon, .calendar-events ul .date {
|
.calendar-events ul .icon, .calendar-events ul .date {
|
||||||
float: right;
|
float: right;
|
||||||
|
|
|
@ -54,14 +54,14 @@ include '../inc/ticker.php';
|
||||||
<a href="<?= htmlspecialchars($event->getURL()) ?>"><?= $event->getName(); ?></a>
|
<a href="<?= htmlspecialchars($event->getURL()) ?>"><?= $event->getName(); ?></a>
|
||||||
<?php /* <a class="icon subscribe">+</a> */ ?>
|
<?php /* <a class="icon subscribe">+</a> */ ?>
|
||||||
<?php if ($period !== \pvv\side\Agenda::TODAY) {
|
<?php if ($period !== \pvv\side\Agenda::TODAY) {
|
||||||
|
echo '<span class="time">' . $event->getStart()->format('H:i') . '</span>';
|
||||||
if (\pvv\side\Agenda::isThisWeek($event->getStart()) || $event->getStart()->sub(new DateInterval('P3D'))->getTimestamp() < time()) {
|
if (\pvv\side\Agenda::isThisWeek($event->getStart()) || $event->getStart()->sub(new DateInterval('P3D'))->getTimestamp() < time()) {
|
||||||
echo '<span class="date">' . strftime('%a', $event->getStart()->getTimestamp()) . '</span>';
|
echo '<span class="date">' . strftime('%a', $event->getStart()->getTimestamp()) . '</span>';
|
||||||
} else {
|
} else {
|
||||||
echo '<span class="date">' . strftime('%e. %b', $event->getStart()->getTimestamp()) . '</span>';
|
echo '<span class="date">' . strftime('%e. %b', $event->getStart()->getTimestamp()) . '</span>';
|
||||||
}
|
}
|
||||||
echo '<span class="time">' . $event->getStart()->format('H:i') . '</span>';
|
|
||||||
} else {
|
} else {
|
||||||
echo '<span class="date">' . $event->getStart()->format('H:i') . '</span>';
|
echo '<span class="time">' . $event->getStart()->format('H:i') . '</span>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</li>
|
</li>
|
||||||
|
|
Loading…
Reference in New Issue