Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 52 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

<head>

<!--- basic page needs
<!--- Basic page needs
================================================== -->
<meta charset="utf-8">
<title>Keploy - Open source e2e testing toolkit for developers</title>
<meta name="description" content="Keploy Fellowship Program">
<meta name="author" content="keploy.io">

<!-- mobile specific metas
<!-- Mobile specific metas
================================================== -->
<meta name="viewport" content="width=device-width, initial-scale=1">

Expand All @@ -30,7 +30,7 @@
<script src="js/modernizr.js"></script>
<script src="js/pace.min.js"></script>

<!-- favicons
<!-- Favicons
================================================== -->
<link rel="shortcut icon" href="favicon.png" type="image/x-icon">
<link rel="icon" href="favicon.png" type="image/x-icon">
Expand Down Expand Up @@ -471,6 +471,55 @@ <h3>Find us on</h3>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>

<!-- Start => Button for Scroll-To-Top -->

<!-- Scroll to top button -->
<button onclick="topFunction()" id="scrollTopBtn" title="Go to top">⬆</button>

<!-- Styles for STT button -->
<style>
#scrollTopBtn {
display: none;
position: fixed;
bottom: 40px;
right: 30px;
z-index: 99; /* Show on top */
font-size: 18px;
border: none;
background: #333;
color: white;
padding: 10px;
border-radius: 50%;
cursor: pointer;
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
transition: background-color 0.3s;
}

#scrollTopBtn:hover {
background-color: #555;
}
</style>

<!-- JavaScript for STT behavior -->
<script>
const scrollTopBtn = document.getElementById("scrollTopBtn");

window.onscroll = function() {
if (document.body.scrollTop > 300 || document.documentElement.scrollTop > 300) { // Show the button when user scrolls down 300px
scrollTopBtn.style.display = "block";
} else {
scrollTopBtn.style.display = "none";
}
};

// When STT button clicked it Scrolls to Top
function topFunction() {
document.body.scrollTop = 0; // Safari
document.documentElement.scrollTop = 0;
}
</script>
<!-- End => Button for Scroll-To-Top -->

</body>

</html>