Skip to content

Commit

Permalink
Merge pull request #784 from MastanSayyad/main
Browse files Browse the repository at this point in the history
Added "Scroll Down Progress Bar" to the Website
  • Loading branch information
RitiChandak authored Jul 29, 2024
2 parents e0ba07c + 9785c09 commit a2ffc81
Show file tree
Hide file tree
Showing 20 changed files with 1,370 additions and 1,092 deletions.
2 changes: 1 addition & 1 deletion assets/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,4 @@
.text_box {
overflow-y: scroll;
height: 200px;
}
}
2 changes: 1 addition & 1 deletion assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@
font-size: 1rem;
margin-left: 10px;
}
}
}
25 changes: 24 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,17 @@
/* Limit the height of the logo */
}

#progressBar {
position: fixed;
top: 0;
left: 0;
width: 0%;
height: 8px;
background-color: #E91E63;
z-index: 9999;

}

/* Scroll to Top Button */

.scroll-to-top {
Expand Down Expand Up @@ -1824,5 +1835,17 @@ <h3>Contact US</h3>
<!-- Custom JavaScript -->
<script src="./chatBot/script.js"></script>
<script type="module" src="assets/js/test-script.js"></script>

<!-- Progress bar -->
<div id="progressBar"></div>
<script>
window.onscroll = function () {
var winScroll = document.body.scrollTop || document.documentElement.scrollTop;
var height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
var scrolled = (winScroll / height) * 100;
document.getElementById("progressBar").style.width = scrolled + "%";
};
</script>
<!-- end -->
</body>
</html>
</html>
Loading

0 comments on commit a2ffc81

Please sign in to comment.