events : grille 3 colonnes, crop 3:2 avec focus point

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
isUnknown 2026-05-07 15:22:00 +02:00
parent 3c88b3c12f
commit 87769e7128
2 changed files with 19 additions and 6 deletions

View file

@ -1,4 +1,10 @@
[data-template="events"] {
.events-grid {
box-sizing: border-box;
padding: var(--space-body);
width: 100%;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1rem;
}
}

View file

@ -1,14 +1,21 @@
<?php
// Grille de cards événements : 30vw ≥800px, 100vw <800px
// Ratio 3:2, crop sur le point de focus défini en back office.
// Widths couvrent 1x et 2x (retina) pour chaque breakpoint
return [
'event-card' => [400, 600, 800, 1200, 1600],
'event-card' => [
'400w' => ['width' => 400, 'height' => 267, 'crop' => true],
'600w' => ['width' => 600, 'height' => 400, 'crop' => true],
'800w' => ['width' => 800, 'height' => 533, 'crop' => true],
'1200w' => ['width' => 1200, 'height' => 800, 'crop' => true],
'1600w' => ['width' => 1600, 'height' => 1067, 'crop' => true],
],
'event-card-webp' => [
'400w' => ['width' => 400, 'format' => 'webp'],
'600w' => ['width' => 600, 'format' => 'webp'],
'800w' => ['width' => 800, 'format' => 'webp'],
'1200w' => ['width' => 1200, 'format' => 'webp'],
'1600w' => ['width' => 1600, 'format' => 'webp'],
'400w' => ['width' => 400, 'height' => 267, 'crop' => true, 'format' => 'webp'],
'600w' => ['width' => 600, 'height' => 400, 'crop' => true, 'format' => 'webp'],
'800w' => ['width' => 800, 'height' => 533, 'crop' => true, 'format' => 'webp'],
'1200w' => ['width' => 1200, 'height' => 800, 'crop' => true, 'format' => 'webp'],
'1600w' => ['width' => 1600, 'height' => 1067, 'crop' => true, 'format' => 'webp'],
],
];