25 lines
No EOL
750 B
PHP
25 lines
No EOL
750 B
PHP
<?php snippet('header') ?>
|
|
<div class="hero">
|
|
<div class="hero__text">
|
|
<?= $site->heroText()->toBlocks() ?>
|
|
</div>
|
|
<div class="hero__image">
|
|
<?php snippet('picture', ['file' => $site->heroImage()->toFile()]) ?>
|
|
</div>
|
|
</div>
|
|
<?php snippet('calendar-strip') ?>
|
|
<?php
|
|
$currentSeason = page('programme')->children()->first()->children();
|
|
$orderedEvents = $currentSeason->sortBy(function ($event) {
|
|
if ($event->isMapadoEvent() == 'true') {
|
|
return $event->remoteSessions()->toStructure()->toArray()[0]['date'];
|
|
} else {
|
|
return $event->sessions()->toStructure()->toArray()[0]['date'];
|
|
}
|
|
},
|
|
'asc'
|
|
);
|
|
|
|
snippet('events-grid', ['events' => $orderedEvents->limit(2)])
|
|
?>
|
|
<?php snippet('footer') ?>
|