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) => { <Link
const Icon = link.icon href={repoLink.href}
return ( target="_blank"
<Link rel="noopener noreferrer"
key={link.label} className="group flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors"
href={link.href} aria-label={repoLink.label}
target={link.href.startsWith('http') ? '_blank' : undefined} >
rel={link.href.startsWith('http') ? 'noopener noreferrer' : undefined} <Github className="size-5" />
className="group flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors" <span className="text-sm">{repoLink.label}</span>
aria-label={link.label} <ArrowUpRight className="size-3 opacity-0 group-hover:opacity-100 transition-opacity" />
> </Link>
<Icon className="size-5" /> <span className="flex items-center gap-2 text-muted-foreground">
<span className="text-sm">{link.label}</span> <Mail className="size-5 shrink-0" />
{link.href.startsWith('http') && ( <span className="text-sm">{email ?? '[Emailadresse]'}</span>
<ArrowUpRight className="size-3 opacity-0 group-hover:opacity-100 transition-opacity" /> </span>
)}
</Link>
)
})}
</div> </div>
</div> </div>