complete calendar strip sessions informations
This commit is contained in:
parent
7c4e5d52b8
commit
450fac4e5e
4 changed files with 28 additions and 16 deletions
|
|
@ -88,7 +88,8 @@
|
||||||
.calendar-strip .session {
|
.calendar-strip .session {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr 0.5fr 1.5fr 1.5fr;
|
grid-template-columns: 0.7fr 1.4fr 0.8fr 1.2fr 1.6fr;
|
||||||
|
column-gap: 2vw;
|
||||||
padding: var(--padding-vertical) var(--space-m);
|
padding: var(--padding-vertical) var(--space-m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -98,6 +99,19 @@
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.calendar-strip .session__info--duration p {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.calendar-strip .session__info--book .ticket-link {
|
||||||
|
width: fit-content;
|
||||||
|
}
|
||||||
|
.calendar-strip .session__info--book {
|
||||||
|
text-align: right;
|
||||||
|
text-align: -moz-right;
|
||||||
|
text-align: -webkit-right;
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 800px) {
|
@media screen and (max-width: 800px) {
|
||||||
.calendar-strip {
|
.calendar-strip {
|
||||||
--padding-vertical: 1rem;
|
--padding-vertical: 1rem;
|
||||||
|
|
|
||||||
|
|
@ -56,8 +56,6 @@ return [
|
||||||
$request = createMapadoEventRequest($event);
|
$request = createMapadoEventRequest($event);
|
||||||
$mapadoEvent = fetchMapadoEvent($request);
|
$mapadoEvent = fetchMapadoEvent($request);
|
||||||
|
|
||||||
$duration = null;
|
|
||||||
|
|
||||||
$sessionsToSave = [];
|
$sessionsToSave = [];
|
||||||
|
|
||||||
foreach ($mapadoEvent->eventDateList as $session) {
|
foreach ($mapadoEvent->eventDateList as $session) {
|
||||||
|
|
@ -73,17 +71,13 @@ return [
|
||||||
$ticketingUrl = option('ticketingUrl') . 'event/' . $mapadoEvent->slug . '?eventDate=' . $eventDateId;
|
$ticketingUrl = option('ticketingUrl') . 'event/' . $mapadoEvent->slug . '?eventDate=' . $eventDateId;
|
||||||
$bookableStock = $session->notInStockContingentBookableStock;
|
$bookableStock = $session->notInStockContingentBookableStock;
|
||||||
|
|
||||||
if (isset($session->endDate) && !$duration) {
|
|
||||||
$endTime = substr($session->endDate, 11 , 5);
|
|
||||||
$duration = getTimeDifference($startTime, $endTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
$calendar[$sessionMonth][$sessionDay]['sessions'][] = array_merge($eventInfos, [
|
$calendar[$sessionMonth][$sessionDay]['sessions'][] = array_merge($eventInfos, [
|
||||||
"color" => $event->color()->value(),
|
"color" => $event->color()->value(),
|
||||||
"day" => $sessionDay,
|
"day" => $sessionDay,
|
||||||
"time" => str_replace(':', 'h', $startTime),
|
"time" => str_replace(':', 'h', $startTime),
|
||||||
"duration" => $duration,
|
"duration" => $event->duration()->value(),
|
||||||
"place" => $event->place()->value(),
|
"place" => $event->place()->value(),
|
||||||
|
"public" => $event->public()->value(),
|
||||||
"eventUrl" => $event->url(),
|
"eventUrl" => $event->url(),
|
||||||
"ticketingUrl" => $ticketingUrl,
|
"ticketingUrl" => $ticketingUrl,
|
||||||
"bookableStock" => $bookableStock,
|
"bookableStock" => $bookableStock,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
<section
|
<section
|
||||||
class="calendar-strip"
|
class="calendar-strip"
|
||||||
@mouseleave="open = false"
|
|
||||||
x-data="{
|
x-data="{
|
||||||
calendar: createEmptyCalendar(),
|
calendar: createEmptyCalendar(),
|
||||||
currentMonthIndex: dayjs().month() + 1,
|
currentMonthIndex: dayjs().month() + 1,
|
||||||
|
|
@ -166,7 +165,7 @@
|
||||||
<a class="session__event-link" :href="session.eventUrl" title="En savoir plus"></a>
|
<a class="session__event-link" :href="session.eventUrl" title="En savoir plus"></a>
|
||||||
<div class="session__info session__info--slot">
|
<div class="session__info session__info--slot">
|
||||||
<p x-html="`${session.day} ${monthName}`"></p>
|
<p x-html="`${session.day} ${monthName}`"></p>
|
||||||
<p x-html="`session.time"></p>
|
<p x-html="session.time"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="middle-column mobile-group">
|
<div class="middle-column mobile-group">
|
||||||
|
|
@ -175,7 +174,12 @@
|
||||||
<p x-html="session.authors"></p>
|
<p x-html="session.authors"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div x-text="session.duration ? session.duration : ''" class="session__info session__info--duration desktop"></div>
|
|
||||||
|
<div class="session__info session__info--duration desktop">
|
||||||
|
<p x-text="session.duration ? 'Durée : ' + session.duration : ''"></p>
|
||||||
|
<p x-text="session.public ? session.public : ''"></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div x-text="`${session.place}`" class="session__info session__info--place desktop"></div>
|
<div x-text="`${session.place}`" class="session__info session__info--place desktop"></div>
|
||||||
<div class="right-column mobile-group">
|
<div class="right-column mobile-group">
|
||||||
<template x-if="!session.ticketingUrl">
|
<template x-if="!session.ticketingUrl">
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,10 @@
|
||||||
<!-- Calendar -->
|
<!-- Calendar -->
|
||||||
<?php if ($page->isHomePage() || $page->template() == 'event' || $page->template() == 'program'): ?>
|
<?php if ($page->isHomePage() || $page->template() == 'event' || $page->template() == 'program'): ?>
|
||||||
<!-- dayjs -->
|
<!-- dayjs -->
|
||||||
<script async src="https://cdn.jsdelivr.net/npm/dayjs@1/dayjs.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/dayjs.min.js"></script>
|
||||||
<script async src="https://cdn.jsdelivr.net/npm/dayjs@1/locale/fr.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/locale/fr.js"></script>
|
||||||
<script async src="https://cdn.jsdelivr.net/npm/dayjs@1/plugin/weekOfYear.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/plugin/weekOfYear.js"></script>
|
||||||
<script async src="<?= url('/assets/js/calendar.js') ?>"></script>
|
<script src="<?= url('/assets/js/calendar.js') ?>"></script>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
<!-- Swiper -->
|
<!-- Swiper -->
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue