feat(langs): Add internacionalization functionality

This commit is contained in:
Alexander Navarro 2024-03-16 18:37:12 -03:00
parent eef9ec9457
commit 45fcc13497
27 changed files with 1330 additions and 390 deletions

View file

@ -1,13 +1,15 @@
---
import { localizePath } from 'astro-i18next';
import OffCanvas from '@components/OffCanvas/OffCanvas.astro';
import OffCanvasBtn from '@components/OffCanvas/OffCanvasBtn.astro';
import LangSelector from '@components/LangSelector.astro';
const links = [
{ href: '/', text: 'Home' },
{ href: '/blog', text: 'Blog' },
{ href: '/portafolio', text: 'Portafolio' },
{ href: '/curriculum', text: 'Curriculum' },
{ href: '/contact', text: 'Contact' },
{ href: localizePath('/'), text: 'Home' },
{ href: localizePath('/blog'), text: 'Blog' },
{ href: localizePath('/portafolio'), text: 'Portafolio' },
{ href: localizePath('/curriculum'), text: 'Curriculum' },
{ href: localizePath('/contact'), text: 'Contact' },
];
---
@ -23,6 +25,9 @@ const links = [
</li>
))
}
<li class="nav-item">
<LangSelector />
</li>
</ul>
</nav>
@ -70,6 +75,10 @@ const links = [
.navbar-desktop ul {
width: fit-content;
margin-left: auto;
.nav-item {
margin-bottom: 0;
}
}
ul {
@ -82,7 +91,7 @@ const links = [
a {
--boder-color: transparent;
border: 1px solid var(--boder-color);
border: 1px solid transparent;
border-radius: 4px;
text-decoration: none;