@@ -5,6 +5,9 @@ import { getLangFromUrl, getRoutes, useTranslations } from "../i18n/utils";
55import Link from " ../components/Link.astro" ;
66import { Icon } from " astro-icon/components" ;
77
8+ const lang = getLangFromUrl (Astro .url );
9+ const t = useTranslations (lang );
10+
811const routes = getRoutes (Astro .url );
912---
1013
@@ -14,17 +17,16 @@ const routes = getRoutes(Astro.url);
1417 <Image src ={ LogoDark } alt =" Logo" width ={ 40 } height ={ 40 } />
1518 <h1 style =" font-weight: 700; font-size: medium;" >Vitresoft</h1 >
1619 </button >
20+
1721
1822 <div class =" hamburger-menu" >
19- {
20- routes .map ((route ) => {
21- return (
22- <Link variant = " blank" href = { route .url } >
23- { route .name }
24- </Link >
25- );
26- })
27- }
23+ { routes .map ((route ) => {
24+ return <Link variant = " blank" href = { route .url } >{ route .name } </Link >
25+ })}
26+ <button class =" languageSection" id =" langSwitch" >
27+ <span style =" font-weight: 700;" >{ t (" language" )} </span >
28+ <Icon name =" uil:globe" width ={ 25 } height ={ 25 } />
29+ </button >
2830 </div >
2931 <button type =" button" class =" hamburger-button" >
3032 <Icon class =" hamburger-icon" name =" tabler:menu-2" />
@@ -50,7 +52,20 @@ const routes = getRoutes(Astro.url);
5052 justify-content: space-between;
5153 }
5254
53- .logoContainer {
55+ .languageSection{
56+ display: flex;
57+ align-items: center;
58+ gap: 5px;
59+ background-color: transparent;
60+ border: none;
61+ cursor: pointer;
62+ border: 2px solid var(--primary);
63+ color: var(--primary);
64+ border-radius: 8px;
65+ padding: 5px 14px;
66+ }
67+
68+ .logoContainer{
5469 display: flex;
5570 flex-direction: row;
5671 align-items: center;
0 commit comments