From 2bc6ba169e0f82d02c1377d29c0b40226155c3f6 Mon Sep 17 00:00:00 2001 From: Sudhanshu Dasgupta Date: Tue, 30 Jul 2024 11:20:23 +0000 Subject: [PATCH] animate home section Signed-off-by: Sudhanshu Dasgupta --- src/sections/Home/Playground-home/index.js | 126 +++++++++++++-------- 1 file changed, 79 insertions(+), 47 deletions(-) diff --git a/src/sections/Home/Playground-home/index.js b/src/sections/Home/Playground-home/index.js index 8fd172161627..807980549c6c 100644 --- a/src/sections/Home/Playground-home/index.js +++ b/src/sections/Home/Playground-home/index.js @@ -107,7 +107,7 @@ const ViewsSectionWrapper = styled.div` .overlay { width: 483px; - height: 680x; + height: 680px; } .container { @@ -115,24 +115,50 @@ const ViewsSectionWrapper = styled.div` justify-content: center; } - .line1 { + .line { display: flex; flex-direction: column; align-items: center; margin-right: 2rem; - transform: translateY(50px); flex-wrap: wrap; } + .position-line-down{ + transform: translateY(-20em); + } + .position-line-up{ + transform: translateY(20em); + } - .line2 { - display: flex; - flex-direction: column; - align-items: center; - margin-right: 2rem; - transform: translateY(-50px); - flex-wrap: wrap; + .line-primary, .line-secondary { + width: 100%; + display: flex; + flex-direction: column; + } + + .animation-up-scroll { + animation: scroll-up-animation 15s linear infinite; + + @keyframes scroll-up-animation { + 0% { + transform: translateY(0%); + } + 100% { + transform: translateY(-100%); + } + } + } + .animation-down-scroll { + + animation: scroll-down-animation 15s linear infinite; + @keyframes scroll-down-animation { + 0% { + transform: translateY(0); + } + 100% { + transform: translateY(100%); + } + } } - .box { display: flex; flex-direction: column; @@ -179,7 +205,7 @@ const ViewsSectionWrapper = styled.div` `; const MeshmapVisualizerViews = () => { - const [imageRef, inView] = useInView({ threshold: 0.4 }); + const [imageRef, inView] = useInView({ threshold: 0.3 }); const [imageInView, setimageInView] = useState(false); if (inView && !imageInView) setimageInView(true); @@ -195,44 +221,50 @@ const MeshmapVisualizerViews = () => { alt="" /> */}
-
-
- -
Argo CD
-
-
- -
Cilium
-
-
- -
Prometheus
-
-
- -
Prometheus
+
+
+
+ +
Prometheus
+
+
+ +
Argo CD
+
+
+ +
Cilium
+
+
+ +
Prometheus
+
+
-
-
- -
Kubernetes
-
-
- -
Keda
-
-
- -
Linkerd
-
-
- -
Kubernetes
+
+
+
+ +
Kubernetes
+
+
+ +
Keda
+
+
+ +
Linkerd
+
+
+ +
Kubernetes
+