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} + )} + + ))} +
+ +