foundry-component-library 0.2.38 → 0.2.40
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.
|
@@ -71,7 +71,9 @@ const Awards = ({
|
|
|
71
71
|
return (
|
|
72
72
|
<div key={image.sourceUrl + i} className={styles.award}>
|
|
73
73
|
<div className={styles.image}>
|
|
74
|
-
{image &&
|
|
74
|
+
{image && (
|
|
75
|
+
<Image src={image.sourceUrl} alt="" fill unoptimized />
|
|
76
|
+
)}
|
|
75
77
|
</div>
|
|
76
78
|
{heading && <div className={styles.text}>{heading}</div>}
|
|
77
79
|
{text && <div className={styles.client}>{text}</div>}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import Container from "../Container";
|
|
2
3
|
import styles from "./styles.module.scss";
|
|
3
4
|
import { translate } from "../../utils";
|
|
4
5
|
import Logo from "../../assets/svg/footer-logo.svg";
|
|
5
6
|
import { NextLink } from "../../types";
|
|
7
|
+
import { usePathname } from "next/navigation";
|
|
6
8
|
|
|
7
9
|
function Footer({
|
|
8
10
|
details,
|
|
@@ -26,6 +28,12 @@ function Footer({
|
|
|
26
28
|
const { berlinEmail, zurichEmail, newyorkEmail } = details;
|
|
27
29
|
const year = new Date().getFullYear();
|
|
28
30
|
|
|
31
|
+
const path = usePathname();
|
|
32
|
+
const currentLang = path.startsWith("/de") ? "DE" : "EN";
|
|
33
|
+
|
|
34
|
+
const langPrefix =
|
|
35
|
+
currentLang === "EN" ? "" : `/${currentLang.toLowerCase()}`;
|
|
36
|
+
|
|
29
37
|
return (
|
|
30
38
|
<footer className={styles.footer}>
|
|
31
39
|
<Container>
|
|
@@ -69,22 +77,32 @@ function Footer({
|
|
|
69
77
|
<div className={styles.right}>
|
|
70
78
|
<ul className={styles.menu}>
|
|
71
79
|
<li className={styles.menuItem}>
|
|
72
|
-
<Link href=
|
|
80
|
+
<Link href={`${langPrefix}/hubs`}>
|
|
81
|
+
{translate("Service Hubs", lang)}
|
|
82
|
+
</Link>
|
|
73
83
|
</li>
|
|
74
84
|
<li className={styles.menuItem}>
|
|
75
|
-
<Link href=
|
|
85
|
+
<Link href={`${langPrefix}/about-us`}>
|
|
86
|
+
{translate("About Us", lang)}
|
|
87
|
+
</Link>
|
|
76
88
|
</li>
|
|
77
89
|
<li className={styles.menuItem}>
|
|
78
|
-
<Link href=
|
|
90
|
+
<Link href={`${langPrefix}/cases`}>
|
|
91
|
+
{translate("Case Studies", lang)}
|
|
92
|
+
</Link>
|
|
79
93
|
</li>
|
|
80
94
|
{/* <li className={styles.menuItem}>
|
|
81
95
|
<Link href="/team">Team & Careers</Link>
|
|
82
96
|
</li> */}
|
|
83
97
|
<li className={styles.menuItem}>
|
|
84
|
-
<Link href=
|
|
98
|
+
<Link href={`${langPrefix}/news`}>
|
|
99
|
+
{translate("News & Insights", lang)}
|
|
100
|
+
</Link>
|
|
85
101
|
</li>
|
|
86
102
|
<li className={styles.menuItem}>
|
|
87
|
-
<Link href=
|
|
103
|
+
<Link href={`${langPrefix}/contact`}>
|
|
104
|
+
{translate("Contact", lang)}
|
|
105
|
+
</Link>
|
|
88
106
|
</li>
|
|
89
107
|
</ul>
|
|
90
108
|
<div className={styles.social}>
|
|
@@ -114,9 +132,11 @@ function Footer({
|
|
|
114
132
|
<div className={styles.bottom}>
|
|
115
133
|
<div>FOUNDRY © {year}</div>
|
|
116
134
|
<div className={styles.bottomLinks}>
|
|
117
|
-
<Link href=
|
|
118
|
-
|
|
119
|
-
|
|
135
|
+
<Link href={`${langPrefix}/imprint`}>
|
|
136
|
+
{translate("Imprint", lang)}
|
|
137
|
+
</Link>
|
|
138
|
+
<Link href={`${langPrefix}/terms`}>{translate("Terms", lang)}</Link>
|
|
139
|
+
<Link href={`${langPrefix}/privacy-policy`}>
|
|
120
140
|
{translate("Privacy policy", lang)}
|
|
121
141
|
</Link>
|
|
122
142
|
</div>
|
|
@@ -42,23 +42,29 @@ const Hub = ({
|
|
|
42
42
|
}
|
|
43
43
|
}, [isActive, customFields]);
|
|
44
44
|
|
|
45
|
-
console.log(
|
|
45
|
+
console.log(hub);
|
|
46
46
|
|
|
47
47
|
return (
|
|
48
48
|
<div className={`${styles.hub} ${isActive ? styles.active : ""}`}>
|
|
49
49
|
<div className={styles.top}>
|
|
50
50
|
<div className={styles.tile}>
|
|
51
51
|
<a href={hub.uri}>
|
|
52
|
-
{hub.slug === "content-campaigning"
|
|
52
|
+
{(hub.slug === "content-campaigning" ||
|
|
53
|
+
hub.slug === "inhalte-kampagnen") && <TileBalls />}
|
|
53
54
|
</a>
|
|
54
55
|
<a href={hub.uri}>
|
|
55
|
-
{hub.slug === "social-media-performance"
|
|
56
|
+
{(hub.slug === "social-media-performance" ||
|
|
57
|
+
hub.slug === "soziale-medien-leistung") && <TileRays />}
|
|
56
58
|
</a>
|
|
57
59
|
<a href={hub.uri}>
|
|
58
|
-
{hub.slug === "branding-corporate-id"
|
|
60
|
+
{(hub.slug === "branding-corporate-id" ||
|
|
61
|
+
hub.slug === "markenbildung-unternehmensidentitaet") && (
|
|
62
|
+
<TileFluid />
|
|
63
|
+
)}
|
|
59
64
|
</a>
|
|
60
65
|
<a href={hub.uri}>
|
|
61
|
-
{hub.slug === "strategy-positioning"
|
|
66
|
+
{(hub.slug === "strategy-positioning" ||
|
|
67
|
+
hub.slug === "strategie-positionierung") && <TileGlass />}
|
|
62
68
|
</a>
|
|
63
69
|
</div>
|
|
64
70
|
<div className={styles.title}>{hub.title}</div>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Page, Variables } from "../../lib/types";
|
|
2
|
+
import { request } from "./client";
|
|
3
|
+
import { ContactPage } from "./getContactPage";
|
|
4
|
+
|
|
5
|
+
export default async function getPageById(
|
|
6
|
+
id: string,
|
|
7
|
+
language: string,
|
|
8
|
+
): Promise<{ page: Page; contactPage: ContactPage }> {
|
|
9
|
+
const contactPage = language === "DE" ? "contact-de" : "contact";
|
|
10
|
+
|
|
11
|
+
const query = `
|
|
12
|
+
query GetPageById($id: ID!) {
|
|
13
|
+
page(id: $id, idType: DATABASE_ID) {
|
|
14
|
+
title
|
|
15
|
+
content
|
|
16
|
+
}
|
|
17
|
+
contactPage: page(id: "${contactPage}", idType: URI) {
|
|
18
|
+
customFieldsContact {
|
|
19
|
+
facebook
|
|
20
|
+
instagram
|
|
21
|
+
linkedin
|
|
22
|
+
berlinImage {
|
|
23
|
+
sourceUrl
|
|
24
|
+
}
|
|
25
|
+
berlinText
|
|
26
|
+
berlinEmail
|
|
27
|
+
berlinPhone
|
|
28
|
+
zurichImage {
|
|
29
|
+
sourceUrl
|
|
30
|
+
}
|
|
31
|
+
zurichText
|
|
32
|
+
zurichEmail
|
|
33
|
+
zurichPhone
|
|
34
|
+
newyorkImage {
|
|
35
|
+
sourceUrl
|
|
36
|
+
}
|
|
37
|
+
newyorkText
|
|
38
|
+
newyorkEmail
|
|
39
|
+
newyorkPhone
|
|
40
|
+
contactTeaserHeading
|
|
41
|
+
contactTeaserText
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
`;
|
|
46
|
+
|
|
47
|
+
const variables: Variables = { id, language };
|
|
48
|
+
const data: { page: Page; contactPage: ContactPage } = await request(
|
|
49
|
+
query,
|
|
50
|
+
variables,
|
|
51
|
+
);
|
|
52
|
+
return data;
|
|
53
|
+
}
|
package/lib/queries/index.ts
CHANGED
|
@@ -3,6 +3,7 @@ import getPosts from "./getPosts";
|
|
|
3
3
|
import getCategories from "./getCategories";
|
|
4
4
|
import getMetadataBySlug from "./getMetadataBySlug";
|
|
5
5
|
import getPageBySlug from "./getPageBySlug";
|
|
6
|
+
import getPageById from "./getPageById";
|
|
6
7
|
import getPostBySlug from "./getPostBySlug";
|
|
7
8
|
import getCaseBySlug from "./getCaseBySlug";
|
|
8
9
|
import getCaseById from "./getCaseById";
|
|
@@ -24,6 +25,7 @@ export {
|
|
|
24
25
|
getCategories,
|
|
25
26
|
getMetadataBySlug,
|
|
26
27
|
getPageBySlug,
|
|
28
|
+
getPageById,
|
|
27
29
|
getPostBySlug,
|
|
28
30
|
getCaseBySlug,
|
|
29
31
|
getCaseById,
|