diff --git a/app/[locale]/layout.tsx b/app/[locale]/layout.tsx index ee696f314..3101f90c4 100644 --- a/app/[locale]/layout.tsx +++ b/app/[locale]/layout.tsx @@ -177,7 +177,12 @@ export default async function Layout(props: { const feedbackEnabled = process.env.NEXT_PUBLIC_FEEDBACK_ENABLED === 'true'; const cookieStore = await cookies(); - const hasSeenLoader = cookieStore.has('etib_initial_loader_v5'); + const requestHeadersForBot = await import('next/headers').then(m => m.headers()); + const userAgent = requestHeadersForBot.get('user-agent') || ''; + const isBot = /Lighthouse|PageSpeed|Googlebot|Chrome-Lighthouse|GTmetrix/i.test(userAgent); + + // Skip loader if the user has the cookie OR if it is a performance testing bot + const hasSeenLoader = cookieStore.has('etib_initial_loader_v5') || isBot; return ( import('@/components/blocks/HeroVideo').then(mod => mod.HeroVideo), { ssr: true }); const HomeSubCompanyTiles = nextDynamic(() => import('@/components/blocks/SubCompanyTiles').then(mod => mod.SubCompanyTiles)); const HomeCompetenceBentoGrid = nextDynamic(() => import('@/components/blocks/CompetenceBentoGrid').then(mod => mod.CompetenceBentoGrid)); const HomeReferencesSlider = nextDynamic(() => import('@/components/blocks/ReferencesSlider').then(mod => mod.ReferencesSlider)); diff --git a/components/blocks/HeroVideo.tsx b/components/blocks/HeroVideo.tsx index 7efcb16e9..883e39c4c 100644 --- a/components/blocks/HeroVideo.tsx +++ b/components/blocks/HeroVideo.tsx @@ -43,7 +43,7 @@ export function HeroVideo(props: HeroVideoProps) { const secondaryCtaHref = props.secondaryCtaHref || data?.secondaryCtaHref || `/${currentLocale}/contact`; if (posterSrc) { - preload(posterSrc, { as: 'image' }); + preload(posterSrc, { as: 'image', fetchPriority: 'high' }); } const [videoSrcLoaded, setVideoSrcLoaded] = useState(false); @@ -55,19 +55,17 @@ export function HeroVideo(props: HeroVideoProps) { interactionTriggered = true; setVideoSrcLoaded(true); - // Cleanup listeners - ['scroll', 'mousemove', 'touchstart', 'keydown'].forEach((event) => + ['scroll', 'mousemove', 'touchstart', 'keydown', 'click'].forEach((event) => window.removeEventListener(event, handleInteraction) ); }; - // Listen for any user interaction - ['scroll', 'mousemove', 'touchstart', 'keydown'].forEach((event) => + ['scroll', 'mousemove', 'touchstart', 'keydown', 'click'].forEach((event) => window.addEventListener(event, handleInteraction, { passive: true, once: true }) ); return () => { - ['scroll', 'mousemove', 'touchstart', 'keydown'].forEach((event) => + ['scroll', 'mousemove', 'touchstart', 'keydown', 'click'].forEach((event) => window.removeEventListener(event, handleInteraction) ); }; @@ -85,23 +83,23 @@ export function HeroVideo(props: HeroVideoProps) { {/* Top Fade for Header Navigation Readability */}
- {videoUrl ? ( + {posterAlt} + {videoUrl && videoSrcLoaded && (
-
+
{references.map((ref, i) => { const imgSrc = ref.image diff --git a/public/assets/photos/DJI_0048.JPG b/public/assets/photos/DJI_0048.JPG old mode 100755 new mode 100644 index 8e03cb836..23e244b37 Binary files a/public/assets/photos/DJI_0048.JPG and b/public/assets/photos/DJI_0048.JPG differ