From 67c7af6be78ea7785f7eb607987bc328e8b23f7d Mon Sep 17 00:00:00 2001 From: becarta Date: Sat, 7 Jun 2025 04:11:34 +0200 Subject: [PATCH] Enhance Header and Layout components with new features and scripts - Filtered out the Contact link from the main navigation in Header.astro and added a Contact icon that links to the contact page. - Integrated Rocket.Chat Livechat script into Layout.astro for improved user support interaction. --- src/components/widgets/Header.astro | 14 ++++++++++++-- src/layouts/Layout.astro | 10 ++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/components/widgets/Header.astro b/src/components/widgets/Header.astro index fb42711..937e105 100644 --- a/src/components/widgets/Header.astro +++ b/src/components/widgets/Header.astro @@ -68,9 +68,13 @@ if (!currentLang) { // Get translated header data - ensure we're using the current language const headerData = getHeaderData(currentLang); +// Filter out the Contact link for the main nav +const navLinks = headerData.links.filter(link => link.text?.toLowerCase() !== 'contact'); +const contactLink = headerData.links.find(link => link.text?.toLowerCase() === 'contact'); + const { id = 'header', - links = headerData.links, + links = navLinks, isSticky = false, isDark = false, isFullWidth = false, @@ -185,7 +189,13 @@ const {
{showToggleTheme && } - + {/* Contact Icon */} + {contactLink && ( + + + + )} + {/* Language Selector as Select Element */}
diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 7c167f0..2c7baec 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -73,5 +73,15 @@ const { language, textDirection } = I18N; + + +