Skip to content

Commit

Permalink
Initial changes
Browse files Browse the repository at this point in the history
  • Loading branch information
brandstetterm committed Mar 28, 2024
1 parent aa2c2e1 commit 28b25f2
Show file tree
Hide file tree
Showing 26 changed files with 159 additions and 128 deletions.
2 changes: 1 addition & 1 deletion src/components/Footer/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Inovex } from "@icons/Inovex";
import getTranslatedContent from "@utils/directus";
import "./Footer.scss";
const {lang} = Astro.params;
const {lang} = Astro.props;
const content = await getTranslatedContent("Footer", lang!);
---

Expand Down
2 changes: 1 addition & 1 deletion src/components/Navbar/Navbar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import getTranslatedContent from "@utils/directus";
import UserMenu from "@components/UserMenu/UserMenu";
import "./Navbar.scss";
const {lang} = Astro.params;
const {lang} = Astro.props;
const content = await getTranslatedContent("Header", lang!);
const userMenuLabels = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/UserMenu/UserMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const UserMenu = ({
</a>
</li>
<li>
<a href="/en">
<a href="/">
<svg
width="32"
height="32"
Expand Down
9 changes: 5 additions & 4 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ import Footer from "../components/Footer/Footer.astro";
export interface Props {
title: string;
lang: string;
}
const { title } = Astro.props;
const { title, lang } = Astro.props;
---

<!doctype html>
<html lang="en">
<html lang={lang}>
<head>
<meta charset="UTF-8" />
<meta name="description" content="Open source online retrospective & collaboration tool - fast onboarding, jump right into a session with your team" />
Expand All @@ -24,11 +25,11 @@ const { title } = Astro.props;
</head>
<body>
<div class="body_wrapper">
<Navbar />
<Navbar lang={lang} />
<main>
<slot />
</main>
<Footer />
<Footer lang={lang} />
</div>
</body>
</html>
Expand Down
20 changes: 0 additions & 20 deletions src/pages/[lang]/cookie-policy.astro

This file was deleted.

21 changes: 0 additions & 21 deletions src/pages/[lang]/data-protection.astro

This file was deleted.

20 changes: 0 additions & 20 deletions src/pages/[lang]/legal-notice.astro

This file was deleted.

26 changes: 0 additions & 26 deletions src/pages/[lang]/terms.astro

This file was deleted.

11 changes: 11 additions & 0 deletions src/pages/cookie-policy.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
import LegalLayout from "@layouts/LegalLayout.astro";
import getTranslatedContent from "@utils/directus.ts";
import "@styles/Legal.scss";
const content = await getTranslatedContent("Cookie_Policy", "en");
---

<LegalLayout>
<section set:html={content.Cookie_Policy} />
</LegalLayout>
12 changes: 12 additions & 0 deletions src/pages/data-protection.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
import LegalLayout from "@layouts/LegalLayout.astro";
import getTranslatedContent from "@utils/directus.ts";
import "@styles/Legal.scss";
const content = await getTranslatedContent("Privacy_Policy", "en");
---

<LegalLayout>
<section class="legal__content" set:html={content.Privacy_Policy} />
</LegalLayout>

11 changes: 11 additions & 0 deletions src/pages/de/cookie-policy.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
import LegalLayout from "@layouts/LegalLayout.astro";
import getTranslatedContent from "@utils/directus.ts";
import "@styles/Legal.scss";
const content = await getTranslatedContent("Cookie_Policy", "de");
---

<LegalLayout>
<section set:html={content.Cookie_Policy} />
</LegalLayout>
12 changes: 12 additions & 0 deletions src/pages/de/data-protection.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
import LegalLayout from "@layouts/LegalLayout.astro";
import getTranslatedContent from "@utils/directus.ts";
import "@styles/Legal.scss";
const content = await getTranslatedContent("Privacy_Policy", "de");
---

<LegalLayout>
<section class="legal__content" set:html={content.Privacy_Policy} />
</LegalLayout>

22 changes: 9 additions & 13 deletions src/pages/[lang]/index.astro → src/pages/de/index.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
import type { GetStaticPaths } from "astro";
import Hero from "@views/Hero/Hero.astro";
import Choices from "@views/Choices/Choices.astro";
import Uniqueness from "@views/Uniqueness/Uniqueness.astro";
Expand All @@ -9,18 +8,15 @@ import TargetUser from "@views/TargetUser/TargetUser.astro";
import Features from "@views/Features/Features.astro";
import Feedback from "@views/Feedback/Feedback.astro";
import AboutUs from "@views/AboutUs/AboutUs.astro";
export const getStaticPaths = (() => {
return [{ params: { lang: "en" } }, { params: { lang: "de" } }];
}) satisfies GetStaticPaths;
---

<Layout title="scrumlr.io - Online collaboration">
<Hero />
<Choices />
<Uniqueness />
<Mobile />
<Features />
<Feedback />
<AboutUs />
<Layout title="scrumlr.io - Online collaboration" lang="de" >
<Hero lang="de" />
<Choices lang="de" />
<Uniqueness lang="de" />
<Mobile lang="de" />
<Features lang="de" />
<TargetUser lang="de" />
<Feedback lang="de" />
<AboutUs lang="de" />
</Layout>
11 changes: 11 additions & 0 deletions src/pages/de/legal-notice.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
import LegalLayout from "@layouts/LegalLayout.astro";
import getTranslatedContent from "@utils/directus.ts";
import "@styles/Legal.scss";
const content = await getTranslatedContent("Legal_Notice", "de");
---

<LegalLayout>
<section set:html={content.legal_notice} />
</LegalLayout>
17 changes: 17 additions & 0 deletions src/pages/de/terms.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
import LegalLayout from "@layouts/LegalLayout.astro";
import getTranslatedContent from "@utils/directus.ts";
import "@styles/Legal.scss";
const content = await getTranslatedContent("Terms_Conditions", "de");
---

<LegalLayout>
<section set:html={content.Terms_Conditions} />
</LegalLayout>

<style>
section {
text-wrap: wrap;
}
</style>
20 changes: 19 additions & 1 deletion src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
---
import Hero from "@views/Hero/Hero.astro";
import Choices from "@views/Choices/Choices.astro";
import Uniqueness from "@views/Uniqueness/Uniqueness.astro";
import Mobile from "@views/Mobile/Mobile.astro";
import Layout from "@layouts/Layout.astro";
import TargetUser from "@views/TargetUser/TargetUser.astro";
import Features from "@views/Features/Features.astro";
import Feedback from "@views/Feedback/Feedback.astro";
import AboutUs from "@views/AboutUs/AboutUs.astro";
---

<meta http-equiv="refresh" content="0;url=/en" />
<Layout title="scrumlr.io - Online collaboration" lang="en" >
<Hero lang="en" />
<Choices lang="en" />
<Uniqueness lang="en" />
<Mobile lang="en" />
<Features lang="en" />
<TargetUser lang="en" />
<Feedback lang="en" />
<AboutUs lang="en" />
</Layout>
11 changes: 11 additions & 0 deletions src/pages/legal-notice.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
import LegalLayout from "@layouts/LegalLayout.astro";
import getTranslatedContent from "@utils/directus.ts";
import "@styles/Legal.scss";
const content = await getTranslatedContent("Legal_Notice", "en");
---

<LegalLayout>
<section set:html={content.legal_notice} />
</LegalLayout>
17 changes: 17 additions & 0 deletions src/pages/terms.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
import LegalLayout from "@layouts/LegalLayout.astro";
import getTranslatedContent from "@utils/directus.ts";
import "@styles/Legal.scss";
const content = await getTranslatedContent("Terms_Conditions", "en");
---

<LegalLayout>
<section set:html={content.Terms_Conditions} />
</LegalLayout>

<style>
section {
text-wrap: wrap;
}
</style>
2 changes: 1 addition & 1 deletion src/views/AboutUs/AboutUs.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Link } from "../../components/Link/Link";
import getTranslatedContent from "../../utils/directus";
import "./AboutUs.scss";
const {lang} = Astro.params;
const {lang} = Astro.props;
const content = await getTranslatedContent("AboutUs_Section", lang!);
---

Expand Down
2 changes: 1 addition & 1 deletion src/views/Choices/Choices.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import VideoPlayer from "../../components/VideoPlayer";
import getTranslatedContent from "../../utils/directus";
import "./Choices.scss";
const { lang } = Astro.params;
const { lang } = Astro.props;
const content = await getTranslatedContent("Choices_Section", lang!);
---

Expand Down
2 changes: 1 addition & 1 deletion src/views/Features/Features.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Features_dark_1 from "./images/Features_dark_1.tsx";
import Features_dark_2 from "./images/Features_dark_2.tsx";
import getTranslatedContent from "../../utils/directus";
const {lang} = Astro.params;
const {lang} = Astro.props;
const content = await getTranslatedContent("Features_Section", lang!);
---

Expand Down
2 changes: 1 addition & 1 deletion src/views/Feedback/Feedback.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import FeedbackCarousel from "./FeedbackCarousel.tsx";
import getTranslatedContent, { getContent } from "../../utils/directus";
const { lang } = Astro.params;
const { lang } = Astro.props;
const content = await getTranslatedContent("Feedback_Section", lang!);
const testimonials = (await getContent("testimonials")) as FeedbackItem[];
Expand Down
2 changes: 1 addition & 1 deletion src/views/Hero/Hero.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import ArrowRight from "@icons/ArrowRight";
import getTranslatedContent from "@utils/directus";
import "./Hero.scss";
const {lang} = Astro.params;
const {lang} = Astro.props;
const content = await getTranslatedContent("Hero_Section", lang!);
---

Expand Down
2 changes: 1 addition & 1 deletion src/views/Mobile/Mobile.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import "./Mobile.scss";
import getTranslatedContent from "@utils/directus";
const { lang } = Astro.params;
const { lang } = Astro.props;
const content = await getTranslatedContent("Mobile_Section", lang!);
---

Expand Down
Loading

0 comments on commit 28b25f2

Please sign in to comment.