From 277e56bd0474407c479e891adbd4184de3a443f5 Mon Sep 17 00:00:00 2001 From: Osama Jandali Date: Mon, 11 Mar 2024 14:50:13 +0200 Subject: [PATCH] Refactor header component and add LanguagePicker component --- src/components/Header.astro | 94 ++++++++++--------- src/components/LanguagePicker.astro | 17 ++-- src/layouts/Layout.astro | 4 - ...tion-has-quadrupled-in-the-last-decade.mdx | 2 +- 4 files changed, 60 insertions(+), 57 deletions(-) diff --git a/src/components/Header.astro b/src/components/Header.astro index 3e02fa8..b65a918 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -3,6 +3,7 @@ import { getLangFromUrl } from '../i18n/utils'; const lang = getLangFromUrl(Astro.url); import { Icon } from "astro-icon"; +import LanguagePicker from './LanguagePicker.astro'; const { isHomepage } = Astro.props; const links = [ { @@ -28,49 +29,52 @@ const links = [ ]; --- - - + + + + + + + + diff --git a/src/components/LanguagePicker.astro b/src/components/LanguagePicker.astro index fc62bb6..58d5200 100644 --- a/src/components/LanguagePicker.astro +++ b/src/components/LanguagePicker.astro @@ -1,10 +1,13 @@ --- -import { languages } from '../i18n/ui'; +import { languages } from "../i18n/ui"; --- -