From 57d863960419750860360a8175a4eaebf7d3f899 Mon Sep 17 00:00:00 2001 From: Ayushswirlon Date: Wed, 17 Jul 2024 15:38:44 +0530 Subject: [PATCH] had undo changes and add an arrow --- index.html | 135 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 94 insertions(+), 41 deletions(-) diff --git a/index.html b/index.html index affb452..f2eac50 100644 --- a/index.html +++ b/index.html @@ -111,23 +111,34 @@ .image-wrapper:hover .ripple-effect { opacity: 1; } + body { font-family: 'Roboto', sans-serif; /* background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%); */ } .intro-section { - display: flex; - align-items: center; min-height: 100vh; - padding: 2rem 0; - overflow: hidden; - + display: flex; + flex-direction: column; + justify-content: space-between; + position: relative; + padding-bottom: 60px; + overflow: hidden; + opacity: 0; + transition: opacity 1s ease-out; } .intro-section.fade-in { opacity: 1; } +.scroll-arrow-container{ + position: relative; + height: 60px; + margin-top: 20px; + bottom:20px; +} + .floating-shape { position: absolute; @@ -232,8 +243,8 @@ } .landing-animate { -opacity: 0; -animation: fadeIn 1s ease-out forwards; + opacity: 0; + animation: landingAnimation 0.8s ease-out forwards; } .text-container.landing-animate { @@ -260,7 +271,36 @@ padding-top: 5rem; /* Adjust based on your navbar height */ } } +.scroll-arrow { + position: absolute; + bottom:-8px; + left: 50%; + /* transform: translateX(-50%); */ + font-size: 2rem; + opacity: 1; + color: rgb(219, 127, 219); + animation: bounce 2s infinite; + /* transition: opacity 0.3s ease; */ + cursor: pointer; + } + @keyframes bounce { + 0%, 20%, 50%, 80%, 100% { + transform: translateY(0) translateX(-50%); + } + 40% { + transform: translateY(-20px) translateX(-50%); + } + 60% { + transform: translateY(-10px) translateX(-50%); + } + } + @media (max-width: 768px) { + .scroll-arrow { + bottom: 10px; + font-size: 1.5rem; + } +} @@ -346,49 +386,47 @@ -
-
-
-
-
- -
-
-
-
-

- The #1 Sorting - Visualization Tool +
+
+
+

+ The #1 Sorting + Visualization Tool

- -

- Interactive visualization -
- Understand algorithm efficiency -
- Learn sorting techniques +

+ Sorting algorithm visualisation tool which provides an interactive way to visualize various sorting algorithm.

-
- +
-
-
+
+ -
-

+
+
+
+ +
+
+
@@ -1390,6 +1428,21 @@
Legal
behavior: 'smooth' }); }; + document.addEventListener('DOMContentLoaded', function() { + const arrow = document.querySelector('.scroll-arrow'); + const heroSection = document.getElementById('home-section'); + + window.addEventListener('scroll', function() { + const heroBottom = heroSection.getBoundingClientRect().bottom; + const windowHeight = window.innerHeight; + + if (window.scrollY > 200 || heroBottom < 0) { + arrow.style.opacity = '0'; + } else { + arrow.style.opacity = '1'; + } + }); + });