Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Legal Notice #147

Merged
merged 4 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/*"],
}
}
}
}
Loading