From 610f64392de54dfdc6fc684514f87ab1dec0382d Mon Sep 17 00:00:00 2001 From: prashant Date: Mon, 4 Nov 2024 18:55:52 +0530 Subject: [PATCH] now all the pages have the scroll to top button --- about.html | 43 ++++++++++++++++++++++++++++++++++++++++ arrow_upper.png | Bin 0 -> 904 bytes contributors.css | 21 ++++++++++++++++++++ contributors.html | 22 +++++++++++++++++++++ return-policy.html | 44 +++++++++++++++++++++++++++++++++++++++++ shopclothing.html | 45 ++++++++++++++++++++++++++++++++++++++++-- sneaker.html | 45 +++++++++++++++++++++++++++++++++++++++++- terms-conditions.html | 45 +++++++++++++++++++++++++++++++++++++++++- 8 files changed, 261 insertions(+), 4 deletions(-) create mode 100644 arrow_upper.png diff --git a/about.html b/about.html index 05eaf7a..e8de306 100644 --- a/about.html +++ b/about.html @@ -395,6 +395,27 @@ transition: width 0.09s ease-in-out; /* border-radius: 10px; */ } +.go-top-btn { + position: fixed; + bottom: 35px; + right: 35px; + cursor: pointer; + border-radius: 50%; + height: 50px; + width: 50px; + background: #000000; + border: none; + display: flex; + justify-content: center; + align-items: center; + z-index: 1000; + transition: background-color 0.3s, box-shadow 0.3s, transform 0.3s; +} +.go-top-btn:hover { + background-color: #000000; + box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.25); + transform: translateY(-2px); +} @@ -402,6 +423,11 @@ + + +
@@ -819,6 +845,23 @@

Subscription Successful!

}); })(); + //js for go top button +const goTopBtn = document.querySelector('.go-top-btn'); + window.addEventListener('scroll', checkHeight) + function checkHeight() { + if (window.scrollY > 200) { + goTopBtn.style.display = "flex" + } else { + goTopBtn.style.display = "none" + } + } + goTopBtn.addEventListener('click', () => { + window.scrollTo({ + top: 0, + behavior: "smooth" + }) + }) + diff --git a/arrow_upper.png b/arrow_upper.png new file mode 100644 index 0000000000000000000000000000000000000000..3ca22f21849af78b7d6454a11cfc3791d13ff5b3 GIT binary patch literal 904 zcmV;319$w1P)Px&LPR^IEm=%B!&%m01z3z}(q}Mmk4q-L`D)MVs#SdjcWeox0 z4iWuyc*6UZSpe9?55~K?p}eU6I0JAn2ZYH1I7I#vfUf`^7~v9i;tGI;C5*E`m=u5% z&sc+OIS(P?7JwHW0A2%l4B#{*gvkI5MV^5(QZ{DhV*pDdC60;ch?y?~IALJVvbjl} zFbM#;X~sz_^0mUorb_^Z)g=Jg7K_%|S3oC&urUA?u~UE-mLaEA#RUKcmd4^0fRGS2 z0#J*`!e^KnazN<}hiS5IH z(T4c$(0>4M*Y=Ua)d3oW))BhivD|=YtvAL%@OFShk!@mIC72r6e*y)K{-L};SiAL4DS=8HvkpET>wvr=&6h4J1qPXz(eCx&?_Q( zH1d7V06Zt6AHL6z0^qwy2Y}HvYtG81Z`2PUZiZX!mI6QTf``#Bf1)39W zc0hU#XnHd{AUi;P6HKQFR!WDz2h0T}ZWmChR5M7m22{N;O#s>`kR|{vw=;m;2GebW zG7*wWf$IRS8omA7c?x` + + +
@@ -194,6 +199,23 @@ } } }); + //js for go top button +const goTopBtn = document.querySelector('.go-top-btn'); + window.addEventListener('scroll', checkHeight) + function checkHeight() { + if (window.scrollY > 200) { + goTopBtn.style.display = "flex" + } else { + goTopBtn.style.display = "none" + } + } + goTopBtn.addEventListener('click', () => { + window.scrollTo({ + top: 0, + behavior: "smooth" + }) + }) + diff --git a/return-policy.html b/return-policy.html index c495225..36fe273 100644 --- a/return-policy.html +++ b/return-policy.html @@ -77,9 +77,35 @@ .return-policy-thanks a:hover { color: #333; } + + .go-top-btn { + position: fixed; + bottom: 35px; + right: 35px; + cursor: pointer; + border-radius: 50%; + height: 50px; + width: 50px; + background: #000000; + border: none; + display: flex; + justify-content: center; + align-items: center; + z-index: 1000; + transition: background-color 0.3s, box-shadow 0.3s, transform 0.3s; +} +.go-top-btn:hover { + background-color: #000000; + box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.25); + transform: translateY(-2px); +} + +