Skip to content

Commit d108723

Browse files
committed
change landing page slogan
1 parent d99cfb1 commit d108723

2 files changed

Lines changed: 61 additions & 11 deletions

File tree

src/ui/language/translations.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ const translations = {
4040
}
4141
},
4242
fact: {
43+
header: "Your Support",
44+
headerText: "is not a",
45+
rotatingWords: ["coincidence", "luxury", "privilege"],
4346
subHeader: "unclaimed social benefits per year",
4447
text: "We are on a mission to make social benefits in Germany accessible and easy to understand by everyone. We show you what social benefits you might be eligible for and point you the way to apply for them."
4548
},
@@ -431,6 +434,9 @@ const translations = {
431434
}
432435
},
433436
fact: {
437+
header: "Unterstützung",
438+
headerText: "ist kein",
439+
rotatingWords: ["Zufall", "Luxus", "Privileg"],
434440
subHeader: "nicht in Anspruch genommener Sozialleistungen pro Jahr",
435441
text: "Mit FörderFunke möchten wir erreichen, dass Sozialleistungen in Deutschland für alle zugänglich und leicht verständlich sind. Wir zeigen Ihnen, auf welche Sozialleistungen Sie Anspruch haben könnten und wie Sie sie beantragen können."
436442
},

src/ui/screens/landing-page/sections/fact/LandingPageFact.js

Lines changed: 55 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,37 @@
1-
import React from "react";
2-
import { Typography } from "@mui/material";
1+
import React, { useEffect, useState } from "react";
2+
import { Typography, Box } from "@mui/material";
3+
import { keyframes } from "@mui/system";
34
import LandingPageSectionWrapper from "../../components/LandingPageSectionWrapper";
45
import useTranslation from "@/ui/language/useTranslation";
56
import { HBox, VBox } from "@/ui/shared-components/LayoutBoxes";
67
import RegularButton from "@/ui/shared-components/buttons/RegularButton";
8+
import { useLanguageStore } from '@/ui/storage/useLanguageStore';
9+
10+
const flipIn = keyframes`
11+
from { transform: rotateX(-90deg); opacity: 0; }
12+
to { transform: rotateX(0deg); opacity: 1; }
13+
`;
14+
15+
const minWidth = {
16+
de: "14.5ch",
17+
de_es: "14.5ch",
18+
en: "19ch",
19+
};
720

821
const LandingPageFact = () => {
922
const { t } = useTranslation();
23+
const language = useLanguageStore((state) => state.language);
24+
25+
26+
const rotatingWord = t("home.fact.rotatingWords");
27+
const [index, setIndex] = useState(0);
28+
29+
useEffect(() => {
30+
const id = setInterval(() => {
31+
setIndex((i) => (i + 1) % rotatingWord.length);
32+
}, 2000);
33+
return () => clearInterval(id);
34+
});
1035

1136
return (
1237
<LandingPageSectionWrapper>
@@ -31,33 +56,52 @@ const LandingPageFact = () => {
3156
gap: 4,
3257
}}
3358
>
34-
<VBox sx={{ width: "100%", alignItems: { xs: "flex-start", md: "center" } }}>
59+
<VBox sx={{
60+
gap: 1,
61+
width: "100%",
62+
alignItems: { xs: "flex-start", md: "center" }
63+
}}>
3564
<Typography variant="h1" color="pink.main">
36-
15.000.000.000 €
65+
{t("home.fact.header")}
3766
</Typography>
3867
<Typography
3968
variant="h4"
4069
sx={{
70+
minWidth: minWidth[language] || "14.5ch",
4171
textAlign: { xs: "left", md: "center" },
4272
fontWeight: 400,
43-
maxWidth: "400px",
4473
color: "black.main",
74+
display: "flex",
75+
alignItems: "center",
76+
gap: 1,
77+
flexWrap: "wrap",
4578
}}
4679
>
47-
{t("home.fact.subHeader")}
80+
{t("home.fact.headerText")}{" "}
81+
<Box
82+
component="span"
83+
key={index}
84+
sx={{
85+
display: "inline-block",
86+
transformOrigin: "50% 80%",
87+
animation: `${flipIn} 600ms ease`,
88+
}}
89+
>
90+
<Typography variant="h2" sx={{ fontWeight: "bold", color: "pink.main" }}>
91+
{rotatingWord[index]}
92+
</Typography>
93+
</Box>
4894
</Typography>
4995
</VBox>
5096
<HBox>
51-
<Typography
52-
variant="body1"
53-
sx={{ textAlign: { xs: "left", md: "center" } }}
54-
>
97+
<Typography variant="body1" sx={{ textAlign: { xs: "left", md: "center" } }}>
5598
{t("home.fact.text")}
5699
</Typography>
57100
</HBox>
58101
</VBox>
102+
59103
<HBox>
60-
<RegularButton variant={'blackContained'} link={'/user-routing'} />
104+
<RegularButton variant={"blackContained"} link={"/user-routing"} />
61105
</HBox>
62106
</VBox>
63107
</VBox>

0 commit comments

Comments
 (0)