Footer: E-Mail als reiner Text ohne mailto-Link (Scraper-Schutz)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Dieter Schlüter 2026-04-25 22:26:20 +02:00
commit 5f23c64c29

View file

@ -17,10 +17,7 @@ const legalLinks = [
] ]
export function Footer({ email }: { email?: string }) { export function Footer({ email }: { email?: string }) {
const socialLinks = [ const repoLink = { label: 'Forgejo', href: 'https://kitux.de/forgejo/dschlueter/jamulix-homepage', icon: Github }
{ label: 'Forgejo', href: 'https://kitux.de/forgejo/dschlueter/jamulix-homepage', icon: Github },
{ label: 'E-Mail', href: `mailto:${email ?? '[Emailadresse]'}`, icon: Mail },
]
const currentYear = new Date().getFullYear() const currentYear = new Date().getFullYear()
return ( return (
@ -48,26 +45,22 @@ export function Footer({ email }: { email?: string }) {
</p> </p>
{/* Social links */} {/* Social links */}
<div className="flex gap-4 mt-6"> <div className="flex flex-col gap-3 mt-6">
{socialLinks.map((link) => {
const Icon = link.icon
return (
<Link <Link
key={link.label} href={repoLink.href}
href={link.href} target="_blank"
target={link.href.startsWith('http') ? '_blank' : undefined} rel="noopener noreferrer"
rel={link.href.startsWith('http') ? 'noopener noreferrer' : undefined}
className="group flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors" className="group flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors"
aria-label={link.label} aria-label={repoLink.label}
> >
<Icon className="size-5" /> <Github className="size-5" />
<span className="text-sm">{link.label}</span> <span className="text-sm">{repoLink.label}</span>
{link.href.startsWith('http') && (
<ArrowUpRight className="size-3 opacity-0 group-hover:opacity-100 transition-opacity" /> <ArrowUpRight className="size-3 opacity-0 group-hover:opacity-100 transition-opacity" />
)}
</Link> </Link>
) <span className="flex items-center gap-2 text-muted-foreground">
})} <Mail className="size-5 shrink-0" />
<span className="text-sm">{email ?? '[Emailadresse]'}</span>
</span>
</div> </div>
</div> </div>