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 {
|
||||
position: relative;
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
@ -98,6 +99,19 @@
|
|||
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) {
|
||||
.calendar-strip {
|
||||
--padding-vertical: 1rem;
|
||||
|
|
|
|||
|
|
@ -56,8 +56,6 @@ return [
|
|||
$request = createMapadoEventRequest($event);
|
||||
$mapadoEvent = fetchMapadoEvent($request);
|
||||
|
||||
$duration = null;
|
||||
|
||||
$sessionsToSave = [];
|
||||
|
||||
foreach ($mapadoEvent->eventDateList as $session) {
|
||||
|
|
@ -73,17 +71,13 @@ return [
|
|||
$ticketingUrl = option('ticketingUrl') . 'event/' . $mapadoEvent->slug . '?eventDate=' . $eventDateId;
|
||||
$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, [
|
||||
"color" => $event->color()->value(),
|
||||
"day" => $sessionDay,
|
||||
"time" => str_replace(':', 'h', $startTime),
|
||||
"duration" => $duration,
|
||||
"duration" => $event->duration()->value(),
|
||||
"place" => $event->place()->value(),
|
||||
"public" => $event->public()->value(),
|
||||
"eventUrl" => $event->url(),
|
||||
"ticketingUrl" => $ticketingUrl,
|
||||
"bookableStock" => $bookableStock,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
<section
|
||||
class="calendar-strip"
|
||||
@mouseleave="open = false"
|
||||
x-data="{
|
||||
calendar: createEmptyCalendar(),
|
||||
currentMonthIndex: dayjs().month() + 1,
|
||||
|
|
@ -166,7 +165,7 @@
|
|||
<a class="session__event-link" :href="session.eventUrl" title="En savoir plus"></a>
|
||||
<div class="session__info session__info--slot">
|
||||
<p x-html="`${session.day} ${monthName}`"></p>
|
||||
<p x-html="`session.time"></p>
|
||||
<p x-html="session.time"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="middle-column mobile-group">
|
||||
|
|
@ -175,7 +174,12 @@
|
|||
<p x-html="session.authors"></p>
|
||||
</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 class="right-column mobile-group">
|
||||
<template x-if="!session.ticketingUrl">
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@
|
|||
<!-- Calendar -->
|
||||
<?php if ($page->isHomePage() || $page->template() == 'event' || $page->template() == 'program'): ?>
|
||||
<!-- dayjs -->
|
||||
<script async 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 async src="https://cdn.jsdelivr.net/npm/dayjs@1/plugin/weekOfYear.js"></script>
|
||||
<script async src="<?= url('/assets/js/calendar.js') ?>"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/dayjs.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/locale/fr.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/plugin/weekOfYear.js"></script>
|
||||
<script src="<?= url('/assets/js/calendar.js') ?>"></script>
|
||||
<?php endif ?>
|
||||
|
||||
<!-- Swiper -->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue