diff --git a/public/images/home-integrating-1.png b/public/images/home-integrating-1.png new file mode 100644 index 0000000..f72044a Binary files /dev/null and b/public/images/home-integrating-1.png differ diff --git a/public/images/home-integrating-2.png b/public/images/home-integrating-2.png new file mode 100644 index 0000000..b892ba3 Binary files /dev/null and b/public/images/home-integrating-2.png differ diff --git a/public/images/home-integrating-3.png b/public/images/home-integrating-3.png new file mode 100644 index 0000000..f31757e Binary files /dev/null and b/public/images/home-integrating-3.png differ diff --git a/public/images/home-models.svg b/public/images/home-models.svg new file mode 100644 index 0000000..eebcd18 --- /dev/null +++ b/public/images/home-models.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/components/section-3/index.tsx b/src/components/section-3/index.tsx index 9ba6ffa..d4a3046 100644 --- a/src/components/section-3/index.tsx +++ b/src/components/section-3/index.tsx @@ -23,22 +23,39 @@ export default function Section3() { }; const [visibleCircle, setVisibleCircle] = useState(null); + const [hoveredCircle, setHoveredCircle] = useState(null); const visualizationRef = useRef(null); const isInView = useInView(visualizationRef); + const [revealedImageIndex, setRevealedImageIndex] = useState(0); + useEffect(() => { if (isInView) { + let fullReveal = false; let i = 0; - const interval = setInterval(() => { + + const runLoop = () => { if (i === 3) { - clearInterval(interval); + // wait 10s before starting the loop again + setTimeout(() => { + fullReveal = true; + i = 0; + }, 10000); + } + + if (!fullReveal && i < 4) { + setRevealedImageIndex(i); } setVisibleCircle(i); i++; - }, 1000); + }; + + runLoop() + const interval = setInterval(runLoop, 1000); return () => clearInterval(interval); } - }, [isInView]); + }, [isInView, setRevealedImageIndex]); + return (
@@ -47,37 +64,67 @@ export default function Section3() {
-
setVisibleCircle(0)} onMouseLeave={() => setVisibleCircle(null)} className={cn("flex h-60 w-60 items-center justify-center rounded-full bg-light-green transition-opacity", - { - "opacity-1": visibleCircle === 0, - "opacity-0": visibleCircle !== 0 - } - )} > + {revealedImageIndex > 0 && < Image + className="absolute inset-0 w-[240px] h-[240px] z-0" + alt="" + src="/images/home-integrating-1.png" + width={240} + height={240} + />} +
setHoveredCircle(0)} + onMouseLeave={() => setHoveredCircle(null)} + className={cn("relative flex h-60 w-60 items-center justify-center rounded-full bg-light-green transition-opacity z-10", + { + "opacity-1": visibleCircle === 0 || hoveredCircle === 0, + "opacity-0": visibleCircle !== 0 && hoveredCircle !== 0 + } + )} >
CLIMATE MODELS SIMULATIONS
-
setVisibleCircle(1)} onMouseLeave={() => setVisibleCircle(null)} className={cn("flex h-60 w-60 items-center justify-center rounded-full bg-light-green transition-opacity", - { - "opacity-1": visibleCircle === 1, - "opacity-0": visibleCircle !== 1 - } - )} > + {revealedImageIndex > 1 && } +
setHoveredCircle(1)} + onMouseLeave={() => setHoveredCircle(null)} + className={cn("relative flex h-60 w-60 items-center justify-center rounded-full bg-light-green transition-opacity z-10", + { + "opacity-1": visibleCircle === 1 || hoveredCircle === 1, + "opacity-0": visibleCircle !== 1 && hoveredCircle !== 1 + } + )} >
Data streaming
-
setVisibleCircle(2)} onMouseLeave={() => setVisibleCircle(null)} className={cn("flex flex-col h-60 w-60 items-center justify-center rounded-full bg-light-green transition-opacity", - { - "opacity-1": visibleCircle === 2, - "opacity-0": visibleCircle !== 2 - } - )} > + {revealedImageIndex > 2 && } +
setHoveredCircle(2)} + onMouseLeave={() => setHoveredCircle(null)} + className={cn("relative flex flex-col h-60 w-60 items-center justify-center rounded-full bg-light-green transition-opacity z-10", + { + "opacity-1": visibleCircle === 2 || hoveredCircle === 2, + "opacity-0": visibleCircle !== 2 && hoveredCircle !== 2 + } + )} >
Impact models
Applications in
different sectors