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,162 @@
|
|
|
1
|
+
@use "../../variables" as *;
|
|
2
|
+
|
|
3
|
+
.wrapper {
|
|
4
|
+
padding: 64px 0;
|
|
5
|
+
color: $color-brown;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.link {
|
|
9
|
+
font-size: 14px;
|
|
10
|
+
color: $color-gray;
|
|
11
|
+
|
|
12
|
+
a {
|
|
13
|
+
font-size: 14px;
|
|
14
|
+
color: $color-black;
|
|
15
|
+
text-decoration: none;
|
|
16
|
+
|
|
17
|
+
&:hover {
|
|
18
|
+
color: $color-blue;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&:after {
|
|
23
|
+
content: " / ";
|
|
24
|
+
display: inline-block;
|
|
25
|
+
margin: 0 10px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:last-child:after {
|
|
29
|
+
display: none;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.caption {
|
|
34
|
+
font-size: 20px;
|
|
35
|
+
color: $color-blue;
|
|
36
|
+
text-transform: uppercase;
|
|
37
|
+
margin-bottom: 5px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.titleWrapper {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: space-between;
|
|
44
|
+
|
|
45
|
+
@media #{$QUERY-md} {
|
|
46
|
+
display: block;
|
|
47
|
+
margin-bottom: 30px;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.title {
|
|
52
|
+
font-size: 54px;
|
|
53
|
+
line-height: 1.15;
|
|
54
|
+
font-weight: bold;
|
|
55
|
+
margin-bottom: 50px;
|
|
56
|
+
width: 800px;
|
|
57
|
+
max-width: 100%;
|
|
58
|
+
color: $color-brown;
|
|
59
|
+
font-weight: 400;
|
|
60
|
+
|
|
61
|
+
@media #{$QUERY-sm} {
|
|
62
|
+
font-size: 42px;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.subtitle {
|
|
67
|
+
font-size: 36px;
|
|
68
|
+
line-height: 1.2;
|
|
69
|
+
font-weight: 400;
|
|
70
|
+
margin-top: 30px;
|
|
71
|
+
|
|
72
|
+
@media #{$QUERY-sm} {
|
|
73
|
+
font-size: 24px;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.details {
|
|
78
|
+
display: flex;
|
|
79
|
+
flex-wrap: wrap;
|
|
80
|
+
gap: 0 26px;
|
|
81
|
+
|
|
82
|
+
@media #{$QUERY-sm} {
|
|
83
|
+
display: block;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.detail {
|
|
88
|
+
font-size: 14px;
|
|
89
|
+
width: 200px;
|
|
90
|
+
font-size: 18px;
|
|
91
|
+
|
|
92
|
+
@media #{$QUERY-md} {
|
|
93
|
+
width: calc(33.333% - 18px);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@media #{$QUERY-sm} {
|
|
97
|
+
margin-bottom: 30px;
|
|
98
|
+
width: 100%;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.heading {
|
|
103
|
+
margin-bottom: 10px;
|
|
104
|
+
font-size: 20px;
|
|
105
|
+
text-transform: uppercase;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.awardsWrapper {
|
|
109
|
+
@media #{$QUERY-md} {
|
|
110
|
+
margin-top: 30px;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.awards {
|
|
115
|
+
display: flex;
|
|
116
|
+
flex-wrap: wrap;
|
|
117
|
+
gap: 40px;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.award {
|
|
121
|
+
display: flex;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.awardTexts {
|
|
125
|
+
width: auto;
|
|
126
|
+
max-width: 200px;
|
|
127
|
+
flex-shrink: 0;
|
|
128
|
+
margin-right: 20px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.awardImage {
|
|
132
|
+
// width: 100px;
|
|
133
|
+
// height: 100px;
|
|
134
|
+
flex-shrink: 0;
|
|
135
|
+
position: relative;
|
|
136
|
+
max-height: 100px;
|
|
137
|
+
|
|
138
|
+
img {
|
|
139
|
+
width: 100%;
|
|
140
|
+
height: 100%;
|
|
141
|
+
object-fit: contain;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.awardHeading {
|
|
146
|
+
font-weight: bold;
|
|
147
|
+
margin-bottom: 10px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.mainImage {
|
|
151
|
+
position: relative;
|
|
152
|
+
width: 100%;
|
|
153
|
+
height: 534px;
|
|
154
|
+
|
|
155
|
+
img {
|
|
156
|
+
object-fit: cover;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&.loading {
|
|
160
|
+
background-color: $color-gray-light;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
|
+
import styles from "./styles.module.scss";
|
|
4
|
+
import Hourglass from "../../../assets/svg/hourglass.svg?react";
|
|
5
|
+
import { translate } from "../../../utils";
|
|
6
|
+
import { getCases } from "../../../queries";
|
|
7
|
+
import { Case, NextImage, NextLink } from "../../../types";
|
|
8
|
+
import Video from "./Video";
|
|
9
|
+
import Arrow from "../../../assets/svg/caret-right.svg?react";
|
|
10
|
+
|
|
11
|
+
const More = ({
|
|
12
|
+
endCursor,
|
|
13
|
+
currentCategory,
|
|
14
|
+
Image,
|
|
15
|
+
Link,
|
|
16
|
+
}: {
|
|
17
|
+
endCursor: string;
|
|
18
|
+
currentCategory: string;
|
|
19
|
+
Image: NextImage;
|
|
20
|
+
Link: NextLink;
|
|
21
|
+
}) => {
|
|
22
|
+
const [loading, setLoading] = useState(false);
|
|
23
|
+
const [cases, setCases] = useState<Case[]>([]);
|
|
24
|
+
const [end, setEnd] = useState<string | null>(endCursor);
|
|
25
|
+
const [finished, setFinished] = useState(false);
|
|
26
|
+
|
|
27
|
+
const handleMore = async () => {
|
|
28
|
+
setLoading(true);
|
|
29
|
+
|
|
30
|
+
const { cases: newCases, pageInfo } = await getCases({
|
|
31
|
+
category: currentCategory,
|
|
32
|
+
params: {
|
|
33
|
+
after: end,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
if (!pageInfo.hasNextPage) {
|
|
38
|
+
setFinished(true);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
setCases([...cases, ...newCases]);
|
|
42
|
+
setEnd(pageInfo.endCursor);
|
|
43
|
+
setLoading(false);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
setCases([]);
|
|
48
|
+
}, [currentCategory]);
|
|
49
|
+
|
|
50
|
+
if (!cases) return null;
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<>
|
|
54
|
+
{cases.map((item) => {
|
|
55
|
+
if (!item.case) return null;
|
|
56
|
+
const { thumbnailVideo, mainImage } = item.case;
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<div key={item.id} className={styles.case}>
|
|
60
|
+
<Link href={item.uri}>
|
|
61
|
+
{thumbnailVideo && <Video url={thumbnailVideo.mediaItemUrl} />}
|
|
62
|
+
{!thumbnailVideo && mainImage && mainImage.sourceUrl && (
|
|
63
|
+
<div className={styles.imageWrapper}>
|
|
64
|
+
<Image
|
|
65
|
+
className={styles.image}
|
|
66
|
+
src={mainImage.sourceUrl}
|
|
67
|
+
alt={item.title || ""}
|
|
68
|
+
width={720}
|
|
69
|
+
height={490}
|
|
70
|
+
/>
|
|
71
|
+
</div>
|
|
72
|
+
)}
|
|
73
|
+
<div className={styles.texts}>
|
|
74
|
+
<h3 className={styles.title}>{item.title}</h3>
|
|
75
|
+
<div className={styles.arrowWrapper}>
|
|
76
|
+
<Arrow />
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</Link>
|
|
80
|
+
</div>
|
|
81
|
+
);
|
|
82
|
+
})}
|
|
83
|
+
<div className={styles.bottom}>
|
|
84
|
+
{loading && (
|
|
85
|
+
<div className={styles.loading}>
|
|
86
|
+
<Hourglass />
|
|
87
|
+
</div>
|
|
88
|
+
)}
|
|
89
|
+
{!loading && !finished && (
|
|
90
|
+
<button
|
|
91
|
+
type="button"
|
|
92
|
+
className={styles.loadMore}
|
|
93
|
+
onClick={handleMore}
|
|
94
|
+
>
|
|
95
|
+
{translate("Load more")}
|
|
96
|
+
</button>
|
|
97
|
+
)}
|
|
98
|
+
</div>
|
|
99
|
+
</>
|
|
100
|
+
);
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export default More;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useState, useRef, useEffect } from "react";
|
|
3
|
+
import { useOnScreen } from "../../../hooks/useOnScreen";
|
|
4
|
+
import ReactPlayer from "react-player/lazy";
|
|
5
|
+
import styles from "./styles.module.scss";
|
|
6
|
+
|
|
7
|
+
const Video = ({ url }: { url: string }) => {
|
|
8
|
+
const sectionRef = useRef(null);
|
|
9
|
+
const onScreen = useOnScreen(sectionRef, "1000px");
|
|
10
|
+
// const [playing, setPlaying] = useState(false);
|
|
11
|
+
const [videoLoaded, setVideoLoaded] = useState(false);
|
|
12
|
+
const [hasWindow, setHasWindow] = useState(false);
|
|
13
|
+
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
if (typeof window !== "undefined") {
|
|
16
|
+
setHasWindow(true);
|
|
17
|
+
}
|
|
18
|
+
}, []);
|
|
19
|
+
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
if (!videoLoaded && onScreen) {
|
|
22
|
+
setVideoLoaded(true);
|
|
23
|
+
}
|
|
24
|
+
}, [videoLoaded, onScreen]);
|
|
25
|
+
|
|
26
|
+
// useEffect(() => {
|
|
27
|
+
// setPlaying(true);
|
|
28
|
+
// }, [videoLoaded]);
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<div className={styles.imageWrapper} ref={sectionRef}>
|
|
32
|
+
{hasWindow && (
|
|
33
|
+
<ReactPlayer
|
|
34
|
+
playing
|
|
35
|
+
url={url}
|
|
36
|
+
width="100%"
|
|
37
|
+
height="100%"
|
|
38
|
+
loop
|
|
39
|
+
muted
|
|
40
|
+
playsinline
|
|
41
|
+
/>
|
|
42
|
+
)}
|
|
43
|
+
</div>
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export default Video;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import Container from "../../Container";
|
|
4
|
+
import Video from "./Video";
|
|
5
|
+
import styles from "./styles.module.scss";
|
|
6
|
+
import Arrow from "../../../assets/svg/arrow.svg?react";
|
|
7
|
+
import { Case, NextImage, NextLink, NextRouter } from "../../../types";
|
|
8
|
+
import Top from "../Top";
|
|
9
|
+
|
|
10
|
+
function Cases({
|
|
11
|
+
cases,
|
|
12
|
+
currentService,
|
|
13
|
+
currentIndustry,
|
|
14
|
+
Link,
|
|
15
|
+
Image,
|
|
16
|
+
useRouter,
|
|
17
|
+
}: {
|
|
18
|
+
cases: Case[];
|
|
19
|
+
currentService?: string;
|
|
20
|
+
currentIndustry?: string;
|
|
21
|
+
Link: NextLink;
|
|
22
|
+
Image: NextImage;
|
|
23
|
+
useRouter: () => NextRouter;
|
|
24
|
+
}) {
|
|
25
|
+
let defaultValue = {
|
|
26
|
+
category: "featured",
|
|
27
|
+
tag: "featured",
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
if (currentService) {
|
|
31
|
+
defaultValue = {
|
|
32
|
+
category: "service",
|
|
33
|
+
tag: currentService,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (currentIndustry) {
|
|
38
|
+
defaultValue = {
|
|
39
|
+
category: "industry",
|
|
40
|
+
tag: currentIndustry,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const [selected, setSelected] = useState(defaultValue);
|
|
45
|
+
const services = [
|
|
46
|
+
"Brand Identity",
|
|
47
|
+
"Advertising & Campaigning",
|
|
48
|
+
"Strategy & Growth",
|
|
49
|
+
"Social Media & Influencer Marketing",
|
|
50
|
+
"Media & Performance",
|
|
51
|
+
"Content Creation & Production",
|
|
52
|
+
"B2B & Thought-Leadership",
|
|
53
|
+
];
|
|
54
|
+
const industries = [
|
|
55
|
+
"Banken & Versicherungen",
|
|
56
|
+
"FMCG",
|
|
57
|
+
"Gesundheit & Wellness",
|
|
58
|
+
"Handel & E-Commerce",
|
|
59
|
+
"Lifestyle",
|
|
60
|
+
"Mobilität & Transport",
|
|
61
|
+
"Forschung & Bildung",
|
|
62
|
+
"Hospitality & Real Estate",
|
|
63
|
+
"Öffentlicher Sektor & Non-Profit",
|
|
64
|
+
"Versorgungsunternehmen",
|
|
65
|
+
"Konsumgüter & Technologie",
|
|
66
|
+
"Dienstleister",
|
|
67
|
+
];
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<>
|
|
71
|
+
<Top
|
|
72
|
+
services={Array.from(services)}
|
|
73
|
+
industries={Array.from(industries)}
|
|
74
|
+
selected={selected}
|
|
75
|
+
setSelected={setSelected}
|
|
76
|
+
useRouter={useRouter}
|
|
77
|
+
/>
|
|
78
|
+
<Container>
|
|
79
|
+
<div className={styles.wrapper}>
|
|
80
|
+
{cases.map((item) => {
|
|
81
|
+
if (!item.case) return null;
|
|
82
|
+
const { thumbnailVideo, mainImage } = item.case;
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
<div key={item.id} className={styles.case}>
|
|
86
|
+
<Link href={item.uri}>
|
|
87
|
+
{thumbnailVideo && (
|
|
88
|
+
<Video url={thumbnailVideo.mediaItemUrl} />
|
|
89
|
+
)}
|
|
90
|
+
{!thumbnailVideo && mainImage && (
|
|
91
|
+
<div className={styles.imageWrapper}>
|
|
92
|
+
{mainImage.sourceUrl && (
|
|
93
|
+
<Image
|
|
94
|
+
className={styles.image}
|
|
95
|
+
src={mainImage.sourceUrl}
|
|
96
|
+
alt={item.title || ""}
|
|
97
|
+
width={720}
|
|
98
|
+
height={490}
|
|
99
|
+
/>
|
|
100
|
+
)}
|
|
101
|
+
</div>
|
|
102
|
+
)}
|
|
103
|
+
<div className={styles.texts}>
|
|
104
|
+
<div>
|
|
105
|
+
<h3 className={styles.title}>{item.title}</h3>
|
|
106
|
+
<div className={styles.caption}>{item.case.caption}</div>
|
|
107
|
+
</div>
|
|
108
|
+
<div className={styles.arrowWrapper}>
|
|
109
|
+
<Arrow />
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
</Link>
|
|
113
|
+
</div>
|
|
114
|
+
);
|
|
115
|
+
})}
|
|
116
|
+
</div>
|
|
117
|
+
{cases.length < 1 && <div>no cases in this category</div>}
|
|
118
|
+
</Container>
|
|
119
|
+
</>
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export default Cases;
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
@use "../../variables" as *;
|
|
2
|
+
|
|
3
|
+
.wrapper {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-wrap: wrap;
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
|
|
8
|
+
@media #{$QUERY-sm} {
|
|
9
|
+
display: block;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.case {
|
|
14
|
+
width: 720px;
|
|
15
|
+
max-width: calc(60% - 32px);
|
|
16
|
+
margin-bottom: 64px;
|
|
17
|
+
position: relative;
|
|
18
|
+
|
|
19
|
+
&:hover {
|
|
20
|
+
.image {
|
|
21
|
+
transform: scale(1.1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.title {
|
|
25
|
+
color: $color-blue;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
path {
|
|
29
|
+
stroke: $color-blue;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@media #{$QUERY-lg} {
|
|
34
|
+
width: 56%;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@media #{$QUERY-sm} {
|
|
38
|
+
width: 100%;
|
|
39
|
+
max-width: 100%;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&:nth-child(4n),
|
|
43
|
+
&:nth-child(4n + 1) {
|
|
44
|
+
width: 480px;
|
|
45
|
+
max-width: calc(40% - 32px);
|
|
46
|
+
|
|
47
|
+
@media #{$QUERY-lg} {
|
|
48
|
+
width: 40%;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@media #{$QUERY-sm} {
|
|
52
|
+
width: 100%;
|
|
53
|
+
max-width: 100%;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.imageWrapper {
|
|
59
|
+
width: 100%;
|
|
60
|
+
height: 490px;
|
|
61
|
+
overflow: hidden;
|
|
62
|
+
background-color: $color-gray-light;
|
|
63
|
+
|
|
64
|
+
@media #{$QUERY-md} {
|
|
65
|
+
height: 300px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.image {
|
|
69
|
+
width: 100%;
|
|
70
|
+
height: 100%;
|
|
71
|
+
object-fit: cover;
|
|
72
|
+
transition: transform 0.3s;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
video {
|
|
76
|
+
width: 100%;
|
|
77
|
+
height: 100%;
|
|
78
|
+
object-fit: cover;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.texts {
|
|
83
|
+
display: flex;
|
|
84
|
+
justify-content: space-between;
|
|
85
|
+
padding-top: 25px;
|
|
86
|
+
align-items: baseline;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.title {
|
|
90
|
+
font-size: 20px;
|
|
91
|
+
color: $color-brown;
|
|
92
|
+
transition: color 0.3s;
|
|
93
|
+
margin-bottom: 10px;
|
|
94
|
+
font-weight: 500;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.caption {
|
|
98
|
+
font-size: 22px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.arrowWrapper {
|
|
102
|
+
path {
|
|
103
|
+
stroke: $color-brown;
|
|
104
|
+
stroke-width: 2px;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.loadMore {
|
|
109
|
+
background: none;
|
|
110
|
+
border: solid 1px $color-black;
|
|
111
|
+
width: 150px;
|
|
112
|
+
text-align: center;
|
|
113
|
+
padding: 15px;
|
|
114
|
+
margin: 0 auto;
|
|
115
|
+
cursor: pointer;
|
|
116
|
+
display: block;
|
|
117
|
+
|
|
118
|
+
&:hover {
|
|
119
|
+
background-color: $color-black;
|
|
120
|
+
color: $color-white;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.loading {
|
|
125
|
+
margin: 0 auto;
|
|
126
|
+
width: 180px;
|
|
127
|
+
position: absolute;
|
|
128
|
+
top: 50%;
|
|
129
|
+
left: 50%;
|
|
130
|
+
transform: translate(-50%, -65%);
|
|
131
|
+
|
|
132
|
+
@media #{$QUERY-lg} {
|
|
133
|
+
width: 100px;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
svg {
|
|
137
|
+
max-width: 100%;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.rotateRight {
|
|
142
|
+
animation: rotate 8s linear infinite;
|
|
143
|
+
transform-origin: center;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.rotateLeft {
|
|
147
|
+
animation: rotate 8s linear infinite reverse;
|
|
148
|
+
transform-origin: center;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.bottom {
|
|
152
|
+
position: relative;
|
|
153
|
+
margin-bottom: 120px;
|
|
154
|
+
width: 100%;
|
|
155
|
+
flex-shrink: 0;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
@keyframes rotate {
|
|
159
|
+
from {
|
|
160
|
+
transform: rotate(0deg);
|
|
161
|
+
}
|
|
162
|
+
to {
|
|
163
|
+
transform: rotate(360deg);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import Container from "../../Container";
|
|
3
|
+
import styles from "./styles.module.scss";
|
|
4
|
+
import { casesPerPage } from "../../../queries/getCasesPage";
|
|
5
|
+
import { NextRouter, NextSearchParams } from "../../../types";
|
|
6
|
+
|
|
7
|
+
const Pagination = ({
|
|
8
|
+
total,
|
|
9
|
+
currentPage,
|
|
10
|
+
useRouter,
|
|
11
|
+
useSearchParams,
|
|
12
|
+
}: {
|
|
13
|
+
total: number;
|
|
14
|
+
currentPage: number;
|
|
15
|
+
useRouter: () => NextRouter;
|
|
16
|
+
useSearchParams: () => NextSearchParams;
|
|
17
|
+
}) => {
|
|
18
|
+
const router = useRouter();
|
|
19
|
+
const searchParams = useSearchParams();
|
|
20
|
+
const numberOfPages = Math.ceil(total / casesPerPage);
|
|
21
|
+
const array = [...Array(numberOfPages).keys()];
|
|
22
|
+
|
|
23
|
+
const handleClick = (page: number) => {
|
|
24
|
+
const params = new URLSearchParams(searchParams);
|
|
25
|
+
params.set("page", String(page));
|
|
26
|
+
router.push(`?${params.toString()}`, undefined, { scroll: false });
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<Container>
|
|
31
|
+
<div className={styles.pagination}>
|
|
32
|
+
{array.map((page) => {
|
|
33
|
+
if (currentPage === page + 1) {
|
|
34
|
+
return (
|
|
35
|
+
<span
|
|
36
|
+
key={page + 1}
|
|
37
|
+
className={`${styles.indicator} ${styles.current}`}
|
|
38
|
+
>
|
|
39
|
+
{page + 1}
|
|
40
|
+
</span>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<button
|
|
46
|
+
key={page + 1}
|
|
47
|
+
className={styles.indicator}
|
|
48
|
+
onClick={() => {
|
|
49
|
+
handleClick(page + 1);
|
|
50
|
+
}}
|
|
51
|
+
>
|
|
52
|
+
{page + 1}
|
|
53
|
+
</button>
|
|
54
|
+
);
|
|
55
|
+
})}
|
|
56
|
+
</div>
|
|
57
|
+
</Container>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export default Pagination;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@use "../../variables" as *;
|
|
2
|
+
|
|
3
|
+
.pagination {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: 10px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.indicator {
|
|
10
|
+
width: 40px;
|
|
11
|
+
height: 40px;
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
background-color: transparent;
|
|
16
|
+
font-size: 16px;
|
|
17
|
+
border: none;
|
|
18
|
+
|
|
19
|
+
&:not(span):hover {
|
|
20
|
+
background-color: $color-gray-light;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&.current {
|
|
25
|
+
background-color: $color-gray-light;
|
|
26
|
+
}
|
|
27
|
+
}
|