Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added back to top button #392 #418

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
30 changes: 29 additions & 1 deletion Pages/3D-Visualizations/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Virtuo Learn</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="./style.css">
<link rel="stylesheet" href="media-queries.css">
<link rel="icon" type="image/x-icon" href="../../assets/logo.png">
<link rel="stylesheet" href="./style.css">
<script src="https://unpkg.com/scrollreveal"></script>
</head><link
href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css"
Expand Down Expand Up @@ -135,7 +137,6 @@ <h2>Deoxyribonucleic acid(DNA)</h2>

</div>
</div>


<!-- footer -->
<!-- <a href="#" class="company-logo">
Expand All @@ -148,6 +149,12 @@ <h2>Deoxyribonucleic acid(DNA)</h2>
</a>
<p>Developed By Jayesh Batra</p>
</div>
<button
onclick="topFunction()"
class="icon-arrow-up"
id="myBtn"
title="Scroll to Top"
></button>
</footer>

<script src="https://kit.fontawesome.com/c1fc3d2826.js" crossorigin="anonymous"></script>
Expand All @@ -161,6 +168,27 @@ <h2>Deoxyribonucleic acid(DNA)</h2>
navMenu.classList.toggle("active");
})
</script>
<script>
window.onscroll = function () {
scrollFunction();
};

function scrollFunction() {
if (
document.body.scrollTop > 200 ||
document.documentElement.scrollTop > 200
) {
document.getElementById("myBtn").style.display = "block";
} else {
document.getElementById("myBtn").style.display = "none";
}
}

function topFunction() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
</script>
<script src="../../scroll-reveal.js"></script>

</body>
Expand Down
32 changes: 32 additions & 0 deletions Pages/3D-Visualizations/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,38 @@ ul {

}

/*Up-arrow button*/


#myBtn{
position: fixed;
bottom: 20px;
right: 10px;
height: 60px;
width: 60px;
display: none;
place-items: center;
border-radius: 50%;
transition: opacity 0.3s, background-color 0.3s;
box-shadow: 4px 4px 6px 0 rgba(0, 0, 0, 0.3),
inset -4px -4px 6px 0 rgba(255, 255, 255, .2),
inset 4px 4px 6px 0 rgba(97, 96, 96, 0.2);
cursor: pointer;
z-index: 1;
}

#myBtn:hover{
opacity: 1;
background-color: #91f0c0;
animation: animate 1s linear infinite;
}

@keyframes animate{
50%{
transform: translateY(3px);
}
}


/* footer */

Expand Down
1 change: 1 addition & 0 deletions Pages/Quizes/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ ul {
width: 60px;
display: none;
place-items: center;
color: black;
border-radius: 50%;
transition: opacity 0.3s, background-color 0.3s;
box-shadow: 4px 4px 6px 0 rgba(0, 0, 0, 0.3),
Expand Down
29 changes: 28 additions & 1 deletion Pages/Simulation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Virtuo Learn</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="./style.css">
<link rel="stylesheet" href="media-queries.css">
<link rel="icon" type="image/x-icon" href="../../assets/logo.png">
<script src="https://unpkg.com/scrollreveal"></script>
Expand Down Expand Up @@ -122,7 +123,6 @@ <h2>Orbital Configuration</h2>
</div>
</div>


<!-- footer -->
<!-- <a href="#" class="company-logo">
<img src="./assets/asset 41.png" alt="company logo">
Expand All @@ -134,6 +134,12 @@ <h2>Orbital Configuration</h2>
</a>
<p>Developed By Jayesh Batra</p>
</div>
<button
onclick="topFunction()"
class="icon-arrow-up"
id="myBtn"
title="Scroll to Top"
></button>
</footer>

<script src="https://kit.fontawesome.com/c1fc3d2826.js" crossorigin="anonymous"></script>
Expand All @@ -147,6 +153,27 @@ <h2>Orbital Configuration</h2>
navMenu.classList.toggle("active");
})
</script>
<script>
window.onscroll = function () {
scrollFunction();
};

function scrollFunction() {
if (
document.body.scrollTop > 200 ||
document.documentElement.scrollTop > 200
) {
document.getElementById("myBtn").style.display = "block";
} else {
document.getElementById("myBtn").style.display = "none";
}
}

function topFunction() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
</script>
<script src="../../scroll-reveal.js"></script>

</body>
Expand Down
32 changes: 32 additions & 0 deletions Pages/Simulation/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,38 @@ ul {

}

/*Up-arrow button*/


#myBtn{
position: fixed;
bottom: 20px;
right: 10px;
height: 60px;
width: 60px;
display: none;
place-items: center;
border-radius: 50%;
transition: opacity 0.3s, background-color 0.3s;
box-shadow: 4px 4px 6px 0 rgba(0, 0, 0, 0.3),
inset -4px -4px 6px 0 rgba(255, 255, 255, .2),
inset 4px 4px 6px 0 rgba(97, 96, 96, 0.2);
cursor: pointer;
z-index: 1;
}

#myBtn:hover{
opacity: 1;
background-color: #91f0c0;
animation: animate 1s linear infinite;
}

@keyframes animate{
50%{
transform: translateY(3px);
}
}


/* footer */

Expand Down
29 changes: 28 additions & 1 deletion Pages/Videos/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Virtuo Learn</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="./style.css">
<link rel="stylesheet" href="media-queries.css">
<link rel="icon" type="image/x-icon" href="../../assets/logo.png">
<script src="https://unpkg.com/scrollreveal"></script>
Expand Down Expand Up @@ -239,7 +240,6 @@ <h2>Endocrine System</h2>
</div>
</div>


<!-- footer -->
<!-- <a href="#" class="company-logo">
<img src="./assets/asset 41.png" alt="company logo">
Expand All @@ -251,6 +251,12 @@ <h2>Endocrine System</h2>
</a>
<p>Developed By Jayesh Batra</p>
</div>
<button
onclick="topFunction()"
class="icon-arrow-up"
id="myBtn"
title="Scroll to Top"
></button>
</footer>

<script src="https://kit.fontawesome.com/c1fc3d2826.js" crossorigin="anonymous"></script>
Expand All @@ -264,6 +270,27 @@ <h2>Endocrine System</h2>
navMenu.classList.toggle("active");
})
</script>
<script>
window.onscroll = function () {
scrollFunction();
};

function scrollFunction() {
if (
document.body.scrollTop > 200 ||
document.documentElement.scrollTop > 200
) {
document.getElementById("myBtn").style.display = "block";
} else {
document.getElementById("myBtn").style.display = "none";
}
}

function topFunction() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
</script>
<script src="../../scroll-reveal.js"></script>

</body>
Expand Down
32 changes: 32 additions & 0 deletions Pages/Videos/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,38 @@ ul {

}

/*Up-arrow button*/


#myBtn{
position: fixed;
bottom: 20px;
right: 10px;
height: 60px;
width: 60px;
display: none;
place-items: center;
border-radius: 50%;
transition: opacity 0.3s, background-color 0.3s;
box-shadow: 4px 4px 6px 0 rgba(0, 0, 0, 0.3),
inset -4px -4px 6px 0 rgba(255, 255, 255, .2),
inset 4px 4px 6px 0 rgba(97, 96, 96, 0.2);
cursor: pointer;
z-index: 1;
}

#myBtn:hover{
opacity: 1;
background-color: #91f0c0;
animation: animate 1s linear infinite;
}

@keyframes animate{
50%{
transform: translateY(3px);
}
}


/* footer */

Expand Down
Loading