From 4b60ff664a2af97f0f5a26e945026c25e11480ac Mon Sep 17 00:00:00 2001 From: Korbs Date: Wed, 31 Jan 2024 06:58:27 -0500 Subject: [PATCH] Highlight support if on support page --- src/components/global/Header.astro | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/components/global/Header.astro b/src/components/global/Header.astro index 6a82f0e..f99c9b7 100644 --- a/src/components/global/Header.astro +++ b/src/components/global/Header.astro @@ -14,12 +14,20 @@ import { useUserAgent } from "astro-useragent" const uaString = Astro.request.headers.get("user-agent") const { source, isMobile } = useUserAgent(uaString) +// Check if user is on Support +if (Astro.url.pathname.startsWith("/support")) { + var IsOnSupport = true +} else { + var IsOnSupport = false +} + // Properties - Selected if (Selected === "Home") {var Select_Home = true} else if (Selected === "Products") {var Select_Products = true} else if (Selected === "Pricing") {var Select_Pricing = true} else if (Selected === "Support") {var Select_Support = true} +import Default from '@astrojs/starlight/components/Search.astro'; ---
@@ -36,14 +44,18 @@ else if (Selected === "Support") {var Select_Support = true} }