From b5964cdc78e8ca2d91609b03eb8455edf8c24892 Mon Sep 17 00:00:00 2001 From: Jalil Arfaoui Date: Wed, 18 Feb 2026 14:47:37 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20du=20s=C3=A9lecteur=20de=20langue=20dan?= =?UTF-8?q?s=20le=20footer=20photo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/photo/PhotoFooter.astro | 8 +++ .../photo/PhotoLanguageSwitcher.astro | 55 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 src/components/photo/PhotoLanguageSwitcher.astro diff --git a/src/components/photo/PhotoFooter.astro b/src/components/photo/PhotoFooter.astro index ee42dc9..8981b22 100644 --- a/src/components/photo/PhotoFooter.astro +++ b/src/components/photo/PhotoFooter.astro @@ -1,4 +1,5 @@ --- +import PhotoLanguageSwitcher from './PhotoLanguageSwitcher.astro'; import { t, getAboutPath, type Locale } from '../../utils/i18n'; interface Props { @@ -15,6 +16,7 @@ const { lang = 'fr' } = Astro.props; {t('photo', 'contact', lang)} Instagram + @@ -46,6 +48,12 @@ const { lang = 'fr' } = Astro.props; .photo-footer-links { display: flex; gap: 15px; + flex: 1; +} + +.photo-footer-copy { + flex: 1; + text-align: end; } .photo-footer-links a, diff --git a/src/components/photo/PhotoLanguageSwitcher.astro b/src/components/photo/PhotoLanguageSwitcher.astro new file mode 100644 index 0000000..65de36b --- /dev/null +++ b/src/components/photo/PhotoLanguageSwitcher.astro @@ -0,0 +1,55 @@ +--- +import { getPhotoBasePath, type Locale } from '../../utils/i18n'; + +interface Props { + lang?: Locale; +} + +const { lang = 'fr' } = Astro.props; + +const languages = [ + { code: 'fr' as const, label: 'FR', name: 'Français' }, + { code: 'en' as const, label: 'EN', name: 'English' }, + { code: 'ar' as const, label: 'ع', name: 'العربية' }, +]; +--- + +
+ {languages.map((l, i) => ( + <> + {i > 0 && ·} + {l.code === lang ? ( + {l.label} + ) : ( + {l.label} + )} + + ))} +
+ +