lot of content
This commit is contained in:
parent
9b91b02d90
commit
082b193d23
31 changed files with 338 additions and 70 deletions
|
@ -7,6 +7,19 @@ const availableLocales = astroI18n.langCodes.filter(
|
|||
);
|
||||
// current path
|
||||
const currentRoute = Astro.url.pathname;
|
||||
|
||||
function localeName(locale) {
|
||||
let localeName = "";
|
||||
switch (locale) {
|
||||
case "fr":
|
||||
localeName = "Français";
|
||||
break;
|
||||
case "en":
|
||||
localeName = "English";
|
||||
break;
|
||||
}
|
||||
return localeName;
|
||||
}
|
||||
---
|
||||
|
||||
<ul role="list">
|
||||
|
@ -18,7 +31,7 @@ const currentRoute = Astro.url.pathname;
|
|||
href={l(currentRoute as any, {}, locale as any)}
|
||||
class="clean-link nice-link"
|
||||
>
|
||||
{locale}
|
||||
{localeName(locale)}
|
||||
</a>
|
||||
</li>
|
||||
))
|
||||
|
|
|
@ -11,10 +11,6 @@ import LanguageSwitcher from "./LangSwitcher.astro";
|
|||
>
|
||||
<span aria-hidden="true">·</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href={l("/")} class="clean-link nice-link">{t("projet.titre")}</a>
|
||||
<span aria-hidden="true">·</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href={l("/fragments")} class="clean-link nice-link"
|
||||
>{t("fragments.titre")}</a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue