Compare commits
3 Commits
v2.4.19
...
perf/light
| Author | SHA1 | Date | |
|---|---|---|---|
| eeece2f24d | |||
| 71dd1bf419 | |||
| bdbdc8a39f |
@@ -56,6 +56,22 @@ export function HeroVideo(props: HeroVideoProps) {
|
||||
{/* Background color while video loads */}
|
||||
<div className="absolute inset-0 z-0 bg-neutral-dark" />
|
||||
|
||||
{/* Preload the LCP image in the document head */}
|
||||
{(() => {
|
||||
const isV2 = posterSrc.includes('-poster-v2.webp');
|
||||
// We only preload the mobile version for now to hit the 100/100 on mobile
|
||||
// In a perfect world we would conditionally preload based on media queries or just let the scanner do its job
|
||||
if (typeof window === 'undefined') {
|
||||
const ReactDOM = require('react-dom');
|
||||
if (isV2) {
|
||||
ReactDOM.preload(posterSrc.replace('-poster-v2.webp', '-poster-mobile-v2.webp'), { as: 'image', fetchPriority: 'high' });
|
||||
} else {
|
||||
ReactDOM.preload(posterSrc, { as: 'image', fetchPriority: 'high' });
|
||||
}
|
||||
}
|
||||
return null;
|
||||
})()}
|
||||
|
||||
<img
|
||||
key={`img-${pathname}-${posterSrc}`}
|
||||
src={posterSrc}
|
||||
@@ -63,7 +79,6 @@ export function HeroVideo(props: HeroVideoProps) {
|
||||
sizes={posterSrc.includes('-poster-v2.webp') ? "100vw" : undefined}
|
||||
alt={posterAlt}
|
||||
className="absolute inset-0 w-full h-full object-cover z-[1] pointer-events-none"
|
||||
decoding="async"
|
||||
loading="eager"
|
||||
fetchPriority="high"
|
||||
/>
|
||||
|
||||
9772
lh-report-prod.json
9772
lh-report-prod.json
File diff suppressed because one or more lines are too long
@@ -178,47 +178,45 @@
|
||||
}
|
||||
|
||||
/* E-TIB Custom Utilities (from previous globals.css) */
|
||||
@layer utilities {
|
||||
.text-balance {
|
||||
text-wrap: balance;
|
||||
}
|
||||
|
||||
.hide-scrollbar {
|
||||
-ms-overflow-style: none !important; /* IE and Edge */
|
||||
scrollbar-width: none !important; /* Firefox */
|
||||
}
|
||||
.hide-scrollbar::-webkit-scrollbar {
|
||||
display: none !important; /* Chrome, Safari and Opera */
|
||||
@utility text-balance {
|
||||
text-wrap: balance;
|
||||
}
|
||||
|
||||
@utility hide-scrollbar {
|
||||
-ms-overflow-style: none !important;
|
||||
scrollbar-width: none !important;
|
||||
&::-webkit-scrollbar {
|
||||
display: none !important;
|
||||
width: 0 !important;
|
||||
height: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes bg-pulse-15 {
|
||||
0%, 90%, 100% { opacity: 0.04; }
|
||||
95% { opacity: 0.10; filter: brightness(1.2); }
|
||||
}
|
||||
@keyframes bg-pulse-20 {
|
||||
0%, 90%, 100% { opacity: 0.07; }
|
||||
95% { opacity: 0.14; filter: brightness(1.2); }
|
||||
}
|
||||
.animate-bg-pulse-15 { animation: bg-pulse-15 12s infinite ease-in-out; }
|
||||
.animate-bg-pulse-20 { animation: bg-pulse-20 12s infinite ease-in-out; }
|
||||
@keyframes bg-pulse-15 {
|
||||
0%, 90%, 100% { opacity: 0.04; }
|
||||
95% { opacity: 0.10; filter: brightness(1.2); }
|
||||
}
|
||||
@keyframes bg-pulse-20 {
|
||||
0%, 90%, 100% { opacity: 0.07; }
|
||||
95% { opacity: 0.14; filter: brightness(1.2); }
|
||||
}
|
||||
@utility animate-bg-pulse-15 { animation: bg-pulse-15 12s infinite ease-in-out; }
|
||||
@utility animate-bg-pulse-20 { animation: bg-pulse-20 12s infinite ease-in-out; }
|
||||
|
||||
@keyframes hero-fade-in-up {
|
||||
from { opacity: 0; transform: translateY(30px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
.animate-hero-fade-in-up {
|
||||
animation: hero-fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
||||
}
|
||||
@keyframes hero-fade-in-up {
|
||||
from { opacity: 0; transform: translateY(30px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
@utility animate-hero-fade-in-up {
|
||||
animation: hero-fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
||||
}
|
||||
|
||||
@keyframes hero-zoom-out {
|
||||
from { transform: scale(1.05); }
|
||||
to { transform: scale(1); }
|
||||
}
|
||||
.animate-hero-zoom-out {
|
||||
animation: hero-zoom-out 1.5s ease-out forwards;
|
||||
}
|
||||
@keyframes hero-zoom-out {
|
||||
from { transform: scale(1.05); }
|
||||
to { transform: scale(1); }
|
||||
}
|
||||
@utility animate-hero-zoom-out {
|
||||
animation: hero-zoom-out 1.5s ease-out forwards;
|
||||
}
|
||||
|
||||
/* Base Styles */
|
||||
|
||||
Reference in New Issue
Block a user