2024-07-24 09:43:31 +02:00
|
|
|
<?php snippet('header') ?>
|
2024-07-31 08:50:49 +02:00
|
|
|
<section class="hero">
|
2024-07-30 12:07:47 +02:00
|
|
|
<div class="hero__text">
|
|
|
|
|
<?= $site->heroText()->toBlocks() ?>
|
2024-09-03 17:06:25 +02:00
|
|
|
<?php if ($site->heroLinkUrl()->isNotEmpty() == 'true'): ?>
|
|
|
|
|
<a class="hero__link h3" href="<?= $site->heroLinkUrl()->toUrl() ?>"><?php e($site->heroLinkText()->isNotEmpty() == 'true', $site->heroLinkText(), $site->heroLinkUrl()->toUrl()) ?></a>
|
|
|
|
|
<?php endif ?>
|
2024-07-30 12:07:47 +02:00
|
|
|
</div>
|
|
|
|
|
<div class="hero__image">
|
2024-09-13 16:12:42 +02:00
|
|
|
<?php if ($site->heroLinkUrl()->isNotEmpty() == 'true'): ?>
|
|
|
|
|
<a href="<?= $site->heroLinkUrl()->toUrl() ?>">
|
|
|
|
|
<?php snippet('picture', ['file' => $site->heroImage()->toFile()]) ?>
|
|
|
|
|
</a>
|
|
|
|
|
<?php else: ?>
|
|
|
|
|
<?php snippet('picture', ['file' => $site->heroImage()->toFile()]) ?>
|
|
|
|
|
<?php endif ?>
|
2024-07-30 12:07:47 +02:00
|
|
|
</div>
|
2024-07-31 08:50:49 +02:00
|
|
|
</section>
|
|
|
|
|
|
2024-08-28 14:41:30 +02:00
|
|
|
<?php snippet('calendar-strip') ?>
|
2024-07-31 08:50:49 +02:00
|
|
|
|
2024-07-30 19:03:01 +02:00
|
|
|
<?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'
|
|
|
|
|
);
|
|
|
|
|
|
2024-09-10 15:23:24 +02:00
|
|
|
snippet('events-grid', ['title' => 'Prochainement', 'events' => $orderedEvents->slice(0, 2), 'columns' => 2])
|
2024-07-30 19:03:01 +02:00
|
|
|
?>
|
2024-07-31 08:50:49 +02:00
|
|
|
|
|
|
|
|
<?php snippet('newsletter-section') ?>
|
|
|
|
|
|
2024-09-10 15:23:24 +02:00
|
|
|
<?php snippet('events-grid', ['title' => 'Prochainement', 'events' => $orderedEvents->slice(2, 3)]) ?>
|
2024-07-31 11:20:08 +02:00
|
|
|
|
2024-09-13 16:00:15 +02:00
|
|
|
<?php snippet('callout') ?>
|
2024-07-31 12:09:03 +02:00
|
|
|
|
2024-07-24 09:43:31 +02:00
|
|
|
<?php snippet('footer') ?>
|