foundry-component-library 0.2.31 → 0.2.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/Capabilities/index.tsx +5 -2
- package/lib/components/GetInTouch/index.tsx +6 -2
- package/lib/components/Hero/index.tsx +0 -2
- package/lib/components/HubsAccordion/Hub.tsx +1 -1
- package/lib/components/LogoSection/Dropdown.tsx +0 -2
- package/lib/components/LogoSection/Logos.tsx +0 -2
- package/lib/components/case/Other/index.tsx +6 -2
- package/lib/queries/getHubBySlug.ts +1 -0
- package/lib/types/index.ts +1 -0
- package/lib/utils.ts +27 -1
- package/package.json +1 -1
|
@@ -5,12 +5,15 @@ import styles from "./styles.module.scss";
|
|
|
5
5
|
import type { Case, NextImage } from "../../types";
|
|
6
6
|
import Item from "./Item";
|
|
7
7
|
import LinkType from "next/link";
|
|
8
|
+
import { translate } from "../../utils";
|
|
8
9
|
|
|
9
10
|
const Capabilities = ({
|
|
11
|
+
heading,
|
|
10
12
|
items,
|
|
11
13
|
Link,
|
|
12
14
|
Image,
|
|
13
15
|
}: {
|
|
16
|
+
heading: string;
|
|
14
17
|
items: {
|
|
15
18
|
heading: string;
|
|
16
19
|
text: string;
|
|
@@ -26,9 +29,9 @@ const Capabilities = ({
|
|
|
26
29
|
return (
|
|
27
30
|
<Container>
|
|
28
31
|
<a className={styles.button} href="#get-in-touch">
|
|
29
|
-
Get in touch
|
|
32
|
+
{translate("Get in touch", "DE")}
|
|
30
33
|
</a>
|
|
31
|
-
<div className={styles.heading}>
|
|
34
|
+
<div className={styles.heading}>{heading}</div>
|
|
32
35
|
<div className={styles.items}>
|
|
33
36
|
{items.map((item) => {
|
|
34
37
|
return (
|
|
@@ -3,6 +3,7 @@ import React from "react";
|
|
|
3
3
|
import { useActionState, useState } from "react";
|
|
4
4
|
import { useRouter } from "next/navigation";
|
|
5
5
|
import styles from "./styles.module.scss";
|
|
6
|
+
import { translate } from "../../utils";
|
|
6
7
|
|
|
7
8
|
type LeadResult =
|
|
8
9
|
| { success: true }
|
|
@@ -43,9 +44,12 @@ const GetInTouch = ({
|
|
|
43
44
|
return (
|
|
44
45
|
<section id="get-in-touch" className={styles.formSection}>
|
|
45
46
|
<div className={styles.container}>
|
|
46
|
-
<h2 className={styles.heading}>Get in touch</h2>
|
|
47
|
+
<h2 className={styles.heading}>{translate("Get in touch", "DE")}</h2>
|
|
47
48
|
<p className={styles.subtitle}>
|
|
48
|
-
|
|
49
|
+
{translate(
|
|
50
|
+
"Tell us about your brand and discover how we can help.",
|
|
51
|
+
"DE",
|
|
52
|
+
)}
|
|
49
53
|
</p>
|
|
50
54
|
<form
|
|
51
55
|
action={formAction}
|
|
@@ -42,7 +42,7 @@ const Hub = ({
|
|
|
42
42
|
<div className={`${styles.hub} ${isActive ? styles.active : ""}`}>
|
|
43
43
|
<div className={styles.top}>
|
|
44
44
|
<div className={styles.title}>{hub.title}</div>
|
|
45
|
-
<div className={styles.text}>{customFields.
|
|
45
|
+
<div className={styles.text}>{customFields.approach}</div>
|
|
46
46
|
<button className={styles.icon} onClick={() => setIsActive(!isActive)}>
|
|
47
47
|
{isActive ? <Minus /> : <Plus />}
|
|
48
48
|
</button>
|
|
@@ -11,10 +11,12 @@ function Other({
|
|
|
11
11
|
cases,
|
|
12
12
|
Link,
|
|
13
13
|
Image,
|
|
14
|
+
lang,
|
|
14
15
|
}: {
|
|
15
16
|
cases: Case[];
|
|
16
17
|
Link: NextLink;
|
|
17
18
|
Image: NextImage;
|
|
19
|
+
lang?: "EN" | "DE";
|
|
18
20
|
}) {
|
|
19
21
|
const sectionRef = useRef(null);
|
|
20
22
|
const { handleMouseDown, handleMouseMove, handleMouseUp, dragStyle } =
|
|
@@ -26,9 +28,11 @@ function Other({
|
|
|
26
28
|
<Container noMobilePadding>
|
|
27
29
|
<div className={styles.other}>
|
|
28
30
|
<div className={styles.top}>
|
|
29
|
-
<div className={styles.caption}>
|
|
31
|
+
<div className={styles.caption}>
|
|
32
|
+
{translate("Case Studies", lang)}
|
|
33
|
+
</div>
|
|
30
34
|
<h3 className={styles.heading}>
|
|
31
|
-
{translate("Success stories.\nWith proven results.")}
|
|
35
|
+
{translate("Success stories.\nWith proven results.", lang)}
|
|
32
36
|
</h3>
|
|
33
37
|
</div>
|
|
34
38
|
<div
|
package/lib/types/index.ts
CHANGED
package/lib/utils.ts
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
-
export const translate = (text: string) => {
|
|
1
|
+
export const translate = (text: string, lang: string = "EN") => {
|
|
2
|
+
if (lang === "EN") return text;
|
|
3
|
+
|
|
4
|
+
if (text === "Get in touch") {
|
|
5
|
+
return "Kontakt aufnehmen";
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
if (text === "Tell us about your brand and discover how we can help.") {
|
|
9
|
+
return "Erzählen Sie uns von Ihrer Marke und entdecken Sie, wie wir Ihnen helfen können.";
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
if (text === "Success stories.\nWith proven results.") {
|
|
13
|
+
return "Erfolgsgeschichten.\nMit messbaren Ergebnissen.";
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
if (text === "") {
|
|
17
|
+
return "";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (text === "") {
|
|
21
|
+
return "";
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (text === "") {
|
|
25
|
+
return "";
|
|
26
|
+
}
|
|
27
|
+
|
|
2
28
|
return text;
|
|
3
29
|
};
|