From 4488277baa5c68c7c046aac72d21c906c56c5d76 Mon Sep 17 00:00:00 2001 From: rockyeverlast Date: Mon, 8 Apr 2024 12:27:38 +0530 Subject: [PATCH] Updated Stats and NewSubnet Page --- src/components/HomePage/Stats.jsx | 10 +- .../SubnetsComponent/NewSubnetComp.jsx | 460 +++++++++--------- 2 files changed, 240 insertions(+), 230 deletions(-) diff --git a/src/components/HomePage/Stats.jsx b/src/components/HomePage/Stats.jsx index 475be5c..7102c70 100644 --- a/src/components/HomePage/Stats.jsx +++ b/src/components/HomePage/Stats.jsx @@ -102,7 +102,7 @@ const Stats = () => { > {inView && ( { > {inView && ( { {inView && ( { > {inView && ( { {inView && ( { const firstBoxRef = useRef(null); const secondBoxRef = useRef(null); const thirdBoxRef = useRef(null); - const textBox = useRef(null); + const mainBox = useRef(null); useEffect(() => { - const animateBox = (boxRef) => { - const tl = gsap.timeline({ + // gsap.set(firstBoxRef.current, { opacity: 1 }); + let tl = gsap + .timeline({ scrollTrigger: { - trigger: boxRef.current, - start: "top center+=50", - end: "bottom bottom+=100", + trigger: mainBox.current, + start: "top top", scrub: 1, - markers: false, + pin: true, + end: "bottom bottom", + markers: true, }, - }); - tl.fromTo( - boxRef.current, - { - position: "sticky", - top: "-116px", - opacity: 0, - // autoAlpha: 1, - }, - { - // transform: "translateX(0)", - // duration: 0.5, - opacity: 1, - duration: 0.3, - // autoAlpha: 0, - } - ); - return () => { - // Clean up - tl.kill(); - }; + }) + .fromTo(firstBoxRef.current, { opacity: 1 }, { opacity: 0 }) + .fromTo(secondBoxRef.current, { opacity: 0 }, { opacity: 1 }) + .fromTo(secondBoxRef.current, { opacity: 1 }, { opacity: 0 }) + .fromTo(thirdBoxRef.current, { opacity: 0 }, { opacity: 1 }); + + // .fromTo( + // firstBoxRef.current, + // { opacity: 1, duration: 3, transform: "translateX(0vw)" }, + // { opacity: 0, duration: 3, transform: "translateX(100vw)" } + // ) + // .fromTo( + // secondBoxRef.current, + // { opacity: 0, duration: 1, transform: "translateX(-100vw)" }, + // { opacity: 1, duration: 1, transform: "translateX(0vw)" } + // ) + // .fromTo( + // secondBoxRef.current, + // { opacity: 1, duration: 3, transform: "translateX(0vw)" }, + // { opacity: 0, duration: 3, transform: "translateX(100vw)" } + // ) + // .fromTo( + // thirdBoxRef.current, + // { opacity: 0, duration: 1, transform: "translateX(-100vw)" }, + // { opacity: 1, duration: 1, transform: "translateX(0vw)" } + // ); + + return () => { + tl.kill(); }; - animateBox(firstBoxRef); - animateBox(secondBoxRef); - animateBox(thirdBoxRef); }, []); return ( - +
- - - {SubnetContent.heading} - - - - - - - - + {SubnetContent.heading} + - - - - - - - - - - - - - - - - With Unmatched Privacy and Scalability - - - - { cursor={"pointer"} transform="translateY(-10%)" animation="floatAnimation 2s infinite alternate" - // onClick={click} + // onClick={handleImageClick} sx={{ "@keyframes floatAnimation": { "0%": { @@ -222,82 +147,167 @@ export const NewSubnetComp = () => { }, }} /> - - + - - 01. Decentralisation - - - Rubix Decentralised Identity( DID) issued at L1 is the - foundation for building digital ownership enhancing - applications. - + + - - 02. Ultra Scalability - - - Unlike monolithic chains which become centralized and - introduce latency to achieve high throughput, in the Rubix - object chain architecture, where mobile nodes have real time - full state data, the network TPS will increase with increase - in numbers of nodes. - + + - - 03. Data Security and Privacy - - - Rubix Decentralised Identity(DID) issued at L1 is the - foundation for building digital ownership enhancing - applications - + + + + + - - - - - + + + + + + With Unmatched Privacy and Scalability + + + + + + + + + + 01. Decentralisation + + + Rubix Decentralised Identity( DID) issued at L1 is the + foundation for building digital ownership enhancing + applications. + + + + + 02. Ultra Scalability + + + Unlike monolithic chains which become centralized and + introduce latency to achieve high throughput, in the Rubix + object chain architecture, where mobile nodes have real time + full state data, the network TPS will increase with increase + in numbers of nodes. + + + + + 03. Data Security and Privacy + + + Rubix Decentralised Identity(DID) issued at L1 is the + foundation for building digital ownership enhancing + applications + + + + + + + + { - + - +
); };