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

scroll to top button added to all pages #413

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
27 changes: 27 additions & 0 deletions Pages/3D-Visualizations/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,13 @@ <h2>Deoxyribonucleic acid(DNA)</h2>
</div>
</div>

<button
onclick="topFunction()"
class="icon-arrow-up"
id="myBtn"
title="Scroll to Top"
></button>


<!-- footer -->
<!-- <a href="#" class="company-logo">
Expand All @@ -160,6 +167,26 @@ <h2>Deoxyribonucleic acid(DNA)</h2>
hamburger.classList.toggle("active");
navMenu.classList.toggle("active");
})

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>

Expand Down
23 changes: 23 additions & 0 deletions Pages/3D-Visualizations/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -325,4 +325,27 @@ nav {
nav a {
font-weight: normal;
font-size: .90em;
}

#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;
border:none;
}
#myBtn:hover{
opacity: 1;
background-color: #91f0c0;
animation: animate 1s linear infinite;
}
31 changes: 31 additions & 0 deletions Pages/About-Us/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Virtuo Learn</title>
<link rel="stylesheet" href="style.css">
<link
href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css"
rel="stylesheet"
/>
<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 @@ -131,6 +135,13 @@ <h1 class="text-[2rem] font-bold text-center mt-[4vh] md:text-[2rem] lg:text-5xl
</p>
</div>
</div>

<button
onclick="topFunction()"
class="icon-arrow-up"
id="myBtn"
title="Scroll to Top"
></button>
<!-- footer -->
<!-- <a class="no-underline inline-block" href="#" class="company-logo">
<img src="./assets/asset 41.png" alt="company logo">
Expand Down Expand Up @@ -174,6 +185,26 @@ <h1 class="text-[2rem] font-bold text-center mt-[4vh] md:text-[2rem] lg:text-5xl
observer.observe(wrap);
});
});

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>

Expand Down
25 changes: 24 additions & 1 deletion Pages/About-Us/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,27 @@ nav {
nav a {
font-weight: normal;
font-size: .90em;
}
}

#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;
border:none;
}
#myBtn:hover{
opacity: 1;
background-color: #91f0c0;
animation: animate 1s linear infinite;
}
31 changes: 31 additions & 0 deletions Pages/Doubt Engine/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Virtuo Learn</title>
<link rel="stylesheet" href="style.css">
<link
href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css"
rel="stylesheet"
/>
<link rel="stylesheet" href="media-queries.css">
<link rel="icon" type="image/x-icon" href="../HomePage/assets/logo.png">
<script src="https://unpkg.com/scrollreveal"></script>
Expand Down Expand Up @@ -99,6 +103,13 @@ <h1 class="text-[2rem] font-bold text-center mt-[4vh] md:text-[2rem] lg:text-5xl
<p class="text-secondary_text_color leading-[1.8rem] font-roboto mt-[3vh] text-[1rem] md:text-xl para-2">While we work on completing this page, please feel free to explore the rest of our website. We offer a wide range of products and services that we believe will be of interest to you. From our user-friendly interface to our top-of-the-line customer service, we strive to provide you with the best possible experience.</p>
</div>

<button
onclick="topFunction()"
class="icon-arrow-up"
id="myBtn"
title="Scroll to Top"
></button>


<!-- footer -->
<footer class="h-auto w-screen bg-[#ebf2fa] mt-[5vh] pt-10 bottom-0 inset-x-0">
Expand All @@ -120,6 +131,26 @@ <h1 class="text-[2rem] font-bold text-center mt-[4vh] md:text-[2rem] lg:text-5xl
hamburger.classList.toggle("active");
navMenu.classList.toggle("active");
})

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>

Expand Down
25 changes: 24 additions & 1 deletion Pages/Doubt Engine/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,27 @@
nav a {
font-weight: normal;
font-size: .90em;
}
}

#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;
border:none;
}
#myBtn:hover{
opacity: 1;
background-color: #91f0c0;
animation: animate 1s linear infinite;
}
1 change: 1 addition & 0 deletions Pages/Quizes/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css"
rel="stylesheet"
/>

<script src="https://unpkg.com/scrollreveal"></script>
</head>
<body>
Expand Down
1 change: 1 addition & 0 deletions Pages/Quizes/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ ul {
inset 4px 4px 6px 0 rgba(97, 96, 96, 0.2);
cursor: pointer;
z-index: 1;
border:none;
}

#myBtn:hover{
Expand Down
27 changes: 27 additions & 0 deletions Pages/Simulation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,13 @@ <h2>Orbital Configuration</h2>
</div>
</div>

<button
onclick="topFunction()"
class="icon-arrow-up"
id="myBtn"
title="Scroll to Top"
></button>


<!-- footer -->
<!-- <a href="#" class="company-logo">
Expand All @@ -146,6 +153,26 @@ <h2>Orbital Configuration</h2>
hamburger.classList.toggle("active");
navMenu.classList.toggle("active");
})

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>

Expand Down
23 changes: 23 additions & 0 deletions Pages/Simulation/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -324,4 +324,27 @@ nav {
nav a {
font-weight: normal;
font-size: .90em;
}

#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;
border:none;
}
#myBtn:hover{
opacity: 1;
background-color: #91f0c0;
animation: animate 1s linear infinite;
}
27 changes: 27 additions & 0 deletions Pages/Videos/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,13 @@ <h2>Endocrine System</h2>
</div>
</div>

<button
onclick="topFunction()"
class="icon-arrow-up"
id="myBtn"
title="Scroll to Top"
></button>


<!-- footer -->
<!-- <a href="#" class="company-logo">
Expand All @@ -263,6 +270,26 @@ <h2>Endocrine System</h2>
hamburger.classList.toggle("active");
navMenu.classList.toggle("active");
})

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>

Expand Down
23 changes: 23 additions & 0 deletions Pages/Videos/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -329,4 +329,27 @@ nav {
nav a {
font-weight: normal;
font-size: .90em;
}

#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;
border:none;
}
#myBtn:hover{
opacity: 1;
background-color: #91f0c0;
animation: animate 1s linear infinite;
}
Loading