All checks were successful
Deploy / Deploy (push) Successful in 9s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
81 lines
No EOL
3.2 KiB
PHP
81 lines
No EOL
3.2 KiB
PHP
<?php snippet('header') ?>
|
|
<section class="hero">
|
|
<?php if ($site->heroMode() == 'custom'): ?>
|
|
<div class="hero__image" style="--color: var(--color-season)">
|
|
<?php if ($site->heroLink()->isNotEmpty()): ?>
|
|
<a href="<?= $site->heroLink()->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>
|
|
<div class="hero__text">
|
|
<div class="hero__title">
|
|
<?= $site->heroTextLeft()->toBlocks() ?>
|
|
</div>
|
|
<div class="hero__book">
|
|
<?= $site->heroTextRight() ?>
|
|
</div>
|
|
</div>
|
|
<?php else: ?>
|
|
<?php $heroEvent = $site->heroEvent()->toPage(); ?>
|
|
<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>
|
|
<div class="hero__text">
|
|
<div class="hero__title">
|
|
<a href="<?= $heroEvent->url() ?>">
|
|
<h2><?= $heroEvent->title() ?></h2>
|
|
<h3><?= $heroEvent->authors() ?></h3>
|
|
</a>
|
|
</div>
|
|
<div class="hero__book">
|
|
<?php $schedule = $heroEvent->schedule(); ?>
|
|
<?php if ($schedule): ?>
|
|
<?php
|
|
if ($heroEvent->isMapadoEvent() == 'true') {
|
|
$bookingUrl = option('ticketingUrl') . 'event/' . $heroEvent->mapadoSlug();
|
|
} elseif ($heroEvent->bookingUrl()->isNotEmpty()) {
|
|
$bookingUrl = $heroEvent->bookingUrl()->value();
|
|
} else {
|
|
$bookingUrl = null;
|
|
}
|
|
?>
|
|
<a class="ticket-link h3" href="<?= $bookingUrl ?>" title="Plateforme de réservation"<?= e(Str::contains($bookingUrl, $site->url()), '', ' target="_blank"') ?>><?php snippet('ticket') ?> Billetterie</a>
|
|
<?php endif ?>
|
|
</div>
|
|
</div>
|
|
<?php endif ?>
|
|
</section>
|
|
|
|
<?php snippet('calendar-strip') ?>
|
|
|
|
<?php if ($site->events()->isNotEmpty()): ?>
|
|
<?php
|
|
$homeEvents = $site->events()->toPages()->published();
|
|
snippet('events-grid', ['title' => 'Prochainement', 'events' => $homeEvents, 'columns' => $homeEvents->count() === 1 ? 2 : $homeEvents->count()])
|
|
?>
|
|
<?php endif ?>
|
|
|
|
<?php snippet('newsletter-section') ?>
|
|
|
|
<?php snippet('callout') ?>
|
|
|
|
<?php snippet('footer') ?>
|