add title to home grid

This commit is contained in:
isUnknown 2024-08-28 11:28:22 +02:00
parent 303ccf5bce
commit 1ab84c2ea5
6 changed files with 19 additions and 5 deletions

View file

@ -1,8 +1,14 @@
<section class="events-grid">
<h4>À venir</h4>
<h4><?= $title ?></h4>
<div class="grid">
<?php foreach($events as $event): ?>
<?php snippet('event-card', ["event" => $event, "span" => 12 / $events->count()]) ?>
<?php
$span = 4;
if ($events->count() === 4) {
$span = 3;
}
snippet('event-card', ["event" => $event, "span" => $span])
?>
<?php endforeach ?>
</div>
</section>