From cd1ca94b116504b16c1fabc815c805c0a2983740 Mon Sep 17 00:00:00 2001 From: Jalil Arfaoui Date: Wed, 18 Feb 2026 10:28:57 +0100 Subject: [PATCH] Ajout section Explorer sous le diaporama /photo et factorisation HeroViewport MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit La page /photo affiche maintenant une flèche de scroll invitant à découvrir une section de navigation avec les catégories et le fil photo en dessous du diaporama, avec un dégradé progressif entre les deux. Le pattern "hero viewport + scroll indicator" est factorisé dans un composant HeroViewport réutilisable, utilisé par /photo (mode transparent), les albums de catégories et les posts du fil photo. --- src/components/photo/AlbumHeader.astro | 44 ++++--- src/components/photo/CategoryGrid.astro | 14 +- src/components/photo/ExploreSection.astro | 150 ++++++++++++++++++++++ src/components/photo/HeroViewport.astro | 33 +++++ src/pages/photo.astro | 8 +- 5 files changed, 218 insertions(+), 31 deletions(-) create mode 100644 src/components/photo/ExploreSection.astro create mode 100644 src/components/photo/HeroViewport.astro diff --git a/src/components/photo/AlbumHeader.astro b/src/components/photo/AlbumHeader.astro index 6b6e051..9b86945 100644 --- a/src/components/photo/AlbumHeader.astro +++ b/src/components/photo/AlbumHeader.astro @@ -1,6 +1,6 @@ --- import { Picture } from 'astro:assets'; -import ScrollIndicator from './ScrollIndicator.astro'; +import HeroViewport from './HeroViewport.astro'; interface Props { title: string; @@ -15,25 +15,26 @@ const { title, description, date, tags, coverImage, scrollTarget = '.info-sectio --- {coverImage && ( -
- -
-
-

{title}

- {description &&

{description}

} - {date && ( - - )} + +
+ +
+
+

{title}

+ {description &&

{description}

} + {date && ( + + )} +
-
-
+ )} {tags && tags.length > 0 && ( @@ -47,10 +48,13 @@ const { title, description, date, tags, coverImage, scrollTarget = '.info-sectio )} diff --git a/src/components/photo/HeroViewport.astro b/src/components/photo/HeroViewport.astro new file mode 100644 index 0000000..837d025 --- /dev/null +++ b/src/components/photo/HeroViewport.astro @@ -0,0 +1,33 @@ +--- +import ScrollIndicator from './ScrollIndicator.astro'; + +interface Props { + targetSelector?: string; + transparent?: boolean; +} + +const { targetSelector = '#content', transparent = false } = Astro.props; +--- + +
+ + +
+ + diff --git a/src/pages/photo.astro b/src/pages/photo.astro index 049e393..5eee272 100644 --- a/src/pages/photo.astro +++ b/src/pages/photo.astro @@ -1,10 +1,14 @@ --- import PhotoLayout from '../layouts/PhotoLayout.astro'; import PhotoGallery from '../components/photo/PhotoGallery.astro'; +import HeroViewport from '../components/photo/HeroViewport.astro'; +import ExploreSection from '../components/photo/ExploreSection.astro'; const title = "Galerie Photo - Jalil Arfaoui"; --- - + - \ No newline at end of file + + +