foundry-component-library 0.2.18 → 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.
@@ -4,6 +4,7 @@ import Container from "../Container";
4
4
  import { NextImage } from "../../types";
5
5
  import WavyText from "../TextAnimations/WavyText";
6
6
  import { motion } from "framer-motion";
7
+ import FadeInText from "../TextAnimations/FadeInText";
7
8
 
8
9
  // Infinite marquee animation settings
9
10
  const marqueeVariants = {
@@ -22,10 +23,12 @@ const marqueeVariants = {
22
23
 
23
24
  const Awards = ({
24
25
  heading,
26
+ text,
25
27
  awards,
26
28
  Image,
27
29
  }: {
28
30
  heading?: string;
31
+ text?: string;
29
32
  awards?: {
30
33
  image?: {
31
34
  sourceUrl: string;
@@ -48,6 +51,7 @@ const Awards = ({
48
51
  transition={{ duration: 1 }}>
49
52
  <Container>
50
53
  {heading && <WavyText className={styles.heading} text={heading} />}
54
+ {text && <FadeInText className={styles.subheading} text={text} />}
51
55
  </Container>
52
56
  <Container noMobilePadding>
53
57
  <div className={styles.marqueeWrapper}>
@@ -11,12 +11,23 @@
11
11
  .heading {
12
12
  font-size: 42px;
13
13
  color: $color-brown;
14
- margin-bottom: 64px;
15
14
  line-height: 1.3;
16
15
  font-family: $font-secondary;
16
+ margin-bottom: 24px;
17
17
 
18
18
  @media #{$QUERY-sm} {
19
19
  font-size: 28px;
20
+ }
21
+ }
22
+
23
+ .subheading {
24
+ font-size: 18px;
25
+ color: $color-brown;
26
+ margin-bottom: 64px;
27
+ width: 800px;
28
+ max-width: 100%;
29
+
30
+ @media #{$QUERY-sm} {
20
31
  margin-bottom: 44px;
21
32
  }
22
33
  }
@@ -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="/hubs">{translate("Service Hubs")}</Link>
39
+ <Link href={`${langPrefix}/hubs`}>{translate("Service Hubs")}</Link>
30
40
  </li>
31
41
  <li className={styles.menuListItem}>
32
- <Link href="/cases">{translate("Work")}</Link>
42
+ <Link href={`${langPrefix}/cases`}>{translate("Work")}</Link>
33
43
  </li>
34
44
  <li className={styles.menuListItem}>
35
- <Link href="/about-us">{translate("About Us")}</Link>
45
+ <Link href={`${langPrefix}/about-us`}>{translate("About Us")}</Link>
36
46
  </li>
37
47
  <li className={styles.menuListItem}>
38
- <Link href="/contact">{translate("Contact Us")}</Link>
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="/team">
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="/news">
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
+ }
@@ -15,6 +15,7 @@ type HomePage = {
15
15
  hubsHeading?: string;
16
16
  hubsText?: string;
17
17
  awardsHeading?: string;
18
+ awardsText?: string;
18
19
  awards?: Array<{
19
20
  image: {
20
21
  sourceUrl: string;
@@ -145,6 +146,7 @@ export default async function getHomePage({
145
146
  hubsHeading
146
147
  hubsText
147
148
  awardsHeading
149
+ awardsText
148
150
  awards {
149
151
  image {
150
152
  sourceUrl
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foundry-component-library",
3
- "version": "0.2.18",
3
+ "version": "0.2.20",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",