From c5ba561a9c70100cb57b274d8144e3ec24aeeeaa Mon Sep 17 00:00:00 2001 From: isUnknown Date: Wed, 1 Oct 2025 11:18:20 +0200 Subject: [PATCH] custom event (no connected to Mapado) : add ticketing url and background color --- assets/css/src/vanilla.css | 2 +- site/blueprints/pages/event.yml | 42 +++++++++++++++++++++++---------- site/templates/event.php | 16 +++++++++---- 3 files changed, 42 insertions(+), 18 deletions(-) diff --git a/assets/css/src/vanilla.css b/assets/css/src/vanilla.css index 68063cf..6da7406 100644 --- a/assets/css/src/vanilla.css +++ b/assets/css/src/vanilla.css @@ -35,7 +35,7 @@ picture svg { } a[disabled] { - cursor: not-allowed; + pointer-events: none; } a:focus-visible, diff --git a/site/blueprints/pages/event.yml b/site/blueprints/pages/event.yml index 6fb4c6a..978c3a4 100644 --- a/site/blueprints/pages/event.yml +++ b/site/blueprints/pages/event.yml @@ -50,7 +50,7 @@ tabs: mapadoSlug: type: hidden bookingUrl: - label: Lien de réservation + label: Lien de réservation par défaut type: url width: 1/2 when: @@ -82,11 +82,15 @@ tabs: type: structure columns: date: - width: 1/3 + width: 1/5 time: - width: 1/3 - timeComplement: - width: 1/3 + width: 1/5 + ticketingUrl: + width: 1/5 + isFull: + width: 1/5 + backgroundColor: + width: 1/5 when: isMapadoEvent: false fields: @@ -94,18 +98,30 @@ tabs: type: date icon: calendar display: DD/MM/YYYY - width: 1/3 + width: 1/2 time: - label: Horaire de début + label: Horaire et complément type: text help: | Format : 20h00 ou 20h (pas 20:00) - width: 1/3 - timeComplement: - label: Complément - help: Affiché après l'horaire - type: text - width: 1/3 + width: 1/2 + ticketingUrl: + label: Lien de réservation + type: url + isFull: + label: Complet + type: toggle + text: + off: non + on: oui + default: off + width: 1/4 + backgroundColor: + type: color + label: Couleur de fond + width: 3/4 + default: "#ffffff" + remoteSessions: label: Séances type: structure diff --git a/site/templates/event.php b/site/templates/event.php index 8e04895..b0a4a03 100644 --- a/site/templates/event.php +++ b/site/templates/event.php @@ -51,17 +51,25 @@ $formatter = new IntlDateFormatter('fr_FR', IntlDateFormatter::FULL, IntlDateFormatter::NONE); $formattedDate = $formatter->format($date); ?> -
+
backgroundColor()->isNotEmpty(), ' style="background-color: ' . $session->backgroundColor() . ';"' ?>>

-

timeComplement()->isEmpty() == 'true', $session->time(), $session->time() . ' ' . $session->timeComplement()) ?>

+

time() ?>

place() ?>