Skip to content

Commit 7d5beac

Browse files
committed
add newsletter and archive to the footer
Signed-off-by: Jessie Ssebuliba <jessiessebuliba@gmail.com>
1 parent 5c199ec commit 7d5beac

6 files changed

Lines changed: 38 additions & 3 deletions

File tree

locales/de.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"quoteTextFallback": "Die Vorlesung hat mir sehr gut gefallen. Hendrik hat es geschafft, ein komplexes Thema verständlich und praxisnah zu vermitteln. Besonders die praktischen Übungen haben mir geholfen, das Gelernte anzuwenden."
4444
},
4545
"newsletter": "Unser Newsletter",
46+
"newsletterArchive": "Newsletter Archiv",
4647
"404": {
4748
"notFound": "Seite nicht gefunden"
4849
},

locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"quoteTextFallback": "The lecture gave me a clear and practical introduction to a complex topic. The hands-on parts especially helped me apply what I learned."
4444
},
4545
"newsletter": "Newsletter",
46+
"newsletterArchive": "Newsletter Archive",
4647
"404": {
4748
"notFound": "Page Not Found"
4849
},

next.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ const nextConfig = {
3131
destination: '/de/support-care',
3232
permanent: true,
3333
},
34+
{
35+
source: '/newsletter-archive',
36+
destination: '/de/newsletter-archive',
37+
permanent: true,
38+
},
39+
{
40+
source: '/en/newsletter-archive',
41+
destination: '/de/newsletter-archive',
42+
permanent: true,
43+
},
3444
];
3545
},
3646
};

src/components/Footer.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ export default function Footer({ locale }: FooterProps) {
8484
</p>
8585
<div className="flex flex-col gap-5">
8686
{mainMenu.map((item, index) => {
87-
if (!item.visibleInFooter) return null;
87+
const typedItem = item as any;
88+
if (!typedItem.visibleInFooter) return null;
89+
if (typedItem.onlyLocale && typedItem.onlyLocale !== locale)
90+
return null;
8891
return (
8992
<Link
9093
key={index}

src/data-temp/mainMenu.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,17 @@
2121
"altI18nKey": "newsletterDescription",
2222
"link": "/newsletter/",
2323
"visibleInNavigation": false,
24-
"visibleInFooter": false
24+
"visibleInFooter": true,
25+
"onlyLocale": "de"
26+
},
27+
{
28+
"name": "Newsletter Archive",
29+
"i18nKey": "newsletterArchive",
30+
"altI18nKey": "newsletterArchiveDescription",
31+
"link": "/newsletter-archive/",
32+
"visibleInNavigation": false,
33+
"visibleInFooter": true,
34+
"onlyLocale": "de"
2535
},
2636
{
2737
"name": "Support & Care",

src/data/mainMenu.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,17 @@
2121
"altI18nKey": "newsletterDescription",
2222
"link": "/newsletter/",
2323
"visibleInNavigation": false,
24-
"visibleInFooter": false
24+
"visibleInFooter": true,
25+
"onlyLocale": "de"
26+
},
27+
{
28+
"name": "Newsletter Archive",
29+
"i18nKey": "newsletterArchive",
30+
"altI18nKey": "newsletterArchiveDescription",
31+
"link": "/newsletter-archive/",
32+
"visibleInNavigation": false,
33+
"visibleInFooter": true,
34+
"onlyLocale": "de"
2535
},
2636
{
2737
"name": "Support & Care",

0 commit comments

Comments
 (0)