jalil.arfaoui.net/src/components/logo.astro
Jalil Arfaoui 3d23e84b34 Internationalisation complète et ajout des pages code, théâtre, acting (FR, EN, AR)
Ajout des pages code et théâtre/acting en FR, EN et AR.
Création de vraies routes localisées /en/photo et /ar/تصوير au lieu du hack ?lang=. Extraction de composants partagés (PhotoHomeContent, PhotoBlogIndexContent, PhotoBlogPostContent, PhotoAlbumContent) pour éviter la duplication entre langues. Traduction des catégories photo (16 fichiers JSON), de la navigation, du footer et des aria-labels.
Routes AR avec slugs arabes (/ar/تصوير/مدونة, /ar/تصوير/ألبومات).
2026-02-18 16:12:53 +01:00

18 lines
707 B
Text

---
import HomeIcon from "./icons/HomeIcon.astro";
const pathname = Astro.url.pathname;
const currentLang = pathname.startsWith('/en') ? 'en' : pathname.startsWith('/ar') ? 'ar' : 'fr';
const isHome = pathname === '/' || pathname === '/en' || pathname === '/en/' || pathname === '/ar' || pathname === '/ar/';
const homeUrl = currentLang === 'en' ? '/en' : currentLang === 'ar' ? '/ar' : '/';
---
{!isHome && (
<a
href={homeUrl}
class="group relative z-30 flex items-center text-neutral-600 dark:text-neutral-300 hover:text-black dark:hover:text-white transition-colors"
title="Accueil"
>
<HomeIcon size={20} class="group-hover:scale-110 transition-transform duration-200" />
</a>
)}