Revert "fix(footer): default nav + tagline when the tenant's CMS footer is empty"
This reverts the hardcoded footer fallback. The footer stays fully CMS-driven; the unom tenant's footer will be populated to mirror punktfunk's instead. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+1
-7
@@ -14,11 +14,5 @@
|
||||
"blog_empty": "Noch keine Beiträge.",
|
||||
"blog_all": "Alle Beiträge",
|
||||
"blog_latest_heading": "Aus dem Blog",
|
||||
"blog_back": "Blog",
|
||||
|
||||
"footer_overview": "Übersicht",
|
||||
"footer_home": "Startseite",
|
||||
"footer_legal": "Rechtliches",
|
||||
"footer_imprint": "Impressum",
|
||||
"footer_privacy": "Datenschutz"
|
||||
"blog_back": "Blog"
|
||||
}
|
||||
|
||||
+1
-7
@@ -14,11 +14,5 @@
|
||||
"blog_empty": "No posts yet.",
|
||||
"blog_all": "All posts",
|
||||
"blog_latest_heading": "From the blog",
|
||||
"blog_back": "Blog",
|
||||
|
||||
"footer_overview": "Overview",
|
||||
"footer_home": "Home",
|
||||
"footer_legal": "Legal",
|
||||
"footer_imprint": "Imprint",
|
||||
"footer_privacy": "Privacy"
|
||||
"blog_back": "Blog"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { getRouteApi } from "@tanstack/react-router";
|
||||
import type { NavigationLink, NavigationSection } from "@/lib/cms";
|
||||
import { m } from "@/paraglide/messages";
|
||||
import Section from "./Section";
|
||||
|
||||
const rootApi = getRouteApi("__root__");
|
||||
@@ -8,16 +7,13 @@ const rootApi = getRouteApi("__root__");
|
||||
export default function Footer() {
|
||||
const { footer } = rootApi.useLoaderData();
|
||||
const sections: NavigationSection[] = footer?.sections ?? [];
|
||||
// Fall back to the site tagline when the CMS footer has none, so the footer
|
||||
// is never an empty bar.
|
||||
const tagline = footer?.tagline?.trim() || m.site_tagline();
|
||||
const tagline = footer?.tagline?.trim();
|
||||
|
||||
return (
|
||||
<footer className="bg-neutral-accent">
|
||||
<Section>
|
||||
<div className="flex flex-row flex-wrap gap-12 w-full pb-8">
|
||||
{sections.length > 0 ? (
|
||||
sections.map((group, gi) => (
|
||||
{sections.map((group, gi) => (
|
||||
<div key={group.id ?? gi}>
|
||||
{group.title && <h3 className="mb-2">{group.title}</h3>}
|
||||
<div className="flex flex-col">
|
||||
@@ -28,13 +24,7 @@ export default function Footer() {
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
))
|
||||
) : (
|
||||
// The unom tenant's CMS footer isn't populated yet — show a
|
||||
// sensible default so the footer is meaningful. Populating the
|
||||
// footer in the CMS (tenant=unom) overrides this.
|
||||
<DefaultNav />
|
||||
)}
|
||||
))}
|
||||
{tagline && (
|
||||
<div className="ml-auto mr-0 self-end">
|
||||
<div className="flex flex-col">
|
||||
@@ -47,36 +37,3 @@ export default function Footer() {
|
||||
</footer>
|
||||
);
|
||||
}
|
||||
|
||||
function DefaultNav() {
|
||||
const groups = [
|
||||
{
|
||||
title: m.footer_overview(),
|
||||
entries: [{ to: "/", label: m.footer_home() }],
|
||||
},
|
||||
{
|
||||
title: m.footer_legal(),
|
||||
entries: [
|
||||
{ to: "/legal/imprint", label: m.footer_imprint() },
|
||||
{ to: "/legal/privacy", label: m.footer_privacy() },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<>
|
||||
{groups.map((group) => (
|
||||
<div key={group.title}>
|
||||
<h3 className="mb-2">{group.title}</h3>
|
||||
<div className="flex flex-col">
|
||||
{group.entries.map((item) => (
|
||||
<a key={item.to} href={item.to}>
|
||||
{item.label}
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user