foundry-component-library 0.2.36 → 0.2.38

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.
@@ -8,10 +8,16 @@ import Close from "../../assets/svg/close.svg";
8
8
  import { NextLink } from "../../types";
9
9
 
10
10
  function Menu({
11
+ translationsSlug,
12
+ translationsCode,
13
+ isCasePage,
11
14
  isOpen,
12
15
  setMenuOpen,
13
16
  Link,
14
17
  }: {
18
+ translationsSlug: string;
19
+ translationsCode: string;
20
+ isCasePage: boolean;
15
21
  isOpen: string;
16
22
  setMenuOpen: Dispatch<SetStateAction<boolean>>;
17
23
  Link: NextLink;
@@ -34,7 +40,9 @@ function Menu({
34
40
  <div className={styles.menuWrapper}>
35
41
  <ul className={styles.menuList}>
36
42
  <li className={styles.menuListItem}>
37
- <Link href={`${langPrefix}`}>{translate("Home", currentLang)}</Link>
43
+ <Link href={`${langPrefix}/`}>
44
+ {translate("Home", currentLang)}
45
+ </Link>
38
46
  </li>
39
47
  <li className={styles.menuListItem}>
40
48
  <Link href={`${langPrefix}/hubs`}>
@@ -88,17 +96,44 @@ function Menu({
88
96
  </li>
89
97
  </ul>
90
98
  <div className={styles.languageSwitcher} aria-label="Language switcher">
91
- <a
92
- href={path.replace(`${langPrefix}`, "")}
93
- className={`${styles.langBtn} ${currentLang === "EN" ? styles.active : ""}`}>
94
- EN
95
- </a>
96
- <div className={styles.divider} />
97
- <a
98
- href={currentLang === "DE" ? "" : ` /de${path}`}
99
- className={`${styles.langBtn} ${currentLang === "DE" ? styles.active : ""}`}>
100
- DE
101
- </a>
99
+ {!isCasePage && (
100
+ <>
101
+ <a
102
+ href={path.replace(`${langPrefix}`, "") || "/"}
103
+ className={`${styles.langBtn} ${currentLang === "EN" ? styles.active : ""}`}>
104
+ EN
105
+ </a>
106
+ <div className={styles.divider} />
107
+ <a
108
+ href={currentLang === "DE" ? "" : ` /de${path}`}
109
+ className={`${styles.langBtn} ${currentLang === "DE" ? styles.active : ""}`}>
110
+ DE
111
+ </a>
112
+ </>
113
+ )}
114
+ {isCasePage && translationsCode && (
115
+ <>
116
+ <a
117
+ href={
118
+ translationsCode === "en"
119
+ ? `/cases/${translationsSlug}`
120
+ : path
121
+ }
122
+ className={`${styles.langBtn} ${currentLang === "EN" ? styles.active : ""}`}>
123
+ EN
124
+ </a>
125
+ <div className={styles.divider} />
126
+ <a
127
+ href={
128
+ translationsCode === "de"
129
+ ? `/de/cases/${translationsSlug}`
130
+ : path
131
+ }
132
+ className={`${styles.langBtn} ${currentLang === "DE" ? styles.active : ""}`}>
133
+ DE
134
+ </a>
135
+ </>
136
+ )}
102
137
  </div>
103
138
  </div>
104
139
  </div>
@@ -7,7 +7,20 @@ import { NextLink } from "../../types";
7
7
  import lottie from "lottie-web";
8
8
  import logo from "../../assets/logo.json";
9
9
 
10
- function Header({ Link }: { Link: NextLink }) {
10
+ function Header({
11
+ translations,
12
+ isCasePage,
13
+ Link,
14
+ }: {
15
+ translations?: {
16
+ language: {
17
+ code: string;
18
+ };
19
+ slug: string;
20
+ }[];
21
+ isCasePage?: boolean;
22
+ Link: NextLink;
23
+ }) {
11
24
  const [isMenuOpen, setMenuOpen] = useState(false);
12
25
  const isOpen = isMenuOpen ? styles.isMenuOpen : "";
13
26
 
@@ -67,7 +80,18 @@ function Header({ Link }: { Link: NextLink }) {
67
80
  </div>
68
81
  </Container>
69
82
  </header>
70
- <Menu isOpen={isOpen} setMenuOpen={setMenuOpen} Link={Link} />
83
+ <Menu
84
+ isOpen={isOpen}
85
+ setMenuOpen={setMenuOpen}
86
+ Link={Link}
87
+ translationsCode={
88
+ translations?.length
89
+ ? translations[0].language?.code?.toLowerCase()
90
+ : ""
91
+ }
92
+ translationsSlug={translations?.length ? translations[0].slug : ""}
93
+ isCasePage={isCasePage || false}
94
+ />
71
95
  </>
72
96
  );
73
97
  }
@@ -7,6 +7,10 @@ import Arrow from "../../assets/svg/arrow.svg";
7
7
  import useDrag from "../../hooks/useDrag";
8
8
  import Plus from "./plus.svg";
9
9
  import Minus from "./minus.svg";
10
+ import TileGlass from "../ServiceHubsTeaserEffects/TileGlass";
11
+ import TileFluid from "../ServiceHubsTeaserEffects/TileFluid";
12
+ import TileBalls from "../ServiceHubsTeaserEffects/TileBalls";
13
+ import TileRays from "../ServiceHubsTeaserEffects/TileRays";
10
14
 
11
15
  const Hub = ({
12
16
  hub,
@@ -38,9 +42,25 @@ const Hub = ({
38
42
  }
39
43
  }, [isActive, customFields]);
40
44
 
45
+ console.log("asd", hub);
46
+
41
47
  return (
42
48
  <div className={`${styles.hub} ${isActive ? styles.active : ""}`}>
43
49
  <div className={styles.top}>
50
+ <div className={styles.tile}>
51
+ <a href={hub.uri}>
52
+ {hub.slug === "content-campaigning" && <TileBalls />}
53
+ </a>
54
+ <a href={hub.uri}>
55
+ {hub.slug === "social-media-performance" && <TileRays />}
56
+ </a>
57
+ <a href={hub.uri}>
58
+ {hub.slug === "branding-corporate-id" && <TileFluid />}
59
+ </a>
60
+ <a href={hub.uri}>
61
+ {hub.slug === "strategy-positioning" && <TileGlass />}
62
+ </a>
63
+ </div>
44
64
  <div className={styles.title}>{hub.title}</div>
45
65
  <div className={styles.text}>{customFields.approach}</div>
46
66
  <button className={styles.icon} onClick={() => setIsActive(!isActive)}>
@@ -43,6 +43,7 @@
43
43
  padding: 64px 0;
44
44
  display: flex;
45
45
  justify-content: space-between;
46
+ gap: 30px;
46
47
 
47
48
  @media #{$QUERY-sm} {
48
49
  flex-wrap: wrap;
@@ -68,7 +69,7 @@
68
69
  }
69
70
 
70
71
  .text {
71
- font-size: 34px;
72
+ font-size: 21px;
72
73
  width: 600px;
73
74
  font-family: $font-secondary;
74
75
 
@@ -271,3 +272,8 @@
271
272
  flex-shrink: 0;
272
273
  }
273
274
  }
275
+
276
+ .tile {
277
+ width: 250px;
278
+ height: 250px;
279
+ }
@@ -10,9 +10,11 @@ import useDrag from "../../hooks/useDrag";
10
10
  const TheamPhotos = ({
11
11
  people,
12
12
  Image,
13
+ lang,
13
14
  }: {
14
15
  people: Person[];
15
16
  Image: NextImage;
17
+ lang?: "EN" | "DE";
16
18
  }) => {
17
19
  const sectionRef = useRef(null);
18
20
  const { handleMouseDown, handleMouseMove, handleMouseUp, dragStyle } =
@@ -20,7 +22,7 @@ const TheamPhotos = ({
20
22
 
21
23
  return (
22
24
  <Container noMobilePadding>
23
- <div className={styles.heading}>{translate("Our Lovely Team", "DE")}</div>
25
+ <div className={styles.heading}>{translate("Our Lovely Team", lang)}</div>
24
26
  <div
25
27
  ref={sectionRef}
26
28
  className={styles.people}
@@ -55,6 +55,7 @@ function VideoTeaser({ url }: { url: string }) {
55
55
  />
56
56
  )}
57
57
  </div>
58
+ <div className={styles.overlayMobile} />
58
59
  </div>
59
60
  </>
60
61
  );
@@ -56,6 +56,7 @@
56
56
  top: 0;
57
57
  left: 0;
58
58
  background-color: $color-gray-light;
59
+ z-index: 2;
59
60
 
60
61
  &:after {
61
62
  content: "";
@@ -132,3 +133,17 @@
132
133
  transform: translate(34.5%, 39.5%);
133
134
  }
134
135
  }
136
+
137
+ .overlayMobile {
138
+ position: absolute;
139
+ top: 0;
140
+ left: 0;
141
+ width: 100%;
142
+ height: 100%;
143
+ z-index: 2;
144
+ display: none;
145
+
146
+ @media #{$QUERY-sm} {
147
+ display: block;
148
+ }
149
+ }
@@ -29,6 +29,7 @@ function FullWidthImage({
29
29
  layout="intrinsic"
30
30
  width={1252}
31
31
  height={600}
32
+ unoptimized
32
33
  />
33
34
  )}
34
35
  </div>
@@ -44,6 +45,7 @@ function FullWidthImage({
44
45
  layout="intrinsic"
45
46
  width={1400}
46
47
  height={600}
48
+ unoptimized
47
49
  />
48
50
  )}
49
51
  </div>
@@ -32,6 +32,7 @@ const Center = ({
32
32
  layout="intrinsic"
33
33
  width={600}
34
34
  height={600}
35
+ unoptimized
35
36
  />
36
37
  {section.caption && (
37
38
  <div className={styles.caption}>{section.caption}</div>
@@ -31,6 +31,7 @@ const Left = ({
31
31
  layout="intrinsic"
32
32
  width={600}
33
33
  height={600}
34
+ unoptimized
34
35
  />
35
36
  {section.caption && (
36
37
  <div className={styles.caption}>{section.caption}</div>
@@ -32,6 +32,7 @@ const Right = ({
32
32
  layout="intrinsic"
33
33
  width={600}
34
34
  height={600}
35
+ unoptimized
35
36
  />
36
37
  {section.caption && (
37
38
  <div className={styles.caption}>{section.caption}</div>
@@ -30,6 +30,7 @@ const Left = ({
30
30
  layout="intrinsic"
31
31
  width={600}
32
32
  height={600}
33
+ unoptimized
33
34
  />
34
35
  {section.caption && (
35
36
  <div className={styles.caption}>{section.caption}</div>
@@ -30,6 +30,7 @@ const Right = ({
30
30
  layout="intrinsic"
31
31
  width={600}
32
32
  height={600}
33
+ unoptimized
33
34
  />
34
35
  {section.caption && (
35
36
  <div className={styles.caption}>{section.caption}</div>
@@ -23,7 +23,12 @@ function Top({
23
23
  <div className={styles.top}>
24
24
  {data.case.mainImage && (
25
25
  <div className={styles.mainImage}>
26
- <Image src={data.case.mainImage.sourceUrl} alt={title} fill />
26
+ <Image
27
+ src={data.case.mainImage.sourceUrl}
28
+ alt={title}
29
+ fill
30
+ unoptimized
31
+ />
27
32
  </div>
28
33
  )}
29
34
  <Container>
@@ -35,6 +35,12 @@ export default async function getCaseBySlug({
35
35
  nodes {
36
36
  id
37
37
  title
38
+ translations {
39
+ language {
40
+ code
41
+ }
42
+ slug
43
+ }
38
44
  case {
39
45
  caption
40
46
  mainImage {
@@ -225,6 +225,12 @@ export type PostPreview = {
225
225
  export type Case = {
226
226
  id: string;
227
227
  title: string;
228
+ translations?: {
229
+ language: {
230
+ code: string;
231
+ };
232
+ slug: string;
233
+ }[];
228
234
  slug?: string;
229
235
  uri: string;
230
236
  link?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foundry-component-library",
3
- "version": "0.2.36",
3
+ "version": "0.2.38",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",