foundry-component-library 0.0.0 → 0.0.2
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/assets/image/fallbackVideo.png +0 -0
- package/lib/assets/image/pause.png +0 -0
- package/lib/assets/image/placeholder.png +0 -0
- package/lib/assets/image/play.png +0 -0
- package/lib/assets/svg/arrow.svg +3 -0
- package/lib/assets/svg/caret-down.svg +3 -0
- package/lib/assets/svg/caret-right.svg +4 -0
- package/lib/assets/svg/close.svg +5 -0
- package/lib/assets/svg/comment.svg +18 -0
- package/lib/assets/svg/facebook.svg +10 -0
- package/lib/assets/svg/footer-logo.svg +16 -0
- package/lib/assets/svg/hourglass.svg +1 -0
- package/lib/assets/svg/linkedin.svg +3 -0
- package/lib/assets/svg/logo.svg +3 -0
- package/lib/assets/svg/mute.svg +1 -0
- package/lib/assets/svg/muted.svg +1 -0
- package/lib/assets/svg/play-button.svg +4 -0
- package/lib/assets/svg/plus.svg +5 -0
- package/lib/assets/svg/unicorn.svg +3 -0
- package/lib/components/AgencyNumbers/index.tsx +50 -0
- package/lib/components/AgencyNumbers/styles.module.scss +71 -0
- package/lib/components/Awards/index.tsx +48 -0
- package/lib/components/Awards/styles.module.scss +52 -0
- package/lib/components/Capabilities/Item.tsx +139 -0
- package/lib/components/Capabilities/index.tsx +49 -0
- package/lib/components/Capabilities/styles.module.scss +154 -0
- package/lib/components/CaseStudyTeaser/index.tsx +77 -0
- package/lib/components/CaseStudyTeaser/styles.module.scss +88 -0
- package/lib/components/ContactButton/index.tsx +14 -0
- package/lib/components/ContactButton/styles.module.scss +25 -0
- package/lib/components/ContactTeaser/index.tsx +36 -0
- package/lib/components/ContactTeaser/styles.module.scss +46 -0
- package/lib/components/Container/index.tsx +19 -0
- package/lib/components/Container/styles.module.scss +22 -0
- package/lib/components/DoubleTiles/Tile.tsx +28 -0
- package/lib/components/DoubleTiles/index.tsx +43 -0
- package/lib/components/DoubleTiles/styles.module.scss +87 -0
- package/lib/components/Footer/index.tsx +109 -0
- package/lib/components/Footer/styles.module.scss +147 -0
- package/lib/components/Header/Menu.tsx +77 -0
- package/lib/components/Header/index.tsx +49 -0
- package/lib/components/Header/styles.module.scss +169 -0
- package/lib/components/Hero/Loading.tsx +36 -0
- package/lib/components/Hero/index.tsx +72 -0
- package/lib/components/Hero/styles.module.scss +63 -0
- package/lib/components/HubsAccordion/Hub.tsx +127 -0
- package/lib/components/HubsAccordion/index.tsx +41 -0
- package/lib/components/HubsAccordion/styles.module.scss +206 -0
- package/lib/components/ImageTitle/index.tsx +39 -0
- package/lib/components/ImageTitle/styles.module.scss +60 -0
- package/lib/components/LargeText/Loading.tsx +7 -0
- package/lib/components/LargeText/Word.tsx +26 -0
- package/lib/components/LargeText/index.tsx +56 -0
- package/lib/components/LargeText/styles.module.scss +51 -0
- package/lib/components/LogoSection/Dropdown.tsx +82 -0
- package/lib/components/LogoSection/Logos.tsx +112 -0
- package/lib/components/LogoSection/index.tsx +45 -0
- package/lib/components/LogoSection/styles.module.scss +142 -0
- package/lib/components/Management/index.tsx +97 -0
- package/lib/components/Management/styles.module.scss +80 -0
- package/lib/components/MarketingStats/index.tsx +64 -0
- package/lib/components/MarketingStats/styles.module.scss +77 -0
- package/lib/components/NewsTeaser/index.tsx +71 -0
- package/lib/components/NewsTeaser/styles.module.scss +121 -0
- package/lib/components/OfficesTeaser/index.tsx +32 -0
- package/lib/components/OfficesTeaser/styles.module.scss +40 -0
- package/lib/components/PartnerNetwork/index.tsx +47 -0
- package/lib/components/PartnerNetwork/styles.module.scss +32 -0
- package/lib/components/QuoteSection/index.tsx +59 -0
- package/lib/components/QuoteSection/styles.module.scss +84 -0
- package/lib/components/ServiceHubsTeaser/Tile.tsx +34 -0
- package/lib/components/ServiceHubsTeaser/index.tsx +72 -0
- package/lib/components/ServiceHubsTeaser/styles.module.scss +69 -0
- package/lib/components/TeamBenefits/Tile.tsx +18 -0
- package/lib/components/TeamBenefits/index.tsx +41 -0
- package/lib/components/TeamBenefits/styles.module.scss +57 -0
- package/lib/components/TeamPhotos/Item.tsx +31 -0
- package/lib/components/TeamPhotos/Loading.tsx +42 -0
- package/lib/components/TeamPhotos/index.tsx +26 -0
- package/lib/components/TeamPhotos/styles.module.scss +79 -0
- package/lib/components/TextSection/Loading.tsx +36 -0
- package/lib/components/TextSection/index.tsx +40 -0
- package/lib/components/TextSection/styles.module.scss +75 -0
- package/lib/components/Tiles/Tile.tsx +21 -0
- package/lib/components/Tiles/index.tsx +43 -0
- package/lib/components/Tiles/styles.module.scss +60 -0
- package/lib/components/VideoTeaser/Loading.tsx +7 -0
- package/lib/components/VideoTeaser/index.tsx +56 -0
- package/lib/components/VideoTeaser/styles.module.scss +93 -0
- package/lib/components/_variables.scss +146 -0
- package/lib/components/case/Content/CenterColumn.tsx +18 -0
- package/lib/components/case/Content/FullWidthImage.tsx +60 -0
- package/lib/components/case/Content/Numbers/index.tsx +46 -0
- package/lib/components/case/Content/Numbers/styles.module.scss +41 -0
- package/lib/components/case/Content/Results/index.tsx +44 -0
- package/lib/components/case/Content/Results/styles.module.scss +34 -0
- package/lib/components/case/Content/TwoColumns/Left.tsx +46 -0
- package/lib/components/case/Content/TwoColumns/Right.tsx +47 -0
- package/lib/components/case/Content/TwoColumns/index.tsx +32 -0
- package/lib/components/case/Content/Video.tsx +88 -0
- package/lib/components/case/Content/index.tsx +86 -0
- package/lib/components/case/Content/styles.module.scss +175 -0
- package/lib/components/case/Other/index.tsx +66 -0
- package/lib/components/case/Other/styles.module.scss +118 -0
- package/lib/components/case/ShareButton/index.tsx +27 -0
- package/lib/components/case/ShareButton/styles.module.scss +5 -0
- package/lib/components/case/Top/Loading.tsx +51 -0
- package/lib/components/case/Top/index.tsx +94 -0
- package/lib/components/case/Top/styles.module.scss +162 -0
- package/lib/components/cases/Items/More.tsx +103 -0
- package/lib/components/cases/Items/Video.tsx +47 -0
- package/lib/components/cases/Items/index.tsx +123 -0
- package/lib/components/cases/Items/styles.module.scss +165 -0
- package/lib/components/cases/Pagination/index.tsx +61 -0
- package/lib/components/cases/Pagination/styles.module.scss +27 -0
- package/lib/components/cases/Top/Dropdown.tsx +94 -0
- package/lib/components/cases/Top/index.tsx +67 -0
- package/lib/components/cases/Top/styles.module.scss +151 -0
- package/lib/components/contact/Accounts/index.tsx +50 -0
- package/lib/components/contact/Accounts/styles.module.scss +61 -0
- package/lib/components/contact/Contacts/index.tsx +50 -0
- package/lib/components/contact/Contacts/styles.module.scss +67 -0
- package/lib/components/contact/Offices/Loading.tsx +45 -0
- package/lib/components/contact/Offices/index.tsx +106 -0
- package/lib/components/contact/Offices/styles.module.scss +79 -0
- package/lib/components/contact/OfficesSection/Loading.tsx +15 -0
- package/lib/components/contact/OfficesSection/index.tsx +22 -0
- package/lib/components/contact/OfficesSection/styles.module.scss +9 -0
- package/lib/components/news/Posts/Loading.tsx +52 -0
- package/lib/components/news/Posts/More.tsx +94 -0
- package/lib/components/news/Posts/index.tsx +61 -0
- package/lib/components/news/Posts/styles.module.scss +171 -0
- package/lib/components/single/Content/CenterColumn.tsx +18 -0
- package/lib/components/single/Content/FullWidthImage.tsx +60 -0
- package/lib/components/single/Content/Loading.tsx +12 -0
- package/lib/components/single/Content/TwoColumns/Left.tsx +80 -0
- package/lib/components/single/Content/TwoColumns/Right.tsx +79 -0
- package/lib/components/single/Content/TwoColumns/index.tsx +32 -0
- package/lib/components/single/Content/Video.tsx +88 -0
- package/lib/components/single/Content/index.tsx +107 -0
- package/lib/components/single/Content/styles.module.scss +205 -0
- package/lib/components/single/Other/index.tsx +55 -0
- package/lib/components/single/Other/styles.module.scss +114 -0
- package/lib/components/single/ShareBar/index.tsx +53 -0
- package/lib/components/single/ShareBar/styles.module.scss +63 -0
- package/lib/components/single/Top/Breadcrumbs.tsx +34 -0
- package/lib/components/single/Top/Loading.tsx +14 -0
- package/lib/components/single/Top/index.tsx +20 -0
- package/lib/components/single/Top/styles.module.scss +163 -0
- package/lib/hooks/useClickOutside.ts +27 -0
- package/lib/hooks/useDrag.ts +59 -0
- package/lib/hooks/useOnScreen.ts +27 -0
- package/lib/index.ts +83 -0
- package/lib/queries/client.ts +6 -0
- package/lib/queries/getAboutPage.ts +164 -0
- package/lib/queries/getBrands.ts +26 -0
- package/lib/queries/getCaseBySlug.ts +187 -0
- package/lib/queries/getCases.ts +124 -0
- package/lib/queries/getCasesPage.ts +217 -0
- package/lib/queries/getCategories.ts +23 -0
- package/lib/queries/getContactPage.ts +100 -0
- package/lib/queries/getHomePage.ts +215 -0
- package/lib/queries/getHubBySlug.ts +143 -0
- package/lib/queries/getHubs.ts +131 -0
- package/lib/queries/getHubsPage.ts +246 -0
- package/lib/queries/getMetadataBySlug.ts +48 -0
- package/lib/queries/getNewsPage.ts +170 -0
- package/lib/queries/getPageBySlug.ts +19 -0
- package/lib/queries/getPeoplePage.ts +117 -0
- package/lib/queries/getPerformanceHubPage.ts +170 -0
- package/lib/queries/getPostBySlug.ts +132 -0
- package/lib/queries/getPosts.ts +123 -0
- package/lib/queries/index.ts +39 -0
- package/lib/types/index.ts +316 -0
- package/lib/utils.ts +3 -0
- package/lib/vite-env.d.ts +2 -0
- package/package.json +2 -2
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { gql } from "graphql-request";
|
|
2
|
+
import { Category } from "../../lib/types";
|
|
3
|
+
import client from "./client";
|
|
4
|
+
|
|
5
|
+
export default async function getCategories(): Promise<Category[]> {
|
|
6
|
+
const query = gql`
|
|
7
|
+
query getCategories {
|
|
8
|
+
caseCategories(where: { language: EN }) {
|
|
9
|
+
nodes {
|
|
10
|
+
id
|
|
11
|
+
name
|
|
12
|
+
slug
|
|
13
|
+
count
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
18
|
+
|
|
19
|
+
const data: { caseCategories: { nodes: Category[] } } = await client.request(
|
|
20
|
+
query
|
|
21
|
+
);
|
|
22
|
+
return data.caseCategories.nodes;
|
|
23
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { gql } from "graphql-request";
|
|
2
|
+
import client from "./client";
|
|
3
|
+
|
|
4
|
+
export type ContactPage = {
|
|
5
|
+
title: string;
|
|
6
|
+
customFieldsContact: {
|
|
7
|
+
title: string;
|
|
8
|
+
subtitle: string;
|
|
9
|
+
berlinImage: {
|
|
10
|
+
sourceUrl: string;
|
|
11
|
+
};
|
|
12
|
+
berlinText: string;
|
|
13
|
+
berlinEmail: string;
|
|
14
|
+
berlinPhone: string;
|
|
15
|
+
berlinAddress: string;
|
|
16
|
+
berlinAddressLink: string;
|
|
17
|
+
zurichImage: {
|
|
18
|
+
sourceUrl: string;
|
|
19
|
+
};
|
|
20
|
+
zurichText: string;
|
|
21
|
+
zurichEmail: string;
|
|
22
|
+
zurichPhone: string;
|
|
23
|
+
zurichAddress: string;
|
|
24
|
+
zurichAddressLink: string;
|
|
25
|
+
newyorkImage: {
|
|
26
|
+
sourceUrl: string;
|
|
27
|
+
};
|
|
28
|
+
newyorkText: string;
|
|
29
|
+
newyorkEmail: string;
|
|
30
|
+
newyorkPhone: string;
|
|
31
|
+
newyorkAddress: string;
|
|
32
|
+
newyorkAddressLink: string;
|
|
33
|
+
contactsTitle: string;
|
|
34
|
+
contactsSubtitle: string;
|
|
35
|
+
contacts: {
|
|
36
|
+
heading: string;
|
|
37
|
+
subheading: string;
|
|
38
|
+
email: string;
|
|
39
|
+
}[];
|
|
40
|
+
bankTitle: string;
|
|
41
|
+
berlinHeading: string;
|
|
42
|
+
berlinDetails: string;
|
|
43
|
+
swissHeading: string;
|
|
44
|
+
swissDetails: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export default async function getContactPage(): Promise<ContactPage | null> {
|
|
49
|
+
const query = gql`
|
|
50
|
+
query GetPageBySlug($slug: ID!) {
|
|
51
|
+
page(id: $slug, idType: URI) {
|
|
52
|
+
title
|
|
53
|
+
customFieldsContact {
|
|
54
|
+
title
|
|
55
|
+
subtitle
|
|
56
|
+
berlinImage {
|
|
57
|
+
sourceUrl
|
|
58
|
+
}
|
|
59
|
+
berlinText
|
|
60
|
+
berlinEmail
|
|
61
|
+
berlinPhone
|
|
62
|
+
berlinAddress
|
|
63
|
+
berlinAddressLink
|
|
64
|
+
zurichImage {
|
|
65
|
+
sourceUrl
|
|
66
|
+
}
|
|
67
|
+
zurichText
|
|
68
|
+
zurichEmail
|
|
69
|
+
zurichPhone
|
|
70
|
+
zurichAddress
|
|
71
|
+
zurichAddressLink
|
|
72
|
+
newyorkImage {
|
|
73
|
+
sourceUrl
|
|
74
|
+
}
|
|
75
|
+
newyorkText
|
|
76
|
+
newyorkEmail
|
|
77
|
+
newyorkPhone
|
|
78
|
+
newyorkAddress
|
|
79
|
+
newyorkAddressLink
|
|
80
|
+
contactsTitle
|
|
81
|
+
contactsSubtitle
|
|
82
|
+
contacts {
|
|
83
|
+
heading
|
|
84
|
+
subheading
|
|
85
|
+
email
|
|
86
|
+
}
|
|
87
|
+
bankTitle
|
|
88
|
+
berlinHeading
|
|
89
|
+
berlinDetails
|
|
90
|
+
swissHeading
|
|
91
|
+
swissDetails
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
`;
|
|
96
|
+
|
|
97
|
+
const variables = { slug: "contact" };
|
|
98
|
+
const data: { page: ContactPage } = await client.request(query, variables);
|
|
99
|
+
return data.page;
|
|
100
|
+
}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { gql } from "graphql-request";
|
|
2
|
+
import client from "./client";
|
|
3
|
+
import { Hub, PostPreview } from "../types";
|
|
4
|
+
import { type ContactPage } from "./getContactPage";
|
|
5
|
+
|
|
6
|
+
type HomePage = {
|
|
7
|
+
homePage: {
|
|
8
|
+
title: string;
|
|
9
|
+
customFieldsBerlin: {
|
|
10
|
+
heroShowreel2?: {
|
|
11
|
+
mediaItemUrl: string;
|
|
12
|
+
};
|
|
13
|
+
herotextText?: string;
|
|
14
|
+
hubsCaption?: string;
|
|
15
|
+
hubsHeading?: string;
|
|
16
|
+
hubsText?: string;
|
|
17
|
+
awardsHeading?: string;
|
|
18
|
+
awards?: Array<{
|
|
19
|
+
image: {
|
|
20
|
+
sourceUrl: string;
|
|
21
|
+
};
|
|
22
|
+
heading: string;
|
|
23
|
+
text: string;
|
|
24
|
+
}>;
|
|
25
|
+
casesHeading?: string;
|
|
26
|
+
casesCases?: Array<{
|
|
27
|
+
id: string;
|
|
28
|
+
uri: string;
|
|
29
|
+
title: string;
|
|
30
|
+
case: {
|
|
31
|
+
caption: string;
|
|
32
|
+
mainImage: {
|
|
33
|
+
sourceUrl: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}>;
|
|
37
|
+
brandsCaption?: string;
|
|
38
|
+
brandsHeading?: string;
|
|
39
|
+
brandsText?: string;
|
|
40
|
+
brands: {
|
|
41
|
+
data?: {
|
|
42
|
+
title?: string;
|
|
43
|
+
featured?: boolean;
|
|
44
|
+
image?: {
|
|
45
|
+
sourceUrl: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
service?: string[];
|
|
49
|
+
industry?: string[];
|
|
50
|
+
}[];
|
|
51
|
+
numbersHeading?: string;
|
|
52
|
+
numbers?: Array<{
|
|
53
|
+
number?: string;
|
|
54
|
+
text?: string;
|
|
55
|
+
}>;
|
|
56
|
+
newsCaption?: string;
|
|
57
|
+
newsHeading?: string;
|
|
58
|
+
newsText?: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
hubs: {
|
|
62
|
+
id: string;
|
|
63
|
+
title: string;
|
|
64
|
+
uri: string;
|
|
65
|
+
}[];
|
|
66
|
+
posts: PostPreview[];
|
|
67
|
+
contactPage: {
|
|
68
|
+
customFieldsContact: {
|
|
69
|
+
berlinImage?: {
|
|
70
|
+
sourceUrl: string;
|
|
71
|
+
};
|
|
72
|
+
berlinText?: string;
|
|
73
|
+
berlinEmail?: string;
|
|
74
|
+
berlinPhone?: string;
|
|
75
|
+
zurichImage?: {
|
|
76
|
+
sourceUrl: string;
|
|
77
|
+
};
|
|
78
|
+
zurichText?: string;
|
|
79
|
+
zurichEmail?: string;
|
|
80
|
+
zurichPhone?: string;
|
|
81
|
+
newyorkImage?: {
|
|
82
|
+
sourceUrl: string;
|
|
83
|
+
};
|
|
84
|
+
newyorkText?: string;
|
|
85
|
+
newyorkEmail?: string;
|
|
86
|
+
newyorkPhone?: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export default async function getContactPage(): Promise<HomePage> {
|
|
92
|
+
const query = gql`
|
|
93
|
+
query GetPageBySlug($slug: ID!) {
|
|
94
|
+
page(id: $slug, idType: URI) {
|
|
95
|
+
title
|
|
96
|
+
customFieldsBerlin {
|
|
97
|
+
heroShowreel2 {
|
|
98
|
+
mediaItemUrl
|
|
99
|
+
}
|
|
100
|
+
herotextText
|
|
101
|
+
hubsCaption
|
|
102
|
+
hubsHeading
|
|
103
|
+
hubsText
|
|
104
|
+
awardsHeading
|
|
105
|
+
awards {
|
|
106
|
+
image {
|
|
107
|
+
sourceUrl
|
|
108
|
+
}
|
|
109
|
+
heading
|
|
110
|
+
text
|
|
111
|
+
}
|
|
112
|
+
casesHeading
|
|
113
|
+
casesCases {
|
|
114
|
+
... on Case {
|
|
115
|
+
id
|
|
116
|
+
uri
|
|
117
|
+
title
|
|
118
|
+
case {
|
|
119
|
+
caption
|
|
120
|
+
mainImage {
|
|
121
|
+
sourceUrl
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
brandsCaption
|
|
127
|
+
brandsHeading
|
|
128
|
+
brandsText
|
|
129
|
+
brands {
|
|
130
|
+
data {
|
|
131
|
+
title
|
|
132
|
+
featured
|
|
133
|
+
image {
|
|
134
|
+
sourceUrl
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
service
|
|
138
|
+
industry
|
|
139
|
+
}
|
|
140
|
+
numbersHeading
|
|
141
|
+
numbers {
|
|
142
|
+
number
|
|
143
|
+
text
|
|
144
|
+
}
|
|
145
|
+
newsCaption
|
|
146
|
+
newsHeading
|
|
147
|
+
newsText
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
hubs {
|
|
151
|
+
nodes {
|
|
152
|
+
id
|
|
153
|
+
title
|
|
154
|
+
uri
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
posts(first: 3) {
|
|
158
|
+
nodes {
|
|
159
|
+
id
|
|
160
|
+
title
|
|
161
|
+
uri
|
|
162
|
+
CustomFieldsPosts {
|
|
163
|
+
excerpt
|
|
164
|
+
thumbnailImage {
|
|
165
|
+
sourceUrl
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
contactPage: page(id: "contact", idType: URI) {
|
|
171
|
+
customFieldsContact {
|
|
172
|
+
berlinImage {
|
|
173
|
+
sourceUrl
|
|
174
|
+
}
|
|
175
|
+
berlinText
|
|
176
|
+
berlinEmail
|
|
177
|
+
berlinPhone
|
|
178
|
+
berlinAddress
|
|
179
|
+
berlinAddressLink
|
|
180
|
+
zurichImage {
|
|
181
|
+
sourceUrl
|
|
182
|
+
}
|
|
183
|
+
zurichText
|
|
184
|
+
zurichEmail
|
|
185
|
+
zurichPhone
|
|
186
|
+
zurichAddress
|
|
187
|
+
zurichAddressLink
|
|
188
|
+
newyorkImage {
|
|
189
|
+
sourceUrl
|
|
190
|
+
}
|
|
191
|
+
newyorkText
|
|
192
|
+
newyorkEmail
|
|
193
|
+
newyorkPhone
|
|
194
|
+
newyorkAddress
|
|
195
|
+
newyorkAddressLink
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
`;
|
|
200
|
+
|
|
201
|
+
const variables = { slug: "home-berlin" };
|
|
202
|
+
const data: {
|
|
203
|
+
page: HomePage["homePage"];
|
|
204
|
+
hubs: { nodes: Hub[] };
|
|
205
|
+
posts: { nodes: PostPreview[] };
|
|
206
|
+
contactPage: ContactPage;
|
|
207
|
+
} = await client.request(query, variables);
|
|
208
|
+
|
|
209
|
+
return {
|
|
210
|
+
homePage: data.page,
|
|
211
|
+
hubs: data.hubs.nodes,
|
|
212
|
+
posts: data.posts.nodes,
|
|
213
|
+
contactPage: data.contactPage,
|
|
214
|
+
};
|
|
215
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { gql } from "graphql-request";
|
|
2
|
+
import { Case, Hub } from "../../lib/types";
|
|
3
|
+
import client from "./client";
|
|
4
|
+
import { type ContactPage } from "./getContactPage";
|
|
5
|
+
|
|
6
|
+
type HomePage = {
|
|
7
|
+
customFieldsBerlin: {
|
|
8
|
+
awardsHeading?: string;
|
|
9
|
+
awards?: Array<{
|
|
10
|
+
image: {
|
|
11
|
+
sourceUrl: string;
|
|
12
|
+
};
|
|
13
|
+
heading: string;
|
|
14
|
+
text: string;
|
|
15
|
+
}>;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
type HubFields = {
|
|
20
|
+
hub: Hub;
|
|
21
|
+
contactPage: ContactPage;
|
|
22
|
+
cases: Case[];
|
|
23
|
+
homePage: HomePage;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default async function getCaseBySlug(slug: string): Promise<HubFields> {
|
|
27
|
+
const query = gql`
|
|
28
|
+
query GetHubBySlug($slug: ID!) {
|
|
29
|
+
hub(id: $slug, idType: SLUG) {
|
|
30
|
+
id
|
|
31
|
+
title
|
|
32
|
+
customFieldsHub {
|
|
33
|
+
caption
|
|
34
|
+
heading
|
|
35
|
+
subheading
|
|
36
|
+
mainimage {
|
|
37
|
+
sourceUrl
|
|
38
|
+
}
|
|
39
|
+
relatedWork {
|
|
40
|
+
... on Case {
|
|
41
|
+
title
|
|
42
|
+
uri
|
|
43
|
+
case {
|
|
44
|
+
mainImage {
|
|
45
|
+
sourceUrl
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
capabilities {
|
|
51
|
+
heading
|
|
52
|
+
text
|
|
53
|
+
cases {
|
|
54
|
+
... on Case {
|
|
55
|
+
title
|
|
56
|
+
uri
|
|
57
|
+
case {
|
|
58
|
+
mainImage {
|
|
59
|
+
sourceUrl
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
quoteName
|
|
66
|
+
quotePosition
|
|
67
|
+
quoteText
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
contactPage: page(id: "contact", idType: URI) {
|
|
71
|
+
customFieldsContact {
|
|
72
|
+
berlinImage {
|
|
73
|
+
sourceUrl
|
|
74
|
+
}
|
|
75
|
+
berlinText
|
|
76
|
+
berlinEmail
|
|
77
|
+
berlinPhone
|
|
78
|
+
zurichImage {
|
|
79
|
+
sourceUrl
|
|
80
|
+
}
|
|
81
|
+
zurichText
|
|
82
|
+
zurichEmail
|
|
83
|
+
zurichPhone
|
|
84
|
+
newyorkImage {
|
|
85
|
+
sourceUrl
|
|
86
|
+
}
|
|
87
|
+
newyorkText
|
|
88
|
+
newyorkEmail
|
|
89
|
+
newyorkPhone
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
cases(first: 3) {
|
|
93
|
+
nodes {
|
|
94
|
+
id
|
|
95
|
+
title
|
|
96
|
+
slug
|
|
97
|
+
uri
|
|
98
|
+
case {
|
|
99
|
+
thumbnailVideo {
|
|
100
|
+
mediaItemUrl
|
|
101
|
+
}
|
|
102
|
+
mainImage {
|
|
103
|
+
sourceUrl
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
pageInfo {
|
|
108
|
+
startCursor
|
|
109
|
+
endCursor
|
|
110
|
+
hasNextPage
|
|
111
|
+
hasPreviousPage
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
homePage: page(id: "home-berlin", idType: URI) {
|
|
115
|
+
customFieldsBerlin {
|
|
116
|
+
awardsHeading
|
|
117
|
+
awards {
|
|
118
|
+
image {
|
|
119
|
+
sourceUrl
|
|
120
|
+
}
|
|
121
|
+
heading
|
|
122
|
+
text
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
`;
|
|
128
|
+
|
|
129
|
+
const variables = { slug };
|
|
130
|
+
const data: {
|
|
131
|
+
hub: Hub;
|
|
132
|
+
contactPage: ContactPage;
|
|
133
|
+
cases: { nodes: Case[] };
|
|
134
|
+
homePage: HomePage;
|
|
135
|
+
} = await client.request(query, variables);
|
|
136
|
+
|
|
137
|
+
return {
|
|
138
|
+
hub: data.hub,
|
|
139
|
+
contactPage: data.contactPage,
|
|
140
|
+
cases: data.cases.nodes,
|
|
141
|
+
homePage: data.homePage,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { gql } from "graphql-request";
|
|
2
|
+
import { Hub } from "../../lib/types";
|
|
3
|
+
import client from "./client";
|
|
4
|
+
|
|
5
|
+
export default async function getCases(): Promise<{
|
|
6
|
+
hubs: Hub[];
|
|
7
|
+
pageInfo: {
|
|
8
|
+
startCursor: string | null;
|
|
9
|
+
endCursor: string | null;
|
|
10
|
+
hasNextPage: boolean;
|
|
11
|
+
hasPreviousPage: boolean;
|
|
12
|
+
};
|
|
13
|
+
homePage: {
|
|
14
|
+
customFields: {
|
|
15
|
+
brandsCaption: string;
|
|
16
|
+
brandsHeading: string;
|
|
17
|
+
brandsText: string;
|
|
18
|
+
brands: {
|
|
19
|
+
title: string;
|
|
20
|
+
category: string;
|
|
21
|
+
image: {
|
|
22
|
+
sourceUrl: string;
|
|
23
|
+
};
|
|
24
|
+
}[];
|
|
25
|
+
awardsHeading?: string;
|
|
26
|
+
awards?: Array<{
|
|
27
|
+
image: {
|
|
28
|
+
sourceUrl: string;
|
|
29
|
+
};
|
|
30
|
+
heading: string;
|
|
31
|
+
text: string;
|
|
32
|
+
}>;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
}> {
|
|
36
|
+
const query = gql`
|
|
37
|
+
query GetHubs {
|
|
38
|
+
hubs(where: { language: EN }) {
|
|
39
|
+
nodes {
|
|
40
|
+
id
|
|
41
|
+
title
|
|
42
|
+
slug
|
|
43
|
+
uri
|
|
44
|
+
customFieldsHub {
|
|
45
|
+
caption
|
|
46
|
+
heading
|
|
47
|
+
subheading
|
|
48
|
+
mainimage {
|
|
49
|
+
sourceUrl
|
|
50
|
+
}
|
|
51
|
+
tags {
|
|
52
|
+
tag
|
|
53
|
+
}
|
|
54
|
+
relatedWork {
|
|
55
|
+
... on Case {
|
|
56
|
+
title
|
|
57
|
+
uri
|
|
58
|
+
case {
|
|
59
|
+
mainImage {
|
|
60
|
+
sourceUrl
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
capabilities {
|
|
66
|
+
heading
|
|
67
|
+
text
|
|
68
|
+
cases {
|
|
69
|
+
... on Case {
|
|
70
|
+
title
|
|
71
|
+
uri
|
|
72
|
+
case {
|
|
73
|
+
mainImage {
|
|
74
|
+
sourceUrl
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
pageInfo {
|
|
83
|
+
startCursor
|
|
84
|
+
endCursor
|
|
85
|
+
hasNextPage
|
|
86
|
+
hasPreviousPage
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
`;
|
|
91
|
+
|
|
92
|
+
const data: {
|
|
93
|
+
hubs: {
|
|
94
|
+
nodes: Hub[];
|
|
95
|
+
pageInfo: {
|
|
96
|
+
startCursor: string | null;
|
|
97
|
+
endCursor: string | null;
|
|
98
|
+
hasNextPage: boolean;
|
|
99
|
+
hasPreviousPage: boolean;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
homePage: {
|
|
103
|
+
customFields: {
|
|
104
|
+
brandsCaption: string;
|
|
105
|
+
brandsHeading: string;
|
|
106
|
+
brandsText: string;
|
|
107
|
+
brands: {
|
|
108
|
+
title: string;
|
|
109
|
+
category: string;
|
|
110
|
+
image: {
|
|
111
|
+
sourceUrl: string;
|
|
112
|
+
};
|
|
113
|
+
}[];
|
|
114
|
+
awardsHeading?: string;
|
|
115
|
+
awards?: Array<{
|
|
116
|
+
image: {
|
|
117
|
+
sourceUrl: string;
|
|
118
|
+
};
|
|
119
|
+
heading: string;
|
|
120
|
+
text: string;
|
|
121
|
+
}>;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
} = await client.request(query);
|
|
125
|
+
|
|
126
|
+
return {
|
|
127
|
+
hubs: data.hubs.nodes,
|
|
128
|
+
pageInfo: data.hubs.pageInfo,
|
|
129
|
+
homePage: data.homePage,
|
|
130
|
+
};
|
|
131
|
+
}
|