Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
laxmikandivalasa authored Nov 8, 2024
1 parent c5edb99 commit fa70f97
Showing 1 changed file with 48 additions and 1 deletion.
49 changes: 48 additions & 1 deletion Website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
content="A curated collection of diverse machine learning repositories available on GitHub, presented by the RecodeHive community" />
<title>Machine Learning Repositories</title>
<!-- <link rel="canonical" href="url-here" /> define base(root) link of deployment here -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<link rel="stylesheet" href="css/styles.css" />
<link rel="icon" href="/assets/recode-hive.png" type="image/png"> <!-- Added favicon -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
Expand Down Expand Up @@ -117,6 +118,35 @@

.dark-mode .paragraph {
color: #555;

body {
font-family: 'Poppins', sans-serif;
min-height: 2000px; /* Add some height to enable scrolling */
margin: 0;
padding: 0;
}

/* Scroll to Top Button Styles */
.top-btn {
display: none;
width: 50px;
height: 50px;
position: fixed;
bottom: 23px;
right: 44px;
background-color: #ab45e7;
color: #ffffff;
border: none;
border-radius: 50%;
cursor: pointer;
font-size: 18px;
align-items: center;
justify-content: center;
}

.top-btn:hover {
background-color: #0056b3;
        }
}
</style>
</head>
Expand Down Expand Up @@ -742,7 +772,24 @@ <h4 class="h46">Contact</h4>
</div>


<button class="top-btn" id="goToTopBtn" onclick="goToTop()">
<i class="fa-solid fa-chevron-up"></i>
</button>

<script>
const goToTopBtn = document.getElementById("goToTopBtn");

window.onscroll = function () {
if (window.scrollY > 100) {
goToTopBtn.style.display = "flex"; // Use "flex" to center the icon
} else {
goToTopBtn.style.display = "none";
}
};
function goToTop() {
window.scrollTo({ top: 0, behavior: "smooth" });
 }
    </script>
<script>
const year = new Date().getFullYear();
document.getElementById("year").textContent = year;
Expand All @@ -757,4 +804,4 @@ <h4 class="h46">Contact</h4>
</script>
</body>

</html>
</html>

0 comments on commit fa70f97

Please sign in to comment.