Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
brandstetterm committed Nov 21, 2023
1 parent 9f94f89 commit 74f1cf8
Show file tree
Hide file tree
Showing 12 changed files with 139 additions and 106 deletions.
8 changes: 4 additions & 4 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import react from "@astrojs/react";

// https://astro.build/config
export default defineConfig({
integrations: [react()],
redirects: {
"/legal": "/legal/privacy",
},
integrations: [react()],
redirects: {
"/legal": "/legal/privacy",
},
});
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
},
"dependencies": {
"@astrojs/react": "^3.0.4",
"@directus/sdk": "^13.0.2",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"astro": "^3.5.3",
Expand All @@ -21,10 +22,10 @@
},
"devDependencies": {
"@typescript-eslint/parser": "^6.10.0",
"prettier-plugin-astro": "^0.12.1",
"eslint": "^8.53.0",
"eslint-plugin-astro": "^0.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"prettier-plugin-astro": "^0.12.1",
"sass": "^1.69.5"
}
}
16 changes: 12 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
29 changes: 29 additions & 0 deletions src/pages/[lang]/index.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
import type { GetStaticPaths } from "astro";
import ReachNewHeights from "../../views/ReachNewHeights/ReachNewHeights.astro";
import Choices from "../../components/Choices";
import { Uniqueness } from "../../components/Uniqueness";
import { Mobile } from "../../components/Mobile";
import Layout from "../../layouts/Layout.astro";
import TargetUser from "../../views/TargetUser/TargetUser.astro";
import Features from "../../views/Features/Features.astro";
import { AboutUs } from "../../views/AboutUs/AboutUs";
export const getStaticPaths = (() => {
return [
{params: {lang: "en"}},
{params: {lang: "de"}},
];
}) satisfies GetStaticPaths;
---

<Layout title="Scrumlr">
<ReachNewHeights />
<Choices client:visible />
<Uniqueness />
<Mobile />
<Features />
<TargetUser />
<AboutUs />
</Layout>
20 changes: 0 additions & 20 deletions src/pages/index.astro

This file was deleted.

26 changes: 26 additions & 0 deletions src/utils/directus.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import {createDirectus, readItems, rest, staticToken} from '@directus/sdk';

const directusUrl = import.meta.env.DIRECTUS_URL;
const directusToken = import.meta.env.DIRECTUS_TOKEN;

const directusClient = createDirectus(directusUrl)
.with(staticToken(directusToken))
.with(rest());

export default async function getTranslatedContent(collection: string, language: string) {
const content = await directusClient.request<{id: string, translations: [Record<string, any>]}>(readItems(collection, {
deep: {
translations: {
_filter: {
languages_code: {
_eq: language
},
},
},
},
fields: ['*', 'translations.*'],
limit: 1
}));

return content.translations[0];
}
66 changes: 66 additions & 0 deletions src/views/ReachNewHeights/ReachNewHeights.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
import { Link } from "../../components/Link/Link";
//import Icon from "../../components/Icon";
import "./ReachNewHeights.scss";
import getTranslatedContent from "../../utils/directus";
const {lang} = Astro.params;
const content = await getTranslatedContent("Hero_Section", lang!);
---


<section class="reach-new-heights" id="Home">
<div class="reach-new-heights__content">
<div>
<div class="reach-new-heights__headline">
<h1>{content.header}</h1>
<p>{content.paragraph}</p>
</div>
<div class="reach-new-heights__buttons">
<Link href="/new">{content.cta}</Link>
<Link href="#Features" tertiary>{content.detailsButton}</Link>
</div>
</div>
<img
src="assets/images/reach-new-heights_light.webp"
alt="Reach new heights"
class="reach-new-heights__image reach-new-heights__image--light"
/>
<img
src="assets/images/reach-new-heights_dark.webp"
alt="Reach new heights"
class="reach-new-heights__image reach-new-heights__image--dark"
/>
<div class="reach-new-heights__information">
<div class="reach-new-heights__information-item">
<img
src="assets/icons/icon_what-is-it-about_light.svg"
alt="What is it about?"
class="information-item__icon information-item__icon--light"
/>
<img
src="assets/icons/icon_what-is-it-about_dark.svg"
alt="What is it about?"
class="information-item__icon information-item__icon--dark"
/>
<h2>{content.detailsHeader1}</h2>
<p>{content.detailsText1}</p>
</div>

<div class="reach-new-heights__information-item">
<img
src="assets/icons/icon_how-can-it-be-used_light.svg"
alt="How can it be used?"
class="information-item__icon information-item__icon--light"
/>
<img
src="assets/icons/icon_how-can-it-be-used_dark.svg"
alt="How can it be used?"
class="information-item__icon information-item__icon--dark"
/>
<h2>{content.detailsHeader2}</h2>
<p>{content.detailsText2}</p>
</div>
</div>
</div>
</section>
77 changes: 0 additions & 77 deletions src/views/ReachNewHeights/ReachNewHeights.tsx

This file was deleted.

0 comments on commit 74f1cf8

Please sign in to comment.