diff --git a/assets/css/src/calendar-strip.css b/assets/css/src/calendar-strip.css index 84cf312..58f7c84 100644 --- a/assets/css/src/calendar-strip.css +++ b/assets/css/src/calendar-strip.css @@ -45,7 +45,7 @@ max-height: 0; padding: 0 var(--margin-body); background-color: #fff; - z-index: -1; + z-index: 0; transition: max-height 0.3s ease-in-out; border-bottom: var(--border); } diff --git a/assets/css/src/events-grid.css b/assets/css/src/events-grid.css new file mode 100644 index 0000000..044cf43 --- /dev/null +++ b/assets/css/src/events-grid.css @@ -0,0 +1,3 @@ +.events-grid { + min-height: 30rem; +} diff --git a/assets/css/src/hero.css b/assets/css/src/hero.css index ac7e4ce..4178cb2 100644 --- a/assets/css/src/hero.css +++ b/assets/css/src/hero.css @@ -1,9 +1,6 @@ .hero { display: grid; grid-template-columns: 2fr 3fr; -} - -.hero__text { padding: 2.5rem; } diff --git a/assets/css/src/variables.css b/assets/css/src/variables.css index c3885ab..4c744b5 100644 --- a/assets/css/src/variables.css +++ b/assets/css/src/variables.css @@ -9,6 +9,7 @@ --curve-quick-slow: cubic-bezier(0.175, 0.885, 0.32, 1.275); --margin-body: 3.86rem; + --space-m: 2rem; --color-pink: #ed268f; --color-pink-light: #ffa199; diff --git a/assets/css/style.css b/assets/css/style.css index d4d6dbd..81b028d 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -5,3 +5,4 @@ @import url("src/nav.css"); @import url("src/hero.css"); @import url("src/calendar-strip.css"); +@import url("src/events-grid.css"); diff --git a/site/config/routes/month-dates.php b/site/config/routes/month-dates.php index b32b9ea..73847ba 100644 --- a/site/config/routes/month-dates.php +++ b/site/config/routes/month-dates.php @@ -73,10 +73,14 @@ return [ $mapadoEvent = fetchMapadoEvent($request); $duration = null; + + $sessionsToSave = []; + foreach ($mapadoEvent->eventDateList as $session) { + $sessionMonth = substr($session->startDate, 0, 7); + if ($sessionMonth === $requestMonth) { - $day = intval(substr($session->startDate, 8, 2)); $startTime = substr($session->startDate, 11, 5); $eventDateId = explode('/', $session->{'@id'}); @@ -93,9 +97,16 @@ return [ "duration" => $duration, "ticketingUrl" => 'https://cdn-besancon.mapado.com/event/' . $mapadoEvent->slug . '?eventDate=' . $eventDateId ]); - } + $sessionsToSave[] = [ + "date" => substr($session->startDate, 0, 10), + "time" => str_replace(':', 'h', $startTime) + ]; + } } + $event->update([ + "sessions" => $sessionsToSave + ]); } } diff --git a/site/snippets/events-grid.php b/site/snippets/events-grid.php new file mode 100644 index 0000000..616740e --- /dev/null +++ b/site/snippets/events-grid.php @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/site/templates/home.php b/site/templates/home.php index dbc3078..f330a9a 100644 --- a/site/templates/home.php +++ b/site/templates/home.php @@ -8,4 +8,5 @@ + \ No newline at end of file