Opti: images galerie portfolio en srcset webp
Kirby: preset 'gallery' + 'gallery-webp' (200→800px, qualité 80)
API: images_gallery retourne {src, srcset, webp} au lieu d'une simple URL
GalleryAnimation: <picture> + srcset, sizes 15vw desktop / 33vw mobile
decoding="async" ajouté
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
88379fe073
commit
88a5c78d7a
3 changed files with 44 additions and 12 deletions
|
|
@ -8,7 +8,11 @@ $specificData = [
|
|||
'catchphrase' => $project->catchphrase()->value(),
|
||||
'description' => $project->description()->value(),
|
||||
'thumbnail' => $project->thumbnail()->toFile()?->url(),
|
||||
'images_gallery' => $project->images_gallery()->toFiles()->map(fn($f) => $f->url())->values(),
|
||||
'images_gallery' => $project->images_gallery()->toFiles()->map(fn($f) => [
|
||||
'src' => $f->url(),
|
||||
'srcset' => $f->srcset('gallery'),
|
||||
'webp' => $f->srcset('gallery-webp'),
|
||||
])->values(),
|
||||
'mockup' => $project->mockup()->toFile()?->url(),
|
||||
'keywords' => $project->keywords()->toStructure()->map(fn($i) => [
|
||||
'label' => $i->label()->value(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue