Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 23s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🧪 QA (push) Successful in 1m6s
Build & Deploy / 🏗️ Build (push) Failing after 2m52s
Build & Deploy / 🔔 Notify (push) Successful in 1s
- Removed confusing SVG lines from map - Restored distinct clickable markers for major references - Fixed corepack failing to install pnpm v11 in Docker by explicitly forcing v10 - Added direct port mapping 3001:3001 to bypass proxy issues
103 lines
4.6 KiB
TypeScript
103 lines
4.6 KiB
TypeScript
'use client';
|
|
|
|
import React, { useRef } from 'react';
|
|
import { motion, useScroll, useTransform } from 'framer-motion';
|
|
import { useLocale } from 'next-intl';
|
|
|
|
export function ScaleOfImpact() {
|
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
const locale = useLocale();
|
|
|
|
// Track scroll progress through this container
|
|
const { scrollYProgress } = useScroll({
|
|
target: containerRef,
|
|
offset: ["start end", "end start"]
|
|
});
|
|
|
|
// Map scroll progress to SVG path length
|
|
const pathLength = useTransform(scrollYProgress, [0.2, 0.8], [0, 1]);
|
|
|
|
// Opacity for the massive background numbers
|
|
const bgOpacity = useTransform(scrollYProgress, [0.1, 0.4, 0.8, 1], [0, 0.1, 0.1, 0]);
|
|
|
|
return (
|
|
<div
|
|
ref={containerRef}
|
|
className="relative w-full min-h-[70vh] bg-[#050B14] flex flex-col items-center justify-center overflow-hidden border-y border-neutral-800"
|
|
>
|
|
{/* Massive Watermark Numbers */}
|
|
<motion.div
|
|
style={{ opacity: bgOpacity }}
|
|
className="absolute inset-0 flex flex-col items-center justify-center pointer-events-none select-none overflow-hidden mix-blend-overlay"
|
|
>
|
|
<div className="font-heading font-black text-[20vw] leading-none text-white opacity-20 whitespace-nowrap">
|
|
<span className="font-mono tracking-tighter">474.932</span>
|
|
</div>
|
|
</motion.div>
|
|
|
|
{/* Foreground Content */}
|
|
<div className="relative z-10 container max-w-7xl mx-auto px-4 flex flex-col items-center text-center">
|
|
|
|
<h2 className="text-3xl md:text-5xl font-heading font-extrabold text-white mb-6 tracking-tight">
|
|
{locale === 'en' ? (
|
|
<>An infrastructure <br className="md:hidden"/> that connects the country.</>
|
|
) : (
|
|
<>Eine Infrastruktur, <br className="md:hidden"/> die das Land verbindet.</>
|
|
)}
|
|
</h2>
|
|
|
|
<p className="text-white/60 text-lg md:text-xl max-w-2xl font-medium mb-16">
|
|
{locale === 'en'
|
|
? "We don't just talk about the energy transition. We build it. In the last 36 months alone, we have completed a route that stretches from our headquarters in Guben all the way to Munich."
|
|
: "Wir sprechen nicht nur über die Energiewende. Wir bauen sie. Allein in den letzten 36 Monaten haben wir eine Strecke realisiert, die von unserem Hauptsitz in Guben bis nach München reicht."
|
|
}
|
|
</p>
|
|
|
|
{/* Abstract SVG Line Animation */}
|
|
<div className="w-full max-w-4xl h-32 relative">
|
|
<svg
|
|
width="100%"
|
|
height="100%"
|
|
viewBox="0 0 1000 100"
|
|
preserveAspectRatio="none"
|
|
className="absolute inset-0"
|
|
>
|
|
{/* Background dim line */}
|
|
<path
|
|
d="M0,50 Q250,0 500,50 T1000,50"
|
|
fill="none"
|
|
stroke="rgba(255,255,255,0.05)"
|
|
strokeWidth="2"
|
|
/>
|
|
{/* Glowing animated line */}
|
|
<motion.path
|
|
d="M0,50 Q250,0 500,50 T1000,50"
|
|
fill="none"
|
|
stroke="#82ED20" // primary color
|
|
strokeWidth="4"
|
|
style={{ pathLength }}
|
|
className="drop-shadow-[0_0_15px_rgba(130,237,32,0.8)]"
|
|
/>
|
|
</svg>
|
|
</div>
|
|
|
|
{/* Static Data Grid (No jumping text) */}
|
|
<div className="grid grid-cols-1 md:grid-cols-3 gap-8 md:gap-16 w-full max-w-4xl mt-12">
|
|
<div className="flex flex-col items-center">
|
|
<div className="font-mono text-5xl md:text-6xl font-black text-white tracking-tighter mb-2">100<span className="text-primary">+</span></div>
|
|
<div className="text-xs font-bold uppercase tracking-widest text-white/50">{locale === 'en' ? 'Major Projects' : 'Großprojekte'}</div>
|
|
</div>
|
|
<div className="flex flex-col items-center">
|
|
<div className="font-mono text-5xl md:text-6xl font-black text-white tracking-tighter mb-2">372<span className="text-primary text-3xl">km</span></div>
|
|
<div className="text-xs font-bold uppercase tracking-widest text-white/50">{locale === 'en' ? 'Cable Laying' : 'Kabelverlegung'}</div>
|
|
</div>
|
|
<div className="flex flex-col items-center">
|
|
<div className="font-mono text-5xl md:text-6xl font-black text-white tracking-tighter mb-2">102<span className="text-primary text-3xl">km</span></div>
|
|
<div className="text-xs font-bold uppercase tracking-widest text-white/50">{locale === 'en' ? 'HDD Drilling' : 'Spülbohrung'}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|