diff --git a/site/blueprints/pages/project.yml b/site/blueprints/pages/project.yml
index 64bf455..b359c2a 100644
--- a/site/blueprints/pages/project.yml
+++ b/site/blueprints/pages/project.yml
@@ -99,6 +99,10 @@ columns:
uploads:
template: image
help: Petite image carrée représentant le jeu
+ galleryBackgroundColor:
+ label: Couleur d'arrière-plan de la galerie animée
+ type: color
+ alpha: false
keywords:
label: Mots clés
type: structure
diff --git a/site/templates/portfolio.json.php b/site/templates/portfolio.json.php
index 22bb3c4..04e2213 100644
--- a/site/templates/portfolio.json.php
+++ b/site/templates/portfolio.json.php
@@ -13,7 +13,8 @@ $specificData = [
'srcset' => $f->srcset('gallery'),
'webp' => $f->srcset('gallery-webp'),
])->values(),
- 'mockup' => $project->mockup()->toFile()?->url(),
+ 'mockup' => $project->mockup()->toFile()?->url(),
+ 'gallery_background_color' => $project->galleryBackgroundColor()->value(),
'keywords' => $project->keywords()->toStructure()->map(fn($i) => [
'label' => $i->label()->value(),
'text' => $i->text()->value(),
diff --git a/src/components/ui/GalleryAnimation.svelte b/src/components/ui/GalleryAnimation.svelte
index de6faa1..d3a5aa2 100644
--- a/src/components/ui/GalleryAnimation.svelte
+++ b/src/components/ui/GalleryAnimation.svelte
@@ -4,7 +4,7 @@
* @prop {Array<{src: string, srcset: string, webp: string}>} images
* @prop {number} secondsPerImage — durée par image (défaut: 8s)
*/
- let { images = [], secondsPerImage = 8 } = $props()
+ let { images = [], secondsPerImage = 8, backgroundColor = null } = $props()
const columns = $derived.by(() => {
const count = images.length
@@ -29,7 +29,7 @@
{#each columns as col}
@@ -59,3 +59,67 @@
{/each}
+
+
diff --git a/src/styles/gallery.css b/src/styles/gallery.css
deleted file mode 100644
index cef463b..0000000
--- a/src/styles/gallery.css
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Gallery animation */
-:root {
- --gallery-gap: 8px;
- --gallery-duration: 24s;
-}
-
-.gallery-animation {
- width: 100%;
- height: 100%;
- overflow: hidden;
-}
-
-/* Vertical mode (Portfolio) */
-.gallery-animation--vertical {
- display: flex;
- flex-direction: row;
- gap: var(--gallery-gap);
-}
-
-.gallery-animation--vertical .gallery-animation__column {
- flex: 1;
- display: flex;
- flex-direction: column;
- overflow: hidden;
-}
-
-.gallery-animation--vertical .gallery-animation__track {
- display: flex;
- flex-direction: column;
- animation-timing-function: linear;
- animation-iteration-count: infinite;
-}
-
-.gallery-animation--vertical .gallery-animation__column:nth-child(odd) .gallery-animation__track {
- animation-name: galleryScrollDown;
- animation-duration: var(--gallery-duration);
-}
-
-.gallery-animation--vertical .gallery-animation__column:nth-child(even) .gallery-animation__track {
- animation-name: galleryScrollUp;
- animation-duration: var(--gallery-duration);
-}
-
-.gallery-animation__image {
- width: 100%;
- height: auto;
- display: block;
- object-fit: contain;
-}
-
-@keyframes galleryScrollDown {
- from { transform: translateY(0); }
- to { transform: translateY(-50%); }
-}
-
-@keyframes galleryScrollUp {
- from { transform: translateY(-50%); }
- to { transform: translateY(0); }
-}
-
-@media (prefers-reduced-motion: reduce) {
- .gallery-animation__track {
- animation: none;
- }
-}
diff --git a/src/styles/index.css b/src/styles/index.css
index c02597e..d437c36 100644
--- a/src/styles/index.css
+++ b/src/styles/index.css
@@ -6,4 +6,3 @@
@import './buttons.css';
@import './cursor.css';
@import './utils.css';
-@import './gallery.css';
diff --git a/src/views/Portfolio.svelte b/src/views/Portfolio.svelte
index 7308abb..4cfaeba 100644
--- a/src/views/Portfolio.svelte
+++ b/src/views/Portfolio.svelte
@@ -94,7 +94,7 @@
{#if currentProject}
-
+