]> danix's work - danix.xyz-2.git/commitdiff
fix: logo link now respects current language
authorDanilo M. <redacted>
Thu, 16 Apr 2026 14:29:11 +0000 (16:29 +0200)
committerDanilo M. <redacted>
Thu, 16 Apr 2026 14:29:11 +0000 (16:29 +0200)
The header logo link was hardcoded to '/' which always returned to the
English homepage when clicked from Italian pages. Now uses language-aware
routing: IT pages link to /it/, EN pages link to /

Co-Authored-By: Claude Haiku 4.5 <redacted>
themes/danix-xyz-hacker/layouts/partials/header.html

index 8722e814be424ec76e141dfb2bdf3fc6c31c6568..086dafd28eb0f76bbb021552b8cfd02177906bfc 100644 (file)
@@ -1,7 +1,11 @@
 <header class="sticky top-0 z-50 frosted-bar border-b">
   <nav class="container mx-auto px-4 py-4 flex items-center justify-between">
     <!-- Logo and Site Name -->
-    <a href="{{ .Site.BaseURL }}" class="flex items-center gap-2 hover:opacity-80 transition-opacity">
+    {{ $homeLink := "/" }}
+    {{ if eq .Lang "it" }}
+      {{ $homeLink = "/it/" }}
+    {{ end }}
+    <a href="{{ $homeLink }}" class="flex items-center gap-2 hover:opacity-80 transition-opacity">
       <img src="/images/lampD.png" alt="Logo" style="width: 40px; height: 40px; max-width: none;" class="flex-shrink-0">
       <span class="hidden md:inline font-bold text-lg text-accent font-oxanium">danix.xyz</span>
     </a>