From c728854bd06f2610b2e0ec30af6d2f08e9c3f4cb Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Tue, 15 Aug 2023 20:23:31 +0100 Subject: Adds nav links --- src/components/NavLinks.astro | 25 +++++++++++++++++++++++++ src/components/Navbar.astro | 18 +++++++++++------- 2 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 src/components/NavLinks.astro (limited to 'src/components') diff --git a/src/components/NavLinks.astro b/src/components/NavLinks.astro new file mode 100644 index 0000000..a34014e --- /dev/null +++ b/src/components/NavLinks.astro @@ -0,0 +1,25 @@ +--- +import getLocaleFromPath from '$lib/getLocaleFromPath'; +import translate from '$i18n/translate'; +import tNews from '$i18n/translations/pages/news'; +import tFurthsettins from '$i18n/translations/pages/furthsettins'; +import tHame from '$i18n/translations/pages/home'; + +const locale = getLocaleFromPath(Astro.url.pathname); +const t = translate(locale); +--- + + diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro index c4e31b2..40e671b 100644 --- a/src/components/Navbar.astro +++ b/src/components/Navbar.astro @@ -4,17 +4,21 @@ import SwitchLanguageLink from './SwitchLanguageLink.astro'; import tSite from '$i18n/translations/site'; import translate from '$i18n/translate'; import getLocaleFromPath from '$lib/getLocaleFromPath'; +import NavLinks from './NavLinks.astro'; const locale = getLocaleFromPath(Astro.url.pathname); const t = translate(locale); --- -- cgit v1.2.3