Skip to content

Commit

Permalink
Legal Notice (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandstetterm authored Jan 8, 2024
1 parent 948b0ba commit 0b22b2e
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 14 deletions.
9 changes: 6 additions & 3 deletions src/components/Footer/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,16 @@ const content = await getTranslatedContent("Footer", lang!);
<div class="footer__bottom-content">
<ul class="footer__legal-links">
<li>
<a href=`/${lang}/Legal/Privacy`>{content.privacy}</a>
<a href=`/${lang}/data-protection`>{content.privacy}</a>
</li>
<li>
<a href=`/${lang}/Legal/Cookies`>{content.cookies}</a>
<a href=`/${lang}/cookie-policy`>{content.cookies}</a>
</li>
<li>
<a href=`/${lang}/Legal/Terms`>{content.terms}</a>
<a href=`/${lang}/terms`>{content.terms}</a>
</li>
<li>
<a href=`/${lang}/legal-notice`>{content.legal_notice}</a>
</li>
</ul>
<span>{content.copyright}</span>
Expand Down
10 changes: 7 additions & 3 deletions src/layouts/LegalLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,21 @@ const {lang} = Astro.params;
const navItems = [
{
href: `/${lang}/Legal/Privacy`,
href: `/${lang}/data-protection`,
name: "Privacy Policy",
},
{
href: `/${lang}/Legal/Cookies`,
href: `/${lang}/cookie-policy`,
name: "Cookie Policy",
},
{
href: `/${lang}/Legal/Terms`,
href: `/${lang}/terms`,
name: "Terms & Conditions",
},
{
href: `/${lang}/legal-notice`,
name: "Legal Notice",
},
];
---

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import type {GetStaticPaths} from "astro";
import LegalLayout from "../../../layouts/LegalLayout.astro";
import getTranslatedContent from "../../../utils/directus.ts";
import LegalLayout from "@layouts/LegalLayout.astro";
import getTranslatedContent from "@utils/directus.ts";
import "./Legal.scss";
const {lang} = Astro.params;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import type {GetStaticPaths} from "astro";
import LegalLayout from "../../../layouts/LegalLayout.astro";
import getTranslatedContent from "../../../utils/directus.ts";
import LegalLayout from "@layouts/LegalLayout.astro";
import getTranslatedContent from "@utils/directus.ts";
import "./Legal.scss";
const {lang} = Astro.params;
Expand Down
20 changes: 20 additions & 0 deletions src/pages/[lang]/legal-notice.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
import type {GetStaticPaths} from "astro";
import LegalLayout from "@layouts/LegalLayout.astro";
import getTranslatedContent from "@utils/directus.ts";
import "./Legal.scss";
const {lang} = Astro.params;
const content = await getTranslatedContent("Legal_Notice", lang!);
export const getStaticPaths = (() => {
return [
{params: {lang: "en"}},
{params: {lang: "de"}},
];
}) satisfies GetStaticPaths;
---

<LegalLayout>
<section set:html={content.legal_notice} />
</LegalLayout>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import type { GetStaticPaths } from "astro";
import LegalLayout from "../../../layouts/LegalLayout.astro";
import getTranslatedContent from "../../../utils/directus.ts";
import LegalLayout from "@layouts/LegalLayout.astro";
import getTranslatedContent from "@utils/directus.ts";
import "./Legal.scss";
const {lang} = Astro.params;
Expand Down
11 changes: 9 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
{
"extends": "astro/tsconfigs/strict",
"compilerOptions": {
"baseUrl": ".",
"jsx": "react-jsx",
"jsxImportSource": "react"
"jsxImportSource": "react",
"paths": {
"@assets/*": ["src/assets/*"],
"@components/*": ["src/components/*"],
"@utils/*": ["src/utils/*"],
"@layouts/*": ["src/layouts/*"],
}
}
}
}

0 comments on commit 0b22b2e

Please sign in to comment.