portfolio : add secondsPerImage field to control gallery animation speed. closes #33
All checks were successful
Deploy / Deploy to Production (push) Successful in 21s
All checks were successful
Deploy / Deploy to Production (push) Successful in 21s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
88bc02b9cf
commit
f087260398
3 changed files with 88 additions and 72 deletions
|
|
@ -52,24 +52,43 @@ tabs:
|
||||||
- link
|
- link
|
||||||
maxlength: 500
|
maxlength: 500
|
||||||
help: Description complète du projet
|
help: Description complète du projet
|
||||||
|
test:
|
||||||
|
type: fields
|
||||||
|
fields:
|
||||||
|
keywords:
|
||||||
|
label: Mots clés
|
||||||
|
type: structure
|
||||||
|
fields:
|
||||||
|
label:
|
||||||
|
label: Label
|
||||||
|
required: true
|
||||||
|
type: text
|
||||||
|
width: 1/2
|
||||||
|
placeholder: "Ex: Impact, Catégorie..."
|
||||||
|
text:
|
||||||
|
label: Texte
|
||||||
|
required: true
|
||||||
|
type: text
|
||||||
|
width: 1/2
|
||||||
|
externalLinks:
|
||||||
|
label: Liens externes
|
||||||
|
type: structure
|
||||||
|
fields:
|
||||||
|
label:
|
||||||
|
label: Nom du bouton
|
||||||
|
required: true
|
||||||
|
type: text
|
||||||
|
width: 1/2
|
||||||
|
placeholder: "Ex: App Store, Site web..."
|
||||||
|
url:
|
||||||
|
label: URL
|
||||||
|
required: true
|
||||||
|
type: url
|
||||||
|
width: 1/2
|
||||||
|
|
||||||
images:
|
images:
|
||||||
type: fields
|
type: fields
|
||||||
fields:
|
fields:
|
||||||
imagesGallery:
|
|
||||||
width: 2/3
|
|
||||||
label: Galerie d'images
|
|
||||||
type: files
|
|
||||||
layout: cards
|
|
||||||
size: small
|
|
||||||
min: 6
|
|
||||||
accept: image/*
|
|
||||||
translate: false
|
|
||||||
image:
|
|
||||||
back: #ffffff
|
|
||||||
uploads:
|
|
||||||
template: image
|
|
||||||
help: "Une animation sera générée à partir des images de ce champ. Minimum optimal d'images : 6"
|
|
||||||
mockup:
|
mockup:
|
||||||
width: 1/3
|
width: 1/3
|
||||||
label: Image de mise en situation
|
label: Image de mise en situation
|
||||||
|
|
@ -107,6 +126,27 @@ tabs:
|
||||||
uploads:
|
uploads:
|
||||||
template: image
|
template: image
|
||||||
help: Petite image carrée représentant le jeu
|
help: Petite image carrée représentant le jeu
|
||||||
|
animation:
|
||||||
|
icon: video
|
||||||
|
columns:
|
||||||
|
- width: 1/2
|
||||||
|
fields:
|
||||||
|
imagesGallery:
|
||||||
|
label: Galerie d'images
|
||||||
|
type: files
|
||||||
|
layout: cards
|
||||||
|
size: small
|
||||||
|
min: 6
|
||||||
|
accept: image/*
|
||||||
|
translate: false
|
||||||
|
image:
|
||||||
|
back: #ffffff
|
||||||
|
uploads:
|
||||||
|
template: image
|
||||||
|
help: |
|
||||||
|
Minimum 6 images
|
||||||
|
- width: 1/2
|
||||||
|
fields:
|
||||||
galleryAnimationMode:
|
galleryAnimationMode:
|
||||||
label: Mode d'animation de la galerie
|
label: Mode d'animation de la galerie
|
||||||
type: toggles
|
type: toggles
|
||||||
|
|
@ -119,6 +159,16 @@ tabs:
|
||||||
text: Horizontal
|
text: Horizontal
|
||||||
icon: arrow-left-right
|
icon: arrow-left-right
|
||||||
help: "Direction du défilement des images dans la galerie animée"
|
help: "Direction du défilement des images dans la galerie animée"
|
||||||
|
secondsPerImage:
|
||||||
|
label: Durée de l'animation
|
||||||
|
type: range
|
||||||
|
default: 8
|
||||||
|
min: 3
|
||||||
|
max: 12
|
||||||
|
after: secondes
|
||||||
|
help: |
|
||||||
|
Temps qu'une image mets pour traverser le conteneur de l'animation.
|
||||||
|
**Augmenter la valeur ralentira l'animation, et inversement.**
|
||||||
galleryBackgroundColor:
|
galleryBackgroundColor:
|
||||||
label: Couleur d'arrière-plan de la galerie animée
|
label: Couleur d'arrière-plan de la galerie animée
|
||||||
type: color
|
type: color
|
||||||
|
|
@ -126,41 +176,6 @@ tabs:
|
||||||
galleryBackgroundImage:
|
galleryBackgroundImage:
|
||||||
label: Image d'arrière-plan
|
label: Image d'arrière-plan
|
||||||
type: files
|
type: files
|
||||||
|
layout: cards
|
||||||
multiple: false
|
multiple: false
|
||||||
keywords:
|
|
||||||
label: Mots clés
|
|
||||||
type: structure
|
|
||||||
fields:
|
|
||||||
label:
|
|
||||||
label: Label
|
|
||||||
required: true
|
|
||||||
type: text
|
|
||||||
width: 1/2
|
|
||||||
placeholder: "Ex: Impact, Catégorie..."
|
|
||||||
text:
|
|
||||||
label: Texte
|
|
||||||
required: true
|
|
||||||
type: text
|
|
||||||
width: 1/2
|
|
||||||
|
|
||||||
# Liens externes
|
|
||||||
links:
|
|
||||||
type: fields
|
|
||||||
fields:
|
|
||||||
externalLinks:
|
|
||||||
label: Liens externes
|
|
||||||
type: structure
|
|
||||||
fields:
|
|
||||||
label:
|
|
||||||
label: Nom du bouton
|
|
||||||
required: true
|
|
||||||
type: text
|
|
||||||
width: 1/2
|
|
||||||
placeholder: "Ex: App Store, Site web..."
|
|
||||||
url:
|
|
||||||
label: URL
|
|
||||||
required: true
|
|
||||||
type: url
|
|
||||||
width: 1/2
|
|
||||||
|
|
||||||
seo: seo/page
|
seo: seo/page
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ $specificData = [
|
||||||
'mockupSrcset' => $project->mockup()->toFile()?->srcset('mockup'),
|
'mockupSrcset' => $project->mockup()->toFile()?->srcset('mockup'),
|
||||||
'mockupWebp' => $project->mockup()->toFile()?->srcset('mockup-webp'),
|
'mockupWebp' => $project->mockup()->toFile()?->srcset('mockup-webp'),
|
||||||
'galleryAnimationMode' => $project->galleryAnimationMode()->value() ?: 'vertical',
|
'galleryAnimationMode' => $project->galleryAnimationMode()->value() ?: 'vertical',
|
||||||
|
'secondsPerImage' => $project->secondsPerImage()->isNotEmpty() ? (int) $project->secondsPerImage()->value() : 8,
|
||||||
'galleryBackgroundColor' => $project->galleryBackgroundColor()->value(),
|
'galleryBackgroundColor' => $project->galleryBackgroundColor()->value(),
|
||||||
'galleryBackgroundImage' => $project->galleryBackgroundImage()->isNotEmpty() ? $project->galleryBackgroundImage()->toFile()->url() : null,
|
'galleryBackgroundImage' => $project->galleryBackgroundImage()->isNotEmpty() ? $project->galleryBackgroundImage()->toFile()->url() : null,
|
||||||
'keywords' => $project->keywords()->toStructure()->map(fn($i) => [
|
'keywords' => $project->keywords()->toStructure()->map(fn($i) => [
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="portfolio-gallery mobile-only" aria-hidden="true">
|
<div class="portfolio-gallery mobile-only" aria-hidden="true">
|
||||||
<GalleryAnimation images={currentProject.imagesGallery} backgroundColor={currentProject.galleryBackgroundColor} backgroundImage={currentProject.galleryBackgroundImage} mode={currentProject.galleryAnimationMode} />
|
<GalleryAnimation images={currentProject.imagesGallery} backgroundColor={currentProject.galleryBackgroundColor} backgroundImage={currentProject.galleryBackgroundImage} mode={currentProject.galleryAnimationMode} secondsPerImage={currentProject.secondsPerImage} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<section
|
<section
|
||||||
|
|
@ -163,7 +163,7 @@
|
||||||
{#if currentProject}
|
{#if currentProject}
|
||||||
<!-- Galerie animation (gauche desktop / plein écran mobile) -->
|
<!-- Galerie animation (gauche desktop / plein écran mobile) -->
|
||||||
<div class="portfolio-gallery desktop-only" aria-hidden="true">
|
<div class="portfolio-gallery desktop-only" aria-hidden="true">
|
||||||
<GalleryAnimation images={currentProject.imagesGallery} backgroundColor={currentProject.galleryBackgroundColor} backgroundImage={currentProject.galleryBackgroundImage} mode={currentProject.galleryAnimationMode} />
|
<GalleryAnimation images={currentProject.imagesGallery} backgroundColor={currentProject.galleryBackgroundColor} backgroundImage={currentProject.galleryBackgroundImage} mode={currentProject.galleryAnimationMode} secondsPerImage={currentProject.secondsPerImage} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Mockup device (centre) -->
|
<!-- Mockup device (centre) -->
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue