2024-08-18 16:56:58 +02:00
< ? php snippet ( 'header' ) ?>
< section class = " presentation " >
2024-09-17 15:49:48 +02:00
< div id = " swiper " style = " --span: 8; --color: <?= $page->color ()->isNotEmpty() ? $page->color () : 'var(--color-season)' ?> " >
2024-09-18 17:00:56 +02:00
< div class = " swiper-wrapper " >
2024-09-20 13:23:18 +02:00
< ? php
$images = $page -> gallery () -> toFiles () -> count () > 1 ? $page -> gallery () -> toFiles () -> without ( $page -> gallery () -> toFiles () -> first ()) : $page -> gallery () -> toFiles ();
foreach ( $images as $slide ) : ?>
2024-08-28 14:16:34 +02:00
< div class = " swiper-slide " >
< ? php snippet ( 'picture' , [ 'file' => $slide ]) ?>
</ div >
< ? php endforeach ?>
</ div >
2024-09-18 16:39:40 +02:00
< button class = " swiper-button swiper-button-prev " title = " précédente " > ← </ button >
< button class = " swiper-button swiper-button-next " title = " suivante " > → </ button >
2024-08-28 14:16:34 +02:00
</ div >
2024-08-18 16:56:58 +02:00
< div class = " presentation__text " >
2024-10-31 16:43:52 +01:00
< h1 class = " presentation__title " >< ? = $page -> title () ?> </h1>
2024-08-18 16:56:58 +02:00
< h3 class = " h2 presentation__authors " >< ? = $page -> authors () ?> </h3>
< div class = " presentation__chapo " >< ? = $page -> chapo () ?> </div>
< div class = " presentation__description " >< ? = $page -> description () ?> </div>
2024-10-31 17:53:10 +01:00
< ? php if ( $page -> informations () -> isNotEmpty ()) : ?>
< div class = " presentation__informations " >< ? = $page -> informations () -> kti () ?> </div>
< ? php endif ?>
2024-08-18 16:56:58 +02:00
</ div >
</ section >
< section class = " collapsable-sections " >
2024-09-10 15:23:24 +02:00
< ? php snippet ( 'collapsable-section' , [ 'title' => 'Réserver' , 'padding' => false ], slots : true ) ?>
2024-09-06 14:20:46 +02:00
<!--========== KIRBY EVENT ==========-->
2024-08-28 10:34:08 +02:00
< ? php if ( $page -> isMapadoEvent () != 'true' ) : ?>
< ? php slot ( 'content' ) ?>
< div
class = " sessions "
>
< ? php
$sessions = $page -> sessions () -> toStructure ();
foreach ( $sessions as $session ) :
$date = new DateTime ( $session -> date ());
$formatter = new IntlDateFormatter ( 'fr_FR' , IntlDateFormatter :: FULL , IntlDateFormatter :: NONE );
$formattedDate = $formatter -> format ( $date );
?>
2025-10-01 11:18:20 +02:00
< div class = " session collapsable__item--padding grid " < ? = $session -> backgroundColor () -> isNotEmpty (), ' style="background-color: ' . $session -> backgroundColor () . ';"' ?> >
2024-09-10 16:55:01 +02:00
< div class = " left-column " >
< p >< ? = $formattedDate ?> </p>
2025-10-01 11:18:20 +02:00
< p >< ? = $session -> time () ?> </p>
2024-09-10 16:55:01 +02:00
< p >< ? = $page -> place () ?> </p>
</ div >
< div class = " right-column " >
2025-10-15 15:48:32 +02:00
< ? php
$hasBookingUrl = $page -> bookingUrl () -> isNotEmpty ();
$hasTicketingUrl = $session -> ticketingUrl () -> isNotEmpty ();
$isTicketingUrlValid = $hasTicketingUrl && filter_var ( $session -> ticketingUrl (), FILTER_VALIDATE_URL );
$isFull = $session -> isFull () -> isTrue ();
?>
< ? php if ( ! $hasBookingUrl ) : ?>
< a class = " ticket-link " title = " Entrée libre " disabled >
< ? php snippet ( 'ticket' ) ?> <?= $isFull ? 'Complet' : 'Entrée libre' ?>
</ a >
< ? php elseif ( $hasTicketingUrl && ! $isTicketingUrlValid ) : ?>
< p >< ? = $session -> ticketingUrl () ?> </p>
< ? php else : ?>
< ? php
$url = $isTicketingUrlValid
? $session -> ticketingUrl () -> url ()
: $page -> bookingUrl () -> url ();
?>
< a
class = " ticket-link "
href = " <?= $url ?> "
target = " _blank "
title = " Plateforme de réservation "
< ? = $isFull ? 'disabled' : '' ?>
>
< ? php snippet ( 'ticket' ) ?> <?= $isFull ? 'Complet' : 'Réserver' ?>
</ a >
< ? php endif ?>
2024-09-10 16:55:01 +02:00
</ div >
2024-08-28 10:34:08 +02:00
</ div >
< ? php endforeach ?>
</ div >
< ? php endslot () ?>
2024-09-06 14:20:46 +02:00
<!--========== MAPADO EVENT ==========-->
2024-08-28 10:34:08 +02:00
< ? php else : ?>
< ? php slot ( 'content' ) ?>
< div
class = " sessions "
x - data = " {
2024-09-05 11:57:46 +02:00
stockThreshold : ( < ? = $page -> totalStock () -> value () ?> / 100) * 25,
2024-08-28 10:34:08 +02:00
sessions : [],
2024-08-28 10:49:48 +02:00
slug : null ,
eventDateId : null ,
2024-08-28 10:34:08 +02:00
async fetchSessions () {
const event = await updateMapadoEvent ( '<?= $page->uri() ?>' );
this . sessions = event . remoteSessions
2024-08-28 10:49:48 +02:00
this . slug = event . mapadoSlug
this . eventDateId = event . eventDateId
2024-08-28 10:34:08 +02:00
},
} "
x - init = "
if ( < ? = $page -> isMapadoEvent () == 'true' ?> ) {
fetchSessions ()
}
"
>
< template x - for = " session in sessions " >
2024-09-04 17:02:37 +02:00
< div
x - data = " {
2024-09-05 11:57:46 +02:00
stockThreshold : ( < ? = $page -> totalStock () -> value () ?> / 100) * 25
2024-09-04 17:02:37 +02:00
} "
class = " collapsable__item--padding session grid "
>
2024-09-10 16:55:01 +02:00
< div class = " left-column " >
< p x - text = " dateToFrench(session.date) " ></ p >
< p x - text = " session.time " ></ p >
< p >< ? = $page -> place () ?> </p>
</ div >
2024-09-19 15:41:48 +02:00
< template x - if = " !session.ticketingUrl " >
< a class = " ticket-link " title = " Plus de places disponibles " disabled >< ? php snippet ( 'ticket' ) ?> Entrée libre</a>
</ template >
2024-08-28 10:34:08 +02:00
< template x - if = " session.bookableStock === 0 " >
2024-08-28 10:49:48 +02:00
< a class = " ticket-link " title = " Plus de places disponibles " disabled >< ? php snippet ( 'ticket' ) ?> Complet</a>
2024-08-28 10:34:08 +02:00
</ template >
< template x - if = " session.bookableStock > stockThreshold " >
2024-09-02 14:02:13 +02:00
< a class = " ticket-link " title = " Plateforme de réservation " : href = " session.ticketingUrl " target = " _blank " >< ? php snippet ( 'ticket' ) ?> Billetterie</a>
2024-08-28 10:34:08 +02:00
</ template >
2024-09-02 14:02:13 +02:00
< template x - if = " session.bookableStock !== 0 && session.bookableStock < stockThreshold " >
< a class = " ticket-link " title = " Plateforme de réservation " : href = " session.ticketingUrl " target = " _blank " >< ? php snippet ( 'ticket' ) ?> Plus que quelques places !</a>
2024-08-28 10:34:08 +02:00
</ template >
</ div >
</ template >
2024-08-28 08:46:00 +02:00
</ div >
2024-08-28 10:34:08 +02:00
< ? php endslot () ?>
< ? php endif ?>
2024-08-28 08:46:00 +02:00
< ? php endsnippet () ?>
2024-09-18 17:47:07 +02:00
< ? php if ( $page -> production () -> isNotEmpty ()) : ?>
< ? php snippet ( 'collapsable-section' , [ 'title' => 'Distribution et production' ], slots : true ) ?>
< ? php slot ( 'content' ) ?>
< div class = " production " >
< ? php foreach ( $page -> production () -> toLayouts () as $layout ) : ?>
< div class = " collapsable__item--padding grid " id = " <?= $layout->id () ?> " >
< ? php foreach ( $layout -> columns () as $column ) : ?>
< div class = " grid__item " style = " --span:<?= $column->span () ?> " >
< div class = " blocks " >
< ? = $column -> blocks () ?>
</ div >
2024-08-27 17:10:48 +02:00
</ div >
2024-09-18 17:47:07 +02:00
< ? php endforeach ?>
2024-08-27 17:10:48 +02:00
</ div >
< ? php endforeach ?>
</ div >
2024-09-18 17:47:07 +02:00
< ? php endslot () ?>
< ? php endsnippet () ?>
< ? php endif ?>
2024-08-27 17:10:48 +02:00
< ? php if ( $page -> resources () -> isNotEmpty ()) : ?>
< ? php snippet ( 'collapsable-section' , [ 'title' => 'Ressources' ], slots : true ) ?>
< ? php slot ( 'content' ) ?>
2024-09-03 13:21:23 +02:00
< div class = " resources " >
< div class = " collapsable__item--padding grid " >
2024-08-27 17:10:48 +02:00
< ? php foreach ( $page -> resources () -> toStructure () as $resource ) : ?>
< div class = " resource grid__item " style = " --span: 4; " >
2024-10-31 15:59:51 +01:00
< ? php if ( $resource -> link () -> isNotEmpty ()) : ?>
< ? php if ( $resource -> link () -> toFile ()) : ?>
< p >< ? = $resource -> name () ?> </p><a href="<?= $resource->link()->toUrl() ?>" title="Télécharger le fichier" download>télécharger ↓</a>
< ? php else : ?>
< ? php snippet ( 'a' , [ 'url' => $resource -> link () -> toUrl (), 'text' => $resource -> name () . ' →' ]) ?>
< ? php endif ?>
< ? php endif ?>
2024-08-27 17:10:48 +02:00
</ div >
< ? php endforeach ?>
2024-09-03 13:21:23 +02:00
</ div >
2024-08-27 17:10:48 +02:00
</ div >
< ? php endslot () ?>
< ? php endsnippet () ?>
< ? php endif ?>
2024-08-18 16:56:58 +02:00
</ section >
2024-08-28 11:28:22 +02:00
2024-09-18 17:47:07 +02:00
< ? php if ( $page -> linkedPages () -> isNotEmpty ()) : ?>
< ? php snippet ( 'events-grid' , [ 'title' => 'Pour aller plus loin' , 'events' => $page -> linkedPages () -> toPages ()]) ?>
< ? php endif ?>
2024-09-13 16:00:15 +02:00
< ? php snippet ( 'callout' ) ?>
2024-08-18 16:56:58 +02:00
< ? php snippet ( 'footer' ) ?>