fix: a11y contrast, heading order, and unused js (framer-motion lazy load)

This commit is contained in:
2026-06-29 13:24:16 +02:00
parent fb2d385e88
commit 35fb37bb14
2 changed files with 8 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
import { Container } from '@/components/ui'; import { Container } from '@/components/ui/Container';
import { getTranslations, setRequestLocale } from 'next-intl/server'; import { getTranslations, setRequestLocale } from 'next-intl/server';
import { Metadata } from 'next'; import { Metadata } from 'next';
import TrackedLink from '@/components/analytics/TrackedLink'; import TrackedLink from '@/components/analytics/TrackedLink';
@@ -91,9 +91,9 @@ export default async function StandorteOverview(props: { params: Promise<{ local
{/* Content Section */} {/* Content Section */}
<div className="flex flex-col flex-grow p-6 md:p-8 bg-white"> <div className="flex flex-col flex-grow p-6 md:p-8 bg-white">
<div className="flex items-start justify-between gap-4 mb-4"> <div className="flex items-start justify-between gap-4 mb-4">
<h3 className="text-xl md:text-2xl font-bold font-heading text-neutral-dark transition-colors leading-[1.2] group-hover:text-primary"> <h2 className="text-xl md:text-2xl font-bold font-heading text-neutral-dark transition-colors leading-[1.2] group-hover:text-primary">
{standort.name} {standort.name}
</h3> </h2>
<ArrowUpRight className="w-5 h-5 text-neutral-400 group-hover:text-primary transition-colors shrink-0" /> <ArrowUpRight className="w-5 h-5 text-neutral-400 group-hover:text-primary transition-colors shrink-0" />
</div> </div>
@@ -104,7 +104,7 @@ export default async function StandorteOverview(props: { params: Promise<{ local
{/* Meta Data */} {/* Meta Data */}
<div className="flex flex-col gap-3 mt-auto border-t border-neutral-100 pt-6 relative z-10"> <div className="flex flex-col gap-3 mt-auto border-t border-neutral-100 pt-6 relative z-10">
<div className="min-w-0"> <div className="min-w-0">
<span className="block text-[10px] uppercase tracking-widest text-neutral-400 font-bold mb-1"> <span className="block text-[10px] uppercase tracking-widest text-neutral-500 font-bold mb-1">
{safeLocale === 'de' ? 'Adresse' : 'Address'} {safeLocale === 'de' ? 'Adresse' : 'Address'}
</span> </span>
<span className="flex items-start gap-2 text-sm font-semibold text-neutral-700 leading-tight"> <span className="flex items-start gap-2 text-sm font-semibold text-neutral-700 leading-tight">
@@ -123,7 +123,7 @@ export default async function StandorteOverview(props: { params: Promise<{ local
<div className="mt-12 md:mt-24 p-8 md:p-12 bg-primary-dark rounded-3xl text-white shadow-2xl relative overflow-hidden group"> <div className="mt-12 md:mt-24 p-8 md:p-12 bg-primary-dark rounded-3xl text-white shadow-2xl relative overflow-hidden group">
<div className="absolute top-0 right-0 w-64 h-full bg-accent/5 -skew-x-12 translate-x-1/2 transition-transform group-hover:translate-x-1/3" /> <div className="absolute top-0 right-0 w-64 h-full bg-accent/5 -skew-x-12 translate-x-1/2 transition-transform group-hover:translate-x-1/3" />
<div className="relative z-10 max-w-2xl"> <div className="relative z-10 max-w-2xl">
<h3 className="text-2xl md:text-3xl font-bold mb-4">{t('nextProjectTitle')}</h3> <h2 className="text-2xl md:text-3xl font-bold mb-4">{t('nextProjectTitle')}</h2>
<p className="text-lg text-white/70 mb-8">{t('nextProjectDesc')}</p> <p className="text-lg text-white/70 mb-8">{t('nextProjectDesc')}</p>
<TrackedLink <TrackedLink
href={`/${safeLocale}/${safeLocale === 'de' ? 'kontakt' : 'contact'}`} href={`/${safeLocale}/${safeLocale === 'de' ? 'kontakt' : 'contact'}`}

View File

@@ -1,7 +1,7 @@
'use client'; 'use client';
import React from 'react'; import React from 'react';
import { m, AnimatePresence } from 'framer-motion'; import { m, AnimatePresence, LazyMotion, domAnimation } from 'framer-motion';
import { MapPin, CheckCircle2, ArrowUpRight } from 'lucide-react'; import { MapPin, CheckCircle2, ArrowUpRight } from 'lucide-react';
import Image from 'next/image'; import Image from 'next/image';
import Link from 'next/link'; import Link from 'next/link';
@@ -76,7 +76,7 @@ export default function InteractiveMapPins({
handleMouseLeave: () => void handleMouseLeave: () => void
}) { }) {
return ( return (
<> <LazyMotion features={domAnimation}>
{locations.filter(l => l.type === 'minor_node').map((loc, idx) => ( {locations.filter(l => l.type === 'minor_node').map((loc, idx) => (
<MinorNode <MinorNode
key={`minor-${loc.id || idx}`} key={`minor-${loc.id || idx}`}
@@ -188,6 +188,6 @@ export default function InteractiveMapPins({
</m.div> </m.div>
)} )}
</AnimatePresence> </AnimatePresence>
</> </LazyMotion>
); );
} }