Skip to content

Commit

Permalink
Change hrefs to include current language
Browse files Browse the repository at this point in the history
  • Loading branch information
brandstetterm committed Dec 6, 2023
1 parent 1a5da4c commit 7bb4e03
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
14 changes: 7 additions & 7 deletions src/components/Footer/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,16 @@ const content = await getTranslatedContent("Footer", lang!);
<nav class="footer__right">
<ul class="footer__internal-links">
<li>
<a href="/#Home">{content.home}</a>
<a href=`/${lang}#Home`>{content.home}</a>
</li>
<li>
<a href="/#Features">{content.features}</a>
<a href=`/${lang}#Features`>{content.features}</a>
</li>
<li>
<a href="/#About">{content.about}</a>
<a href=`/${lang}#About`>{content.about}</a>
</li>
<li>
<a href="/#GetStarted">{content.getStarted}</a>
<a href=`/new`>{content.getStarted}</a>
</li>
</ul>
</nav>
Expand All @@ -116,13 +116,13 @@ const content = await getTranslatedContent("Footer", lang!);
<div class="footer__bottom-content">
<ul class="footer__legal-links">
<li>
<a href="/Legal/Privacy">{content.privacy}</a>
<a href=`${lang}/Legal/Privacy`>{content.privacy}</a>
</li>
<li>
<a href="/Legal/Cookies">{content.cookies}</a>
<a href=`${lang}/Legal/Cookies`>{content.cookies}</a>
</li>
<li>
<a href="/Legal/Terms">{content.terms}</a>
<a href=`${lang}/Legal/Terms`>{content.terms}</a>
</li>
</ul>
<span>{content.copyright}</span>
Expand Down
8 changes: 4 additions & 4 deletions src/components/Navbar/Navbar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ const content = await getTranslatedContent("Header", lang!);
<nav id="navbar" class="navbar">
<ul>
<li>
<a aria-label="Startseite" href="/">
<a aria-label={content.home} href=`/${lang}`>
<Logo />
</a>
</li>
<li>
<a href="/#Home">{content.home}</a>
<a href=`/${lang}#Home`>{content.home}</a>
</li>
<li>
<a href="/#Features">{content.features}</a>
<a href=`/${lang}#Features`>{content.features}</a>
</li>
<li>
<a href="/#About">{content.aboutUs}</a>
<a href=`/${lang}#About`>{content.aboutUs}</a>
</li>
<li>
<Link
Expand Down
8 changes: 5 additions & 3 deletions src/layouts/LegalLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@
import { ViewTransitions } from "astro:transitions";
import Layout from "./Layout.astro";
const {lang} = Astro.params;
const navItems = [
{
href: "/Legal/Privacy",
href: `/${lang}/Legal/Privacy`,
name: "Privacy Policy",
},
{
href: "/Legal/Cookies",
href: `/${lang}/Legal/Cookies`,
name: "Cookie Policy",
},
{
href: "/Legal/Terms",
href: `/${lang}/Legal/Terms`,
name: "Terms & Conditions",
},
];
Expand Down

0 comments on commit 7bb4e03

Please sign in to comment.