fix home events grids

This commit is contained in:
isUnknown 2024-09-03 11:26:21 +02:00
parent bb1ff96462
commit 7efec15b2f
2 changed files with 20 additions and 3 deletions

View file

@ -23,12 +23,12 @@
'asc'
);
snippet('events-grid', ['title' => 'À venir', 'events' => $orderedEvents->slice(0, 2)])
snippet('events-grid', ['title' => 'À venir', 'events' => $orderedEvents->slice(0, 2), 'columns' => 2])
?>
<?php snippet('newsletter-section') ?>
<?php snippet('events-grid', ['title' => 'À venir', 'events' => $orderedEvents->slice(2, 5)]) ?>
<?php snippet('events-grid', ['title' => 'À venir', 'events' => $orderedEvents->slice(2, 3)]) ?>
<section class="callout">
<h4><?= $site->callout() ?></h4>

View file

@ -66,7 +66,7 @@
x-data="{title: 'Saisons précédentes'}"
x-text="title"
:class="tab === title ? 'strong' : ''"
@click="if (tab === filterTitle) { tab = 'Programme' } else { tab = title }"
@click="if (tab === title) { tab = 'Programme' } else { tab = title }"
></button>
</section>
<section class="page-title">
@ -153,6 +153,23 @@
</section>
</div>
</template>
<!-- Saisons précédentes -->
<template x-if="tab.includes('Saisons précédentes')">
<div class="program-content__events">
<section class="collapsable-sections">
<?php foreach($previousSeasons as $previousSeason): ?>
<?php snippet('collapsable-section', ['title' => $previousSeason->title()], slots: true) ?>
<?php slot('content') ?>
<div class="program-content__events">
<?php snippet('events-grid', ['events' => $previousSeason->children(), 'columns' => 3]) ?>
</div>
<?php endslot() ?>
<?php endsnippet() ?>
<?php endforeach ?>
</section>
</div>
</template>
</div>
</div>