From 49300273be7569776311ef02950d4b32054f7b4a Mon Sep 17 00:00:00 2001 From: Emil Gulamov <125820963+mearashadowfax@users.noreply.github.com> Date: Fri, 21 Jun 2024 19:07:56 +0400 Subject: [PATCH] Add MegaMenuLink component and improve main header This commit introduces the MegaMenuLink component and updates NavbarMegaMenu.astro with the new MegaMenuLink. --- src/components/sections/NavbarMegaMenu.astro | 223 ++++++++++++++++ src/components/ui/links/MegaMenuLink.astro | 262 +++++++++++++++++++ 2 files changed, 485 insertions(+) create mode 100644 src/components/sections/NavbarMegaMenu.astro create mode 100644 src/components/ui/links/MegaMenuLink.astro diff --git a/src/components/sections/NavbarMegaMenu.astro b/src/components/sections/NavbarMegaMenu.astro new file mode 100644 index 0000000..23fb8f6 --- /dev/null +++ b/src/components/sections/NavbarMegaMenu.astro @@ -0,0 +1,223 @@ +--- +//Import relevant dependencies +import ThemeIcon from "@components/ThemeIcon.astro"; +import NavLink from "@components/ui/links/NavLink.astro"; +import MegaMenuLink from "@components/ui/links/MegaMenuLink.astro"; +import Authentication from "./Authentication.astro"; +import enStrings from "@utils/navigation.ts"; +import frStrings from "@utils/fr/navigation.ts"; +import BrandLogo from "@components/BrandLogo.astro"; +import LanguagePicker from "@components/ui/LanguagePicker.astro"; + +// Select the correct translation based on the page's lang prop: +const strings = Astro.currentLocale === "fr" ? frStrings : enStrings; +const homeUrl = Astro.currentLocale === "fr" ? "/fr" : "/"; +--- + + +
+ + +
+ + + + + + + diff --git a/src/components/ui/links/MegaMenuLink.astro b/src/components/ui/links/MegaMenuLink.astro new file mode 100644 index 0000000..c25ae12 --- /dev/null +++ b/src/components/ui/links/MegaMenuLink.astro @@ -0,0 +1,262 @@ +--- +import { Image } from "astro:assets"; +import Icon from "../icons/Icon.astro"; +import personWorking from "@images/person-working.avif"; +--- + +
+ + + +