foundry-component-library 0.2.19 → 0.2.20
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.
|
@@ -42,9 +42,10 @@ const CaseStudyTeaser = ({
|
|
|
42
42
|
setTimeout(() => {
|
|
43
43
|
dragStarted.current = false;
|
|
44
44
|
}, 0);
|
|
45
|
-
}}
|
|
46
|
-
>
|
|
45
|
+
}}>
|
|
47
46
|
{cases.map((el) => {
|
|
47
|
+
if (!el) return;
|
|
48
|
+
|
|
48
49
|
const { thumbnailImage, mainImage } = el.case;
|
|
49
50
|
|
|
50
51
|
return (
|
|
@@ -68,8 +69,7 @@ const CaseStudyTeaser = ({
|
|
|
68
69
|
e.preventDefault();
|
|
69
70
|
e.stopPropagation();
|
|
70
71
|
}
|
|
71
|
-
}}
|
|
72
|
-
>
|
|
72
|
+
}}>
|
|
73
73
|
{translate("See More")}
|
|
74
74
|
</a>
|
|
75
75
|
</div>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { Dispatch, SetStateAction } from "react";
|
|
3
|
+
import { usePathname } from "next/navigation";
|
|
2
4
|
import styles from "./styles.module.scss";
|
|
3
5
|
import { translate } from "../../utils";
|
|
4
6
|
import Arrow from "../../assets/svg/arrow.svg";
|
|
@@ -14,6 +16,14 @@ function Menu({
|
|
|
14
16
|
setMenuOpen: Dispatch<SetStateAction<boolean>>;
|
|
15
17
|
Link: NextLink;
|
|
16
18
|
}) {
|
|
19
|
+
const path = usePathname();
|
|
20
|
+
const currentLang = path.startsWith("/de") ? "DE" : "EN";
|
|
21
|
+
|
|
22
|
+
console.log(path);
|
|
23
|
+
|
|
24
|
+
const langPrefix =
|
|
25
|
+
currentLang === "EN" ? "" : `/${currentLang.toLowerCase()}`;
|
|
26
|
+
|
|
17
27
|
return (
|
|
18
28
|
<div className={`${styles.menu} ${isOpen}`}>
|
|
19
29
|
<div
|
|
@@ -26,16 +36,18 @@ function Menu({
|
|
|
26
36
|
<div className={styles.menuWrapper}>
|
|
27
37
|
<ul className={styles.menuList}>
|
|
28
38
|
<li className={styles.menuListItem}>
|
|
29
|
-
<Link href=
|
|
39
|
+
<Link href={`${langPrefix}/hubs`}>{translate("Service Hubs")}</Link>
|
|
30
40
|
</li>
|
|
31
41
|
<li className={styles.menuListItem}>
|
|
32
|
-
<Link href=
|
|
42
|
+
<Link href={`${langPrefix}/cases`}>{translate("Work")}</Link>
|
|
33
43
|
</li>
|
|
34
44
|
<li className={styles.menuListItem}>
|
|
35
|
-
<Link href=
|
|
45
|
+
<Link href={`${langPrefix}/about-us`}>{translate("About Us")}</Link>
|
|
36
46
|
</li>
|
|
37
47
|
<li className={styles.menuListItem}>
|
|
38
|
-
<Link href=
|
|
48
|
+
<Link href={`${langPrefix}/contact`}>
|
|
49
|
+
{translate("Contact Us")}
|
|
50
|
+
</Link>
|
|
39
51
|
</li>
|
|
40
52
|
</ul>
|
|
41
53
|
<ul className={styles.menuSecondary}>
|
|
@@ -56,18 +68,31 @@ function Menu({
|
|
|
56
68
|
</Container>
|
|
57
69
|
</li> */}
|
|
58
70
|
<li className={styles.secondaryMenuItem}>
|
|
59
|
-
<Link href=
|
|
71
|
+
<Link href={`${langPrefix}/team`}>
|
|
60
72
|
{translate("Team & Careers")}
|
|
61
73
|
<Arrow />
|
|
62
74
|
</Link>
|
|
63
75
|
</li>
|
|
64
76
|
<li className={styles.secondaryMenuItem}>
|
|
65
|
-
<Link href=
|
|
77
|
+
<Link href={`${langPrefix}/news`}>
|
|
66
78
|
{translate("News & Insights")}
|
|
67
79
|
<Arrow />
|
|
68
80
|
</Link>
|
|
69
81
|
</li>
|
|
70
82
|
</ul>
|
|
83
|
+
<div className={styles.languageSwitcher} aria-label="Language switcher">
|
|
84
|
+
<a
|
|
85
|
+
href={path.replace(`${langPrefix}`, "")}
|
|
86
|
+
className={`${styles.langBtn} ${currentLang === "EN" ? styles.active : ""}`}>
|
|
87
|
+
EN
|
|
88
|
+
</a>
|
|
89
|
+
<div className={styles.divider} />
|
|
90
|
+
<a
|
|
91
|
+
href={currentLang === "DE" ? "" : ` /de${path}`}
|
|
92
|
+
className={`${styles.langBtn} ${currentLang === "DE" ? styles.active : ""}`}>
|
|
93
|
+
DE
|
|
94
|
+
</a>
|
|
95
|
+
</div>
|
|
71
96
|
</div>
|
|
72
97
|
</div>
|
|
73
98
|
);
|
|
@@ -172,3 +172,25 @@
|
|
|
172
172
|
color: $color-pink;
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
|
+
|
|
176
|
+
.languageSwitcher {
|
|
177
|
+
display: flex;
|
|
178
|
+
gap: 8px;
|
|
179
|
+
padding: 8px 0 0;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.langBtn {
|
|
183
|
+
text-transform: uppercase;
|
|
184
|
+
opacity: 0.6;
|
|
185
|
+
}
|
|
186
|
+
.divider {
|
|
187
|
+
margin: 3px 1px;
|
|
188
|
+
width: 2px;
|
|
189
|
+
height: calc(100% - 6px);
|
|
190
|
+
background-color: $color-text;
|
|
191
|
+
opacity: 0.6;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.langBtn.active {
|
|
195
|
+
opacity: 1;
|
|
196
|
+
}
|