From 0b7f54144152b1a1d92b837a236f506e2a809e62 Mon Sep 17 00:00:00 2001 From: Manuel Brandstetter Date: Mon, 8 Jan 2024 12:11:23 +0100 Subject: [PATCH 1/4] Add legal notice page --- src/pages/[lang]/Legal/Impressum.astro | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/pages/[lang]/Legal/Impressum.astro diff --git a/src/pages/[lang]/Legal/Impressum.astro b/src/pages/[lang]/Legal/Impressum.astro new file mode 100644 index 0000000..7b032a2 --- /dev/null +++ b/src/pages/[lang]/Legal/Impressum.astro @@ -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("Impressum", lang!); + +export const getStaticPaths = (() => { + return [ + {params: {lang: "en"}}, + {params: {lang: "de"}}, + ]; +}) satisfies GetStaticPaths; +--- + + +
+ From c4ef1368858882b799309166ed15b944bded96aa Mon Sep 17 00:00:00 2001 From: Manuel Brandstetter Date: Mon, 8 Jan 2024 12:38:52 +0100 Subject: [PATCH 2/4] Add legal notice to footer and legal layout --- src/components/Footer/Footer.astro | 3 +++ src/layouts/LegalLayout.astro | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/components/Footer/Footer.astro b/src/components/Footer/Footer.astro index 1e8f591..3b7f894 100644 --- a/src/components/Footer/Footer.astro +++ b/src/components/Footer/Footer.astro @@ -114,6 +114,9 @@ const content = await getTranslatedContent("Footer", lang!);
  • {content.terms}
  • +
  • + {content.legal_notice} +
  • {content.copyright} diff --git a/src/layouts/LegalLayout.astro b/src/layouts/LegalLayout.astro index 4fde60f..a746210 100644 --- a/src/layouts/LegalLayout.astro +++ b/src/layouts/LegalLayout.astro @@ -17,6 +17,10 @@ const navItems = [ href: `/${lang}/Legal/Terms`, name: "Terms & Conditions", }, + { + href: `/${lang}/Legal/Impressum`, + name: "Legal Notice", + }, ]; --- From cda3d0b432fc7d6a21eb8e1247e5c410516bf1da Mon Sep 17 00:00:00 2001 From: Manuel Brandstetter Date: Mon, 8 Jan 2024 13:29:22 +0100 Subject: [PATCH 3/4] Changes --- src/components/Footer/Footer.astro | 8 ++++---- src/layouts/LegalLayout.astro | 8 ++++---- src/pages/[lang]/{Legal => }/Legal.scss | 0 .../{Legal/Cookies.astro => cookie-policy.astro} | 4 ++-- .../{Legal/Privacy.astro => data-protection.astro} | 4 ++-- .../{Legal/Impressum.astro => legal-notice.astro} | 4 ++-- src/pages/[lang]/{Legal/Terms.astro => terms.astro} | 4 ++-- tsconfig.json | 11 +++++++++-- 8 files changed, 25 insertions(+), 18 deletions(-) rename src/pages/[lang]/{Legal => }/Legal.scss (100%) rename src/pages/[lang]/{Legal/Cookies.astro => cookie-policy.astro} (76%) rename src/pages/[lang]/{Legal/Privacy.astro => data-protection.astro} (77%) rename src/pages/[lang]/{Legal/Impressum.astro => legal-notice.astro} (75%) rename src/pages/[lang]/{Legal/Terms.astro => terms.astro} (78%) diff --git a/src/components/Footer/Footer.astro b/src/components/Footer/Footer.astro index 3b7f894..688c5c6 100644 --- a/src/components/Footer/Footer.astro +++ b/src/components/Footer/Footer.astro @@ -106,16 +106,16 @@ const content = await getTranslatedContent("Footer", lang!);