Skip to content

Commit

Permalink
Update header.html
Browse files Browse the repository at this point in the history
  • Loading branch information
coppolaemilio committed Feb 28, 2025
1 parent e7fae4e commit f658a60
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

// Check if the click is outside the language selector
if (!languageSelector.contains(event.target)) {
languageSelector.classList.remove('open');
languageSelector.classList.remove('open');
}
});

Expand All @@ -64,9 +64,12 @@
const expirationDate = new Date();
expirationDate.setDate(expirationDate.getDate() + 365);
document.cookie = `preferred_language=${lang}; expires=${expirationDate.toUTCString()}; path=/; SameSite=Lax`;

// Redirect to the language-specific path
window.location.href = path;
}


</script>

<main>

0 comments on commit f658a60

Please sign in to comment.