Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 490f216502 | |||
| 3674e21fda | |||
| 298b81713c | |||
| 3b438de94d | |||
| aff47de037 | |||
| 85d366cfe2 | |||
| 5dc2a9fd37 | |||
| 57e5431e2a |
@@ -39,7 +39,6 @@ export function HeroVideo(props: HeroVideoProps) {
|
||||
|
||||
const posterSrc = props.backgroundImage?.url || props.posterImage?.url || data?.posterImage?.url || defaultPoster;
|
||||
const posterAlt = props.backgroundImage?.alt || data?.posterImage?.alt || "E-TIB Gruppe Baustelle";
|
||||
const blurDataURL = (placeholders as Record<string, string>)[posterSrc] || undefined;
|
||||
|
||||
const ctaLabel = props.ctaLabel || props.linkText || data?.ctaLabel || 'Unternehmen entdecken';
|
||||
const ctaHref = props.ctaHref || props.linkHref || data?.ctaHref || '#unternehmen';
|
||||
@@ -87,12 +86,9 @@ export function HeroVideo(props: HeroVideoProps) {
|
||||
src={posterSrc}
|
||||
alt={posterAlt}
|
||||
fill
|
||||
unoptimized
|
||||
className="object-cover z-[1] pointer-events-none filter contrast-125 saturate-110 brightness-90"
|
||||
sizes="100vw"
|
||||
priority
|
||||
placeholder={blurDataURL ? "blur" : "empty"}
|
||||
blurDataURL={blurDataURL}
|
||||
/>
|
||||
|
||||
{/* Render video on top if available, but defer src to avoid blocking LCP */}
|
||||
|
||||
@@ -46,22 +46,6 @@ export function ReferencesSlider(props: ReferencesSliderProps) {
|
||||
const scrollLeftRef = React.useRef(0);
|
||||
const isDraggingRef = React.useRef(false);
|
||||
const [isDragging, setIsDragging] = React.useState(false);
|
||||
const [paddingX, setPaddingX] = React.useState(24);
|
||||
|
||||
React.useEffect(() => {
|
||||
const updatePadding = () => {
|
||||
const containerEl = document.querySelector('#referenzen .container');
|
||||
if (containerEl) {
|
||||
const rect = containerEl.getBoundingClientRect();
|
||||
const computedStyle = window.getComputedStyle(containerEl);
|
||||
const pLeft = parseFloat(computedStyle.paddingLeft || '0');
|
||||
setPaddingX(rect.left + pLeft);
|
||||
}
|
||||
};
|
||||
updatePadding();
|
||||
window.addEventListener('resize', updatePadding);
|
||||
return () => window.removeEventListener('resize', updatePadding);
|
||||
}, []);
|
||||
|
||||
const badge = props.badge || data?.badge || t('badge');
|
||||
const title = props.title || data?.title || t('title');
|
||||
@@ -126,24 +110,17 @@ export function ReferencesSlider(props: ReferencesSliderProps) {
|
||||
<div className="container relative z-10">
|
||||
<div className="absolute right-0 top-0 bottom-0 w-16 bg-gradient-to-l from-neutral-dark to-transparent z-20 md:hidden pointer-events-none" />
|
||||
|
||||
{/* Pure CSS Full-Bleed Alignment Container */}
|
||||
<div style={{ '--offset': 'calc(50vw - 50%)' } as React.CSSProperties}>
|
||||
<div
|
||||
ref={containerRef}
|
||||
onMouseDown={onMouseDown}
|
||||
onMouseLeave={onMouseLeave}
|
||||
onMouseUp={onMouseUp}
|
||||
onMouseMove={onMouseMove}
|
||||
style={{
|
||||
marginLeft: 'calc(-1 * var(--offset))',
|
||||
marginRight: 'calc(-1 * var(--offset))',
|
||||
paddingLeft: 'var(--offset)',
|
||||
paddingRight: 'var(--offset)',
|
||||
scrollPaddingLeft: 'var(--offset)',
|
||||
}}
|
||||
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'}`}
|
||||
>
|
||||
{references.map((ref, i) => {
|
||||
{/* Carousel: stays inside container for left alignment, breaks right to viewport edge */}
|
||||
<div
|
||||
ref={containerRef}
|
||||
onMouseDown={onMouseDown}
|
||||
onMouseLeave={onMouseLeave}
|
||||
onMouseUp={onMouseUp}
|
||||
onMouseMove={onMouseMove}
|
||||
style={{ marginRight: 'calc(-50vw + 50%)' }}
|
||||
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'}`}
|
||||
>
|
||||
{references.map((ref, i) => {
|
||||
const imgSrc = ref.image
|
||||
? (typeof ref.image === 'string' ? ref.image : ref.image.url)
|
||||
: fallbacks[i % fallbacks.length];
|
||||
@@ -155,7 +132,7 @@ export function ReferencesSlider(props: ReferencesSliderProps) {
|
||||
whileInView={{ opacity: 1, x: 0 }}
|
||||
viewport={{ once: true, margin: "-50px" }}
|
||||
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 mr-6"
|
||||
className="flex-shrink-0 w-[320px] md:w-[480px] snap-start group pointer-events-auto"
|
||||
>
|
||||
<Link
|
||||
href={`/${locale}/referenzen#${ref.slug}`}
|
||||
@@ -189,6 +166,8 @@ export function ReferencesSlider(props: ReferencesSliderProps) {
|
||||
</motion.div>
|
||||
);
|
||||
})}
|
||||
{/* Right padding spacer so last card doesn't clip at viewport edge */}
|
||||
<div className="flex-shrink-0 w-6" aria-hidden="true" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ export function MobileBottomNav({ navLinks, currentLocale }: MobileBottomNavProp
|
||||
</motion.div>
|
||||
<motion.span
|
||||
animate={{ y: isActive ? 0 : 2 }}
|
||||
className="text-[9px] font-bold mt-1 tracking-wide"
|
||||
className="text-[10px] font-bold mt-1 tracking-wide"
|
||||
>
|
||||
{item.label}
|
||||
</motion.span>
|
||||
@@ -144,7 +144,7 @@ export function MobileBottomNav({ navLinks, currentLocale }: MobileBottomNavProp
|
||||
key={item.label}
|
||||
onClick={() => setIsFlyoutOpen(!isFlyoutOpen)}
|
||||
className={`relative flex flex-col items-center justify-center flex-1 h-[62px] transition-colors duration-300 select-none w-full focus:outline-none ${
|
||||
isActive ? 'text-primary' : 'text-neutral-600 hover:text-neutral-900'
|
||||
isActive ? 'text-primary' : 'text-neutral-800 hover:text-neutral-900'
|
||||
}`}
|
||||
style={{ WebkitTapHighlightColor: 'transparent', touchAction: 'manipulation' }}
|
||||
>
|
||||
@@ -159,7 +159,7 @@ export function MobileBottomNav({ navLinks, currentLocale }: MobileBottomNavProp
|
||||
href={mappedUrl}
|
||||
onClick={() => setIsFlyoutOpen(false)}
|
||||
className={`relative flex flex-col items-center justify-center flex-1 h-[62px] transition-colors duration-300 select-none ${
|
||||
isActive ? 'text-primary' : 'text-neutral-600 hover:text-neutral-900'
|
||||
isActive ? 'text-primary' : 'text-neutral-800 hover:text-neutral-900'
|
||||
}`}
|
||||
style={{ WebkitTapHighlightColor: 'transparent', touchAction: 'manipulation' }}
|
||||
>
|
||||
|
||||
@@ -15,7 +15,6 @@ const nextConfig = {
|
||||
pagesBufferLength: 2,
|
||||
},
|
||||
experimental: {
|
||||
optimizeCss: true,
|
||||
staleTimes: {
|
||||
dynamic: 0,
|
||||
static: 30,
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
"prepare": "husky",
|
||||
"preinstall": "npx only-allow pnpm"
|
||||
},
|
||||
"version": "2.2.40",
|
||||
"version": "2.2.44",
|
||||
"pnpm": {
|
||||
"onlyBuiltDependencies": [
|
||||
"@parcel/watcher",
|
||||
|
||||
|
Before Width: | Height: | Size: 1007 KiB After Width: | Height: | Size: 360 KiB |
|
Before Width: | Height: | Size: 777 KiB After Width: | Height: | Size: 297 KiB |
|
Before Width: | Height: | Size: 522 KiB After Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 412 KiB After Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 488 KiB After Width: | Height: | Size: 161 KiB |
|
Before Width: | Height: | Size: 574 KiB After Width: | Height: | Size: 174 KiB |
|
Before Width: | Height: | Size: 447 KiB After Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 570 KiB After Width: | Height: | Size: 172 KiB |
|
Before Width: | Height: | Size: 304 KiB After Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 304 KiB After Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 342 KiB After Width: | Height: | Size: 121 KiB |
|
Before Width: | Height: | Size: 322 KiB After Width: | Height: | Size: 134 KiB |
|
Before Width: | Height: | Size: 540 KiB After Width: | Height: | Size: 198 KiB |
|
Before Width: | Height: | Size: 358 KiB After Width: | Height: | Size: 145 KiB |
|
Before Width: | Height: | Size: 618 KiB After Width: | Height: | Size: 236 KiB |
|
Before Width: | Height: | Size: 434 KiB After Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 336 KiB After Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 422 KiB After Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 702 KiB After Width: | Height: | Size: 124 KiB |
|
Before Width: | Height: | Size: 380 KiB After Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 406 KiB After Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 664 KiB After Width: | Height: | Size: 140 KiB |
|
Before Width: | Height: | Size: 546 KiB After Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 636 KiB After Width: | Height: | Size: 124 KiB |
|
Before Width: | Height: | Size: 877 KiB After Width: | Height: | Size: 166 KiB |
|
Before Width: | Height: | Size: 894 KiB After Width: | Height: | Size: 167 KiB |
|
Before Width: | Height: | Size: 402 KiB After Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 755 KiB After Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 306 KiB After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 686 KiB After Width: | Height: | Size: 119 KiB |
|
Before Width: | Height: | Size: 660 KiB After Width: | Height: | Size: 120 KiB |
|
Before Width: | Height: | Size: 606 KiB After Width: | Height: | Size: 120 KiB |
|
Before Width: | Height: | Size: 432 KiB After Width: | Height: | Size: 86 KiB |
|
Before Width: | Height: | Size: 314 KiB After Width: | Height: | Size: 128 KiB |
|
Before Width: | Height: | Size: 345 KiB After Width: | Height: | Size: 139 KiB |
|
Before Width: | Height: | Size: 597 KiB After Width: | Height: | Size: 230 KiB |
|
Before Width: | Height: | Size: 493 KiB After Width: | Height: | Size: 200 KiB |
|
Before Width: | Height: | Size: 371 KiB After Width: | Height: | Size: 147 KiB |
|
Before Width: | Height: | Size: 240 KiB After Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 325 KiB After Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 629 KiB After Width: | Height: | Size: 245 KiB |
|
Before Width: | Height: | Size: 659 KiB After Width: | Height: | Size: 263 KiB |
|
Before Width: | Height: | Size: 664 KiB After Width: | Height: | Size: 253 KiB |
|
Before Width: | Height: | Size: 648 KiB After Width: | Height: | Size: 256 KiB |
|
Before Width: | Height: | Size: 710 KiB After Width: | Height: | Size: 138 KiB |
|
Before Width: | Height: | Size: 844 KiB After Width: | Height: | Size: 157 KiB |
|
Before Width: | Height: | Size: 655 KiB After Width: | Height: | Size: 129 KiB |
|
Before Width: | Height: | Size: 771 KiB After Width: | Height: | Size: 162 KiB |
|
Before Width: | Height: | Size: 919 KiB After Width: | Height: | Size: 174 KiB |
|
Before Width: | Height: | Size: 577 KiB After Width: | Height: | Size: 101 KiB |
|
Before Width: | Height: | Size: 675 KiB After Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 689 KiB After Width: | Height: | Size: 141 KiB |
|
Before Width: | Height: | Size: 614 KiB After Width: | Height: | Size: 109 KiB |
|
Before Width: | Height: | Size: 895 KiB After Width: | Height: | Size: 174 KiB |
|
Before Width: | Height: | Size: 315 KiB After Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 346 KiB After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 404 KiB After Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 248 KiB After Width: | Height: | Size: 163 KiB |
|
Before Width: | Height: | Size: 664 KiB After Width: | Height: | Size: 142 KiB |
|
Before Width: | Height: | Size: 633 KiB After Width: | Height: | Size: 127 KiB |
|
Before Width: | Height: | Size: 543 KiB After Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 468 KiB After Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 492 KiB After Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 384 KiB After Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 317 KiB After Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 328 KiB After Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 442 KiB After Width: | Height: | Size: 193 KiB |
|
Before Width: | Height: | Size: 218 KiB After Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 345 KiB After Width: | Height: | Size: 133 KiB |
|
Before Width: | Height: | Size: 355 KiB After Width: | Height: | Size: 148 KiB |
|
Before Width: | Height: | Size: 336 KiB After Width: | Height: | Size: 134 KiB |
|
Before Width: | Height: | Size: 346 KiB After Width: | Height: | Size: 141 KiB |
|
Before Width: | Height: | Size: 277 KiB After Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 276 KiB After Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 305 KiB After Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 216 KiB After Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 220 KiB After Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 376 KiB After Width: | Height: | Size: 157 KiB |
|
Before Width: | Height: | Size: 250 KiB After Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 256 KiB After Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 326 KiB After Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 408 KiB After Width: | Height: | Size: 138 KiB |
|
Before Width: | Height: | Size: 339 KiB After Width: | Height: | Size: 125 KiB |
|
Before Width: | Height: | Size: 353 KiB After Width: | Height: | Size: 131 KiB |
|
Before Width: | Height: | Size: 197 KiB After Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 206 KiB After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 290 KiB After Width: | Height: | Size: 120 KiB |
|
Before Width: | Height: | Size: 285 KiB After Width: | Height: | Size: 113 KiB |
|
Before Width: | Height: | Size: 218 KiB After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 623 KiB After Width: | Height: | Size: 227 KiB |
|
Before Width: | Height: | Size: 774 KiB After Width: | Height: | Size: 288 KiB |
|
Before Width: | Height: | Size: 601 KiB After Width: | Height: | Size: 216 KiB |
|
Before Width: | Height: | Size: 238 KiB After Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 233 KiB After Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 252 KiB After Width: | Height: | Size: 87 KiB |