This commit is contained in:
2026-07-10 13:27:29 +02:00
parent 5c48def4e1
commit 53bac4e2b4
35 changed files with 466 additions and 320 deletions

View File

@@ -1,12 +1,13 @@
import Link from 'next/link'
import type { Lang } from '@/lib/i18n'
import { englishSeoPageSlugs, germanSeoPageSlugs, getSeoPageBySlug } from '@/lib/seoPages'
import { getSeoPageBySlug } from '@/lib/seoPages'
import { spanishSeoPageProfiles } from '@/lib/spanishSeoPages'
import { seoTemplateCopy } from '@/lib/seoTemplateCopy'
import { siteConfig, hasIosStoreUrl, hasAndroidStoreUrl } from '@/lib/site'
interface SeoFooterProps {
locale: Lang
showMethodology?: boolean
}
function slugLinks(slugs: readonly string[]) {
@@ -16,21 +17,50 @@ function slugLinks(slugs: readonly string[]) {
.map((profile) => ({ href: profile.canonical, label: profile.h1 }))
}
export default function SeoFooter({ locale }: SeoFooterProps) {
const copy = seoTemplateCopy[locale].footer
const primarySlugs: Record<Exclude<Lang, 'es'>, readonly string[]> = {
de: [
'pflanzen-erkennen-app',
'pflanzen-bestimmen',
'pflanzen-krankheiten-erkennen',
'pflanzen-pflege-app',
'giess-erinnerung-app',
'pflanzen-erkennen-kostenlos',
],
en: [
'plant-identifier-app',
'identify-plant-photo',
'plant-disease-identifier',
'plant-care-app',
'plant-health-app',
'best-plant-identification-app',
],
}
const useCaseLinks = [
...slugLinks(englishSeoPageSlugs),
{ href: '/vs/picturethis', label: 'vs PictureThis' },
{ href: '/vs/plantum', label: 'vs Plantum' },
{ href: '/vs/inaturalist', label: 'vs iNaturalist' },
{ href: '/vs/google-lens', label: 'vs Google Lens' },
]
const germanLinks = slugLinks(germanSeoPageSlugs)
const spanishLinks = Object.values(spanishSeoPageProfiles).map((profile) => ({
href: profile.canonical,
label: profile.h1,
}))
const languageHubs = [
{ href: '/', label: 'Deutsch' },
{ href: '/en', label: 'English' },
{ href: '/es', label: 'Español' },
]
const languageTitles: Record<Lang, string> = {
de: 'Sprachen',
en: 'Languages',
es: 'Idiomas',
}
export default function SeoFooter({ locale, showMethodology = true }: SeoFooterProps) {
const copy = seoTemplateCopy[locale].footer
const primaryLinks = locale === 'es'
? Object.values(spanishSeoPageProfiles).map((profile) => ({
href: profile.canonical,
label: profile.h1,
}))
: slugLinks(primarySlugs[locale])
const primaryTitle = locale === 'de'
? copy.germanTitle
: locale === 'es'
? copy.spanishTitle
: copy.useCasesTitle
return (
<footer className="bg-ink-deep text-white pt-24 pb-8 font-body overflow-hidden" id="download">
@@ -95,7 +125,7 @@ export default function SeoFooter({ locale }: SeoFooterProps) {
<h4 className="text-[10px] font-bold tracking-widest text-primary-fixed mb-6 uppercase">{copy.productTitle}</h4>
<ul className="space-y-4 text-xs text-white/80">
<li><a href="#advantage" className="hover:text-white">{seoTemplateCopy[locale].nav.features}</a></li>
<li><a href="#methodology" className="hover:text-white">{seoTemplateCopy[locale].nav.tech}</a></li>
{showMethodology && <li><a href="#methodology" className="hover:text-white">{seoTemplateCopy[locale].nav.tech}</a></li>}
<li><a href="#download" className="hover:text-white">{seoTemplateCopy[locale].nav.download}</a></li>
<li><Link href="/support" className="hover:text-white">{copy.supportLabel}</Link></li>
</ul>
@@ -103,7 +133,7 @@ export default function SeoFooter({ locale }: SeoFooterProps) {
<div>
<h4 className="text-[10px] font-bold tracking-widest text-primary-fixed mb-6 uppercase">{copy.companyTitle}</h4>
<ul className="space-y-4 text-xs text-white/80">
<li><a href="#methodology" className="hover:text-white">{seoTemplateCopy[locale].nav.how}</a></li>
{showMethodology && <li><a href="#methodology" className="hover:text-white">{seoTemplateCopy[locale].nav.how}</a></li>}
<li><a href="#faq" className="hover:text-white">FAQ</a></li>
<li><Link href="/support" className="hover:text-white">{copy.supportLabel}</Link></li>
</ul>
@@ -119,11 +149,11 @@ export default function SeoFooter({ locale }: SeoFooterProps) {
</div>
{/* SEO-Link-Spalten (interne Verlinkung) */}
<div className="grid grid-cols-1 md:grid-cols-3 gap-12 mb-24">
<div className="grid grid-cols-1 md:grid-cols-2 gap-12 mb-24">
<div>
<h4 className="text-[10px] font-bold tracking-widest text-primary-fixed mb-6 uppercase">{copy.useCasesTitle}</h4>
<h4 className="text-[10px] font-bold tracking-widest text-primary-fixed mb-6 uppercase">{primaryTitle}</h4>
<ul className="space-y-3 text-xs text-white/70">
{useCaseLinks.map((link) => (
{primaryLinks.map((link) => (
<li key={link.href}>
<Link href={link.href} className="hover:text-white">{link.label}</Link>
</li>
@@ -131,19 +161,9 @@ export default function SeoFooter({ locale }: SeoFooterProps) {
</ul>
</div>
<div>
<h4 className="text-[10px] font-bold tracking-widest text-primary-fixed mb-6 uppercase">{copy.germanTitle}</h4>
<h4 className="text-[10px] font-bold tracking-widest text-primary-fixed mb-6 uppercase">{languageTitles[locale]}</h4>
<ul className="space-y-3 text-xs text-white/70">
{germanLinks.map((link) => (
<li key={link.href}>
<Link href={link.href} className="hover:text-white">{link.label}</Link>
</li>
))}
</ul>
</div>
<div>
<h4 className="text-[10px] font-bold tracking-widest text-primary-fixed mb-6 uppercase">{copy.spanishTitle}</h4>
<ul className="space-y-3 text-xs text-white/70">
{spanishLinks.map((link) => (
{languageHubs.map((link) => (
<li key={link.href}>
<Link href={link.href} className="hover:text-white">{link.label}</Link>
</li>