From ccd35c2b9254ded67343dcb089eeda0dc647da63 Mon Sep 17 00:00:00 2001 From: isUnknown Date: Wed, 28 Aug 2024 10:34:08 +0200 Subject: [PATCH] finish mapadoEvent session display in front --- assets/css/src/callout.css | 4 -- assets/css/src/collapsable-section.css | 2 +- assets/css/src/generic.css | 9 +++ assets/css/src/nav.css | 4 -- assets/js/calendar.js | 6 ++ site/config/config.php | 2 +- site/templates/event.php | 90 ++++++++++++++++++-------- site/templates/home.php | 2 +- vendor/composer/installed.php | 4 +- 9 files changed, 82 insertions(+), 41 deletions(-) diff --git a/assets/css/src/callout.css b/assets/css/src/callout.css index 00d3085..96529d6 100644 --- a/assets/css/src/callout.css +++ b/assets/css/src/callout.css @@ -14,7 +14,3 @@ section.callout a { display: flex; align-items: center; } - -section.callout .ticket { - margin-right: 1rem; -} diff --git a/assets/css/src/collapsable-section.css b/assets/css/src/collapsable-section.css index caea444..6e2f86a 100644 --- a/assets/css/src/collapsable-section.css +++ b/assets/css/src/collapsable-section.css @@ -39,7 +39,7 @@ .collapsable__content .session { font-size: var(--font-size-m); - grid-template-columns: 2fr 1fr 1fr 1fr; + grid-template-columns: 2fr 1fr 1fr 2fr; } .collapsable__content .production p:not(:last-child) { diff --git a/assets/css/src/generic.css b/assets/css/src/generic.css index ab6ee4b..c6a8249 100644 --- a/assets/css/src/generic.css +++ b/assets/css/src/generic.css @@ -92,3 +92,12 @@ body.progress * { height: 1.5rem; transform: translateY(-0.2rem); } + +.ticket-link { + display: flex; + align-items: center; +} + +.ticket-link > figure { + margin-right: 1rem; +} diff --git a/assets/css/src/nav.css b/assets/css/src/nav.css index f3bd9db..d9e492a 100644 --- a/assets/css/src/nav.css +++ b/assets/css/src/nav.css @@ -53,10 +53,6 @@ justify-content: space-between; } -.expanded-nav__ticketing .ticket { - margin-right: 1rem; -} - .expanded-nav__links .social-icons { margin-top: 1rem; } diff --git a/assets/js/calendar.js b/assets/js/calendar.js index 5d966a5..94a06ab 100644 --- a/assets/js/calendar.js +++ b/assets/js/calendar.js @@ -171,5 +171,11 @@ async function updateMapadoEvent(pageUri) { const response = await fetch("/update-mapado-event.json", requestOptions); const json = await response.json(); + console.log("Séance récupérées de Mapado", json); return json; } + +function dateToFrench(date) { + date = dayjs(date); + return date.format("D MMMM YYYY"); +} diff --git a/site/config/config.php b/site/config/config.php index 54937e4..12dc474 100644 --- a/site/config/config.php +++ b/site/config/config.php @@ -44,5 +44,5 @@ return [ 'handler' => 'intl' ], 'locale' => 'fr_FR.UTF-8', - 'ticketingUrl' => 'https://cdn-besancon.mapado.com/' + 'ticketingUrl' => 'https://cdn-besancon.mapado.com/', ]; \ No newline at end of file diff --git a/site/templates/event.php b/site/templates/event.php index 88ca0e3..82090ab 100644 --- a/site/templates/event.php +++ b/site/templates/event.php @@ -20,35 +20,69 @@
'Prenez vos places !'], slots: true) ?> - -
- isMapadoEvent() != 'true' ? $page->sessions()->toStructure() : $page->remoteSessions()->toStructure(); - - foreach ($sessions as $session) : - $date = new DateTime($session->date()); - $formatter = new IntlDateFormatter('fr_FR', IntlDateFormatter::FULL, IntlDateFormatter::NONE); - $formattedDate = $formatter->format($date); - ?> -
-

-

time() ?>

-

place() ?>

-

test

+ isMapadoEvent() != 'true'): ?> + + +
+ sessions()->toStructure(); + + foreach ($sessions as $session) : + $date = new DateTime($session->date()); + $formatter = new IntlDateFormatter('fr_FR', IntlDateFormatter::FULL, IntlDateFormatter::NONE); + $formattedDate = $formatter->format($date); + ?> +
+

+

time() ?>

+

place() ?>

+

test

+
+
- -
- + + + + + +
+ +
+ + + 'Distribution et production'], slots: true) ?> diff --git a/site/templates/home.php b/site/templates/home.php index 32bdb38..f805425 100644 --- a/site/templates/home.php +++ b/site/templates/home.php @@ -32,7 +32,7 @@

callout() ?>

- Billetterie + Billetterie
\ No newline at end of file diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 457bd00..b7b15d4 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'getkirby/plainkit', 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => '3008e231cb1bbf24da4c475bf23c5e1d050945a2', + 'reference' => 'c98d5eb36b266cd487fe00ac87df199591ee9baa', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -67,7 +67,7 @@ 'getkirby/plainkit' => array( 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => '3008e231cb1bbf24da4c475bf23c5e1d050945a2', + 'reference' => 'c98d5eb36b266cd487fe00ac87df199591ee9baa', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(),