2024-07-24 09:43:31 +02:00
|
|
|
<?php snippet('header') ?>
|
2024-07-31 08:50:49 +02:00
|
|
|
<section class="hero">
|
2024-10-31 15:35:46 +01:00
|
|
|
<?php if ($site->heroMode() == 'custom'): ?>
|
|
|
|
|
<div class="hero__text">
|
|
|
|
|
<?= $site->heroText()->toBlocks() ?>
|
|
|
|
|
<?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>
|
2024-09-20 14:57:29 +02:00
|
|
|
<?php endif ?>
|
|
|
|
|
</div>
|
2024-10-31 15:35:46 +01:00
|
|
|
<div class="hero__image" style="--color: var(--color-season)">
|
|
|
|
|
<?php if ($site->heroLinkUrl()->isNotEmpty() == 'true'): ?>
|
|
|
|
|
<a href="<?= $site->heroLinkUrl()->toUrl() ?>" title="en savoir plus"></a>
|
|
|
|
|
<?php endif ?>
|
|
|
|
|
<div class="image-wrapper">
|
|
|
|
|
<?php if ($site->heroImage()->toFiles()->count() > 1): ?>
|
|
|
|
|
<?php snippet('picture', [
|
|
|
|
|
'file' => $site->heroImage()->toFiles()->first(),
|
|
|
|
|
'class' => 'image-cover',
|
|
|
|
|
'size' => 60
|
|
|
|
|
]) ?>
|
|
|
|
|
<?php endif ?>
|
|
|
|
|
<?php snippet('picture', ['file' => $site->heroImage()->toFiles()->count() > 1 ? $site->heroImage()->toFiles()->nth(1) : $site->heroImage()->toFiles()->first(), 'lazy' => false, 'size' => 60]) ?>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<?php else: ?>
|
|
|
|
|
<?php $heroEvent = $site->heroEvent()->toPage(); ?>
|
|
|
|
|
<div class="hero__text">
|
|
|
|
|
<h2>
|
|
|
|
|
<?= $heroEvent->title() ?>
|
|
|
|
|
</h2>
|
|
|
|
|
<?= $heroEvent->chapo() ?>
|
|
|
|
|
<a class="hero__link h3" href="<?= $heroEvent->url() ?>">Découvrir</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="hero__image" style="--color: var(--color-season)">
|
|
|
|
|
<a href="<?= $heroEvent->url() ?>" title="en savoir plus"></a>
|
|
|
|
|
<div class="image-wrapper">
|
|
|
|
|
<?php if ($heroEvent->gallery()->toFiles()->count() > 1): ?>
|
|
|
|
|
<?php snippet('picture', [
|
|
|
|
|
'file' => $heroEvent->gallery()->toFiles()->first(),
|
|
|
|
|
'class' => 'image-cover',
|
|
|
|
|
'size' => 60
|
|
|
|
|
]) ?>
|
|
|
|
|
<?php endif ?>
|
|
|
|
|
<?php snippet('picture', ['file' => $heroEvent->gallery()->toFiles()->count() > 1 ? $heroEvent->gallery()->toFiles()->nth(1) : $heroEvent->gallery()->toFiles()->first(), 'lazy' => false, 'size' => 60]) ?>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<?php endif ?>
|
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
|
2024-09-13 16:36:32 +02:00
|
|
|
$orderedSeason = $kirby->collection('ordered-season');
|
|
|
|
|
$comingEvents = filterFutureEvents($orderedSeason);
|
|
|
|
|
?>
|
2024-07-30 19:03:01 +02:00
|
|
|
|
2024-09-13 16:36:32 +02:00
|
|
|
<?php
|
|
|
|
|
snippet('events-grid', ['title' => 'Prochainement', 'events' => $comingEvents->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-13 17:12:49 +02:00
|
|
|
<?php //snippet('events-grid', ['events' => $comingEvents->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') ?>
|