Skip to content
Merged
Show file tree
Hide file tree
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
36 changes: 36 additions & 0 deletions docs/_sass/landing-page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -247,3 +247,39 @@
}
}
}

#scroll-bottom-up {
display: inline-block;
background-color: #3c494f;
width: 55.5px;
height: 55.5px;
text-align: center;
border-radius: 50%;
position: fixed;
bottom: 10px;
right: 30px;
transition: background-color 0.3s, opacity 0.5s, visibility 0.5s;
opacity: 0;
visibility: hidden;
z-index: 1000;
}
#scroll-bottom-up::after {
content: "\f077";
font-family: FontAwesome;
font-weight: normal;
font-style: normal;
font-size: 1em;
line-height: 50px;
color: #fff;
}
#scroll-bottom-up:hover {
cursor: pointer;
background-color: #333;
}
#scroll-bottom-up:active {
background-color: #555;
}
#scroll-bottom-up.show {
opacity: 1;
visibility: visible;
}
15 changes: 15 additions & 0 deletions docs/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,18 @@

changeHeader();
})();

var scrollbtn = $("#scroll-bottom-up");

$(window).scroll(function () {
if ($(window).scrollTop() > 300) {
scrollbtn.addClass('show');
} else {
scrollbtn.removeClass('show');
}
});

scrollbtn.click(function (e) {
e.preventDefault();
$("html, body").animate({ scrollTop: 0 }, "300");
});
3 changes: 3 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

<script src="https://kit.fontawesome.com/2ffe680fa0.js" crossorigin="anonymous"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/js/bootstrap.bundle.min.js" integrity="sha384-b5kHyXgcpbZJO/tY9Ul7kGkf1S0CWuKcCD38l8YkeH8z8QjE0GmW1gYU5S9FOnJ0" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.6.0/dist/umd/popper.min.js" integrity="sha384-KsvD1yqQ1/1+IA7gi3P0tyJcT3vR+NdBTt13hSJ2lnve8agRGXTTyNaBYmCR/Nwi" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/js/bootstrap.min.js" integrity="sha384-nsg8ua9HAw1y0W1btsyWgBklPnCUAFLuTMS2G72MMONqmOymq585AcH49TLBQObG" crossorigin="anonymous"></script>
Expand All @@ -26,6 +28,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</head>
<a id="scroll-bottom-up" style="text-decoration: none; color: white;"></a>

<style>
body{
Expand Down