From 133651c35da6d1f5ae76a68c4760c4b675b023a7 Mon Sep 17 00:00:00 2001 From: isUnknown Date: Sat, 21 Mar 2026 14:37:05 +0100 Subject: [PATCH] =?UTF-8?q?portfolio=20:=20animation=20horizontale=20?= =?UTF-8?q?=E2=80=94=20toggle=20panel=20+=20composant?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ajout du mode horizontal dans GalleryAnimation (5 rangées, scrollLeft/scrollRight) avec toggle vertical/horizontal dans le panel projet. refs #21 Co-Authored-By: Claude Opus 4.6 --- site/blueprints/pages/project.yml | 12 +++ site/plugins/world-game-icons/index.js | 4 + site/templates/portfolio.json.php | 1 + src/components/ui/GalleryAnimation.svelte | 116 ++++++++++++++++++---- src/views/Portfolio.svelte | 4 +- 5 files changed, 116 insertions(+), 21 deletions(-) diff --git a/site/blueprints/pages/project.yml b/site/blueprints/pages/project.yml index b5be544..80d2164 100644 --- a/site/blueprints/pages/project.yml +++ b/site/blueprints/pages/project.yml @@ -103,6 +103,18 @@ columns: uploads: template: image help: Petite image carrée représentant le jeu + galleryAnimationMode: + label: Mode d'animation de la galerie + type: toggles + default: vertical + options: + - value: vertical + text: Vertical + icon: arrow-up-down + - value: horizontal + text: Horizontal + icon: arrow-left-right + help: "Direction du défilement des images dans la galerie animée" galleryBackgroundColor: label: Couleur d'arrière-plan de la galerie animée type: color diff --git a/site/plugins/world-game-icons/index.js b/site/plugins/world-game-icons/index.js index 84bc7f7..2f90750 100644 --- a/site/plugins/world-game-icons/index.js +++ b/site/plugins/world-game-icons/index.js @@ -5,5 +5,9 @@ panel.plugin("adrienpayet/world-game-icons", { stack: '', blog: '', + "arrow-up-down": + '', + "arrow-left-right": + '', }, }); diff --git a/site/templates/portfolio.json.php b/site/templates/portfolio.json.php index 5ee09a4..9335ccd 100644 --- a/site/templates/portfolio.json.php +++ b/site/templates/portfolio.json.php @@ -17,6 +17,7 @@ $specificData = [ 'mockup' => $project->mockup()->toFile()?->url(), 'mockupSrcset' => $project->mockup()->toFile()?->srcset('mockup'), 'mockupWebp' => $project->mockup()->toFile()?->srcset('mockup-webp'), + 'galleryAnimationMode' => $project->galleryAnimationMode()->value() ?: 'vertical', 'galleryBackgroundColor' => $project->galleryBackgroundColor()->value(), 'galleryBackgroundImage' => $project->galleryBackgroundImage()->isNotEmpty() ? $project->galleryBackgroundImage()->toFile()->url() : null, 'keywords' => $project->keywords()->toStructure()->map(fn($i) => [ diff --git a/src/components/ui/GalleryAnimation.svelte b/src/components/ui/GalleryAnimation.svelte index 46c9b2b..f36605f 100644 --- a/src/components/ui/GalleryAnimation.svelte +++ b/src/components/ui/GalleryAnimation.svelte @@ -1,19 +1,32 @@