fix(seo): resolve pagespeed insights performance and accessibility issues
- Add priority to hero image and replace css background-image with Next.js Image component for faster LCP - Add aria-label and aria-expanded to mobile menu button in Navbar - Add aria-label to social media links in Footer - Replace css background-image with Next.js Image component in CTA and Services sections
This commit is contained in:
+22
-13
@@ -119,10 +119,14 @@ export default function HomeClient({ lang, dict }: { lang: string; dict: any })
|
||||
|
||||
{/* ── Hero ── */}
|
||||
<section className="relative h-screen flex items-center justify-center overflow-hidden moy-grain">
|
||||
<div
|
||||
className="absolute inset-0 bg-cover bg-center bg-no-repeat scale-105"
|
||||
style={{ backgroundImage: `url(${HERO_BG})` }}
|
||||
>
|
||||
<div className="absolute inset-0 scale-105">
|
||||
<Image
|
||||
src={HERO_BG}
|
||||
alt="Moy Group Hero"
|
||||
fill
|
||||
priority
|
||||
className="object-cover object-center"
|
||||
/>
|
||||
<div className="absolute inset-0 bg-gradient-to-b from-black/50 via-black/30 to-black/60" />
|
||||
</div>
|
||||
|
||||
@@ -246,9 +250,12 @@ export default function HomeClient({ lang, dict }: { lang: string; dict: any })
|
||||
whileHover={{ y: -10 }}
|
||||
className="group relative h-80 overflow-hidden cursor-pointer"
|
||||
>
|
||||
<div
|
||||
className="absolute inset-0 bg-cover bg-center transition-transform duration-700 group-hover:scale-110"
|
||||
style={{ backgroundImage: `url(${service.bg})` }}
|
||||
<Image
|
||||
src={service.bg}
|
||||
alt={service.title}
|
||||
fill
|
||||
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 20vw"
|
||||
className="absolute inset-0 object-cover object-center transition-transform duration-700 group-hover:scale-110"
|
||||
/>
|
||||
<div className="absolute inset-0 bg-gradient-to-t from-[var(--color-moy-dark)] via-[var(--color-moy-dark)]/50 to-transparent" />
|
||||
|
||||
@@ -380,12 +387,14 @@ export default function HomeClient({ lang, dict }: { lang: string; dict: any })
|
||||
|
||||
{/* ── CTA Banner ── */}
|
||||
<section className="relative py-32 overflow-hidden bg-[var(--color-moy-dark)]">
|
||||
<div
|
||||
className="absolute inset-0 bg-cover bg-center opacity-20"
|
||||
style={{
|
||||
backgroundImage: `url(https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&q=60&w=1600)`,
|
||||
}}
|
||||
/>
|
||||
<div className="absolute inset-0 opacity-20">
|
||||
<Image
|
||||
src="https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&q=60&w=1600"
|
||||
alt="Moy Group CTA Background"
|
||||
fill
|
||||
className="object-cover object-center"
|
||||
/>
|
||||
</div>
|
||||
<div className="absolute inset-0 bg-gradient-to-r from-[var(--color-moy-dark)] via-transparent to-[var(--color-moy-dark)]" />
|
||||
|
||||
<div className="relative max-w-3xl mx-auto px-6 text-center">
|
||||
|
||||
Reference in New Issue
Block a user