2020-04-22 11:39:44 -04:00
|
|
|
<main class="details fixed">
|
|
|
|
<?php if (empty($items)): ?>
|
|
|
|
<h3>No recent history.</h3>
|
|
|
|
<?php else: ?>
|
|
|
|
<section>
|
|
|
|
<?php foreach ($items as $name => $item): ?>
|
|
|
|
<article class="flex flex-no-wrap flex-justify-start">
|
2020-04-22 12:38:59 -04:00
|
|
|
<section class="flex-self-center history-img">
|
|
|
|
<a href="<?= $item['url'] ?>">
|
|
|
|
<?= $helper->picture(
|
|
|
|
$item['coverImg'],
|
|
|
|
'jpg',
|
|
|
|
['width' => '110px', 'height' => '156px'],
|
|
|
|
['width' => '110px', 'height' => '156px']
|
|
|
|
) ?>
|
|
|
|
</a>
|
|
|
|
</section>
|
2020-04-22 11:39:44 -04:00
|
|
|
<section class="flex-self-center">
|
2020-04-22 12:38:59 -04:00
|
|
|
<?= $helper->a($item['url'], $item['title']) ?>
|
2020-04-22 11:39:44 -04:00
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
<?= $item['action'] ?>
|
|
|
|
<br />
|
|
|
|
<small>
|
|
|
|
<?php if ( ! empty($item['dateRange'])):
|
|
|
|
[$startDate, $endDate] = array_map(
|
|
|
|
fn ($date) => $date->format('l, F d'),
|
|
|
|
$item['dateRange']
|
|
|
|
);
|
|
|
|
[$startTime, $endTime] = array_map(
|
|
|
|
fn ($date) => $date->format('h:i:s A'),
|
|
|
|
$item['dateRange']
|
|
|
|
);
|
|
|
|
?>
|
|
|
|
<?php if ($startDate === $endDate): ?>
|
|
|
|
<?= "{$startDate}, {$startTime} – {$endTime}" ?>
|
|
|
|
<?php else: ?>
|
|
|
|
<?= "{$startDate} {$startTime} – {$endDate} {$endTime}" ?>
|
|
|
|
<?php endif ?>
|
|
|
|
<?php else: ?>
|
|
|
|
<?= $item['updated']->format('l, F d h:i:s A') ?>
|
|
|
|
<?php endif ?>
|
|
|
|
</small>
|
|
|
|
</section>
|
|
|
|
</article>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</section>
|
|
|
|
<?php endif ?>
|
|
|
|
</main>
|