38 lines
No EOL
1.2 KiB
PHP
38 lines
No EOL
1.2 KiB
PHP
<?php snippet('header') ?>
|
|
|
|
<section class="hero">
|
|
<div class="hero__text">
|
|
<?= $site->heroText()->toBlocks() ?>
|
|
</div>
|
|
<div class="hero__image">
|
|
<?php snippet('picture', ['file' => $site->heroImage()->toFile()]) ?>
|
|
</div>
|
|
</section>
|
|
|
|
<?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', ['title' => 'À venir', 'events' => $orderedEvents->slice(0, 2), 'columns' => 2])
|
|
?>
|
|
|
|
<?php snippet('newsletter-section') ?>
|
|
|
|
<?php snippet('events-grid', ['title' => 'À venir', 'events' => $orderedEvents->slice(2, 3)]) ?>
|
|
|
|
<section class="callout">
|
|
<h4><?= $site->callout() ?></h4>
|
|
<a class="to-blank ticket-link" href="<?= option('ticketingUrl') ?>" target="_blank" title="Aller à la billetterie"><?php snippet('ticket') ?> Billetterie</a>
|
|
</section>
|
|
|
|
<?php snippet('footer') ?>
|