events : carte cliquable, template event, ajustement padding

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
isUnknown 2026-05-27 19:08:08 +02:00
parent 8df354bfcb
commit 4df018d5cb
3 changed files with 18 additions and 14 deletions

View file

@ -2,7 +2,7 @@
.events-grid {
box-sizing: border-box;
padding: 0 var(--space-body);
padding-top: 6rem;
padding-top: 7rem;
width: 100%;
display: grid;
grid-template-columns: repeat(3, 1fr);

View file

@ -0,0 +1,3 @@
<?php snippet('head') ?>
<?php snippet('header') ?>
<?php snippet('footer') ?>

View file

@ -4,19 +4,20 @@
<ul class="events-grid">
<?php foreach($page->children() as $event): ?>
<li class="event-card">
<h2><?= $event->title() ?></h2>
<a href="<?= $event->url() ?>"></a>
<div class="cover-wrapper">
<?php if ($event->isLive()): ?>
<div class="playing-now"><p>En ce moment</p></div>
<?php endif ?>
<?php snippet('picture', [
'file' => $event->cover()->toFile(),
'srcsetName' => 'event-card',
'sizes' => '(min-width: 800px) 30vw, 100vw',
'alt' => $event->title()->value(),
]) ?>
</div>
<a href="<?= $event->url() ?>">
<h2><?= $event->title() ?></h2>
<div class="cover-wrapper">
<?php if ($event->isLive()): ?>
<div class="playing-now"><p>En ce moment</p></div>
<?php endif ?>
<?php snippet('picture', [
'file' => $event->cover()->toFile(),
'srcsetName' => 'event-card',
'sizes' => '(min-width: 800px) 30vw, 100vw',
'alt' => $event->title()->value(),
]) ?>
</div>
</a>
</li>
<?php endforeach ?>
</ul>