Fix: Add robust flex spacer for carousel padding, remove optimizeCss which broke LCP, and fix video opacity overlay
This commit is contained in:
@@ -98,7 +98,7 @@ export function HeroVideo(props: HeroVideoProps) {
|
|||||||
{videoUrl && (
|
{videoUrl && (
|
||||||
<video
|
<video
|
||||||
key={`${pathname}-${videoUrl}`}
|
key={`${pathname}-${videoUrl}`}
|
||||||
className="absolute inset-0 w-full h-full object-cover z-[2] pointer-events-none filter contrast-125 saturate-110 brightness-90"
|
className={`absolute inset-0 w-full h-full object-cover z-[2] pointer-events-none filter contrast-125 saturate-110 brightness-90 transition-opacity duration-1000 ${videoSrcLoaded ? 'opacity-100' : 'opacity-0'}`}
|
||||||
src={videoSrcLoaded ? videoUrl : undefined}
|
src={videoSrcLoaded ? videoUrl : undefined}
|
||||||
autoPlay
|
autoPlay
|
||||||
muted
|
muted
|
||||||
|
|||||||
@@ -131,9 +131,11 @@ export function ReferencesSlider(props: ReferencesSliderProps) {
|
|||||||
onMouseLeave={onMouseLeave}
|
onMouseLeave={onMouseLeave}
|
||||||
onMouseUp={onMouseUp}
|
onMouseUp={onMouseUp}
|
||||||
onMouseMove={onMouseMove}
|
onMouseMove={onMouseMove}
|
||||||
style={{ paddingLeft: paddingX, paddingRight: paddingX }}
|
className={`select-none flex overflow-x-auto pb-8 pt-4 [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden ${isDragging ? 'cursor-grabbing snap-none' : 'cursor-grab snap-x snap-mandatory'}`}
|
||||||
className={`select-none flex gap-6 overflow-x-auto pb-8 pt-4 [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden ${isDragging ? 'cursor-grabbing snap-none' : 'cursor-grab snap-x snap-mandatory'}`}
|
|
||||||
>
|
>
|
||||||
|
{/* Robust Left Spacer for Pixel-Perfect Alignment */}
|
||||||
|
<div style={{ minWidth: paddingX }} className="flex-shrink-0 pointer-events-none" aria-hidden="true" />
|
||||||
|
|
||||||
{references.map((ref, i) => {
|
{references.map((ref, i) => {
|
||||||
const imgSrc = ref.image
|
const imgSrc = ref.image
|
||||||
? (typeof ref.image === 'string' ? ref.image : ref.image.url)
|
? (typeof ref.image === 'string' ? ref.image : ref.image.url)
|
||||||
@@ -146,7 +148,7 @@ export function ReferencesSlider(props: ReferencesSliderProps) {
|
|||||||
whileInView={{ opacity: 1, x: 0 }}
|
whileInView={{ opacity: 1, x: 0 }}
|
||||||
viewport={{ once: true, margin: "-50px" }}
|
viewport={{ once: true, margin: "-50px" }}
|
||||||
transition={{ delay: i * 0.1, duration: 1.0, ease: [0.16, 1, 0.3, 1] }}
|
transition={{ delay: i * 0.1, duration: 1.0, ease: [0.16, 1, 0.3, 1] }}
|
||||||
className="flex-shrink-0 w-[320px] md:w-[480px] snap-start group pointer-events-auto"
|
className="flex-shrink-0 w-[320px] md:w-[480px] snap-start group pointer-events-auto mr-6"
|
||||||
>
|
>
|
||||||
<Link
|
<Link
|
||||||
href={`/${locale}/referenzen#${ref.slug}`}
|
href={`/${locale}/referenzen#${ref.slug}`}
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ const nextConfig = {
|
|||||||
pagesBufferLength: 2,
|
pagesBufferLength: 2,
|
||||||
},
|
},
|
||||||
experimental: {
|
experimental: {
|
||||||
optimizeCss: true,
|
|
||||||
staleTimes: {
|
staleTimes: {
|
||||||
dynamic: 0,
|
dynamic: 0,
|
||||||
static: 30,
|
static: 30,
|
||||||
|
|||||||
Reference in New Issue
Block a user