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 #1639

Merged
merged 2 commits into from
Nov 3, 2024
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
49 changes: 49 additions & 0 deletions blog.html
Original file line number Diff line number Diff line change
Expand Up @@ -1623,6 +1623,55 @@ <h2 class="footer-title secondary-title mt-5">Connect with us</h2>
<script>window.gtranslateSettings = { "default_language": "en", "detect_browser_language": true, "wrapper_selector": ".gtranslate_wrapper" }</script>
<script src="https://cdn.gtranslate.net/widgets/latest/float.js" defer></script>
<script src="script.js"></script>
<div id="back-to-top" class="back-to-top">
<i class="fas fa-chevron-up"></i>
</div>

<style>
.back-to-top {
position: fixed;
bottom: 20px;
right: 20px;
width: 50px;
height: 50px;
background-color: #007bff;
color: white;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
transition: opacity 0.3s;
opacity: 0;
visibility: hidden;
}

.back-to-top.show {
opacity: 1;
visibility: visible;
}
</style>

<script>
const backToTopButton = document.getElementById('back-to-top');

window.addEventListener('scroll', () => {
if (window.scrollY > 300) {
backToTopButton.classList.add('show');
} else {
backToTopButton.classList.remove('show');
}
});

backToTopButton.addEventListener('click', ()=>{
window.scrollTo({
top: 0,
behavior:'smooth'
});
});
</script>


</body>

Expand Down
50 changes: 50 additions & 0 deletions bookmarks.html
Original file line number Diff line number Diff line change
Expand Up @@ -319,5 +319,55 @@ <h2 class="footer-title secondary-title mt-2">Connect with us</h2>
<div class="gtranslate_wrapper"></div>
<script>window.gtranslateSettings = {"default_language":"en","detect_browser_language":true,"wrapper_selector":".gtranslate_wrapper"}</script>
<script src="https://cdn.gtranslate.net/widgets/latest/float.js" defer></script>
<div id="back-to-top" class="back-to-top">
<i class="fas fa-chevron-up"></i>
</div>

<style>
.back-to-top {
position: fixed;
bottom: 20px;
right: 20px;
width: 50px;
height: 50px;
background-color: #007bff;
color: white;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
transition: opacity 0.3s;
opacity: 0;
visibility: hidden;
}

.back-to-top.show {
opacity: 1;
visibility: visible;
}
</style>

<script>
const backToTopButton = document.getElementById('back-to-top');

window.addEventListener('scroll', () => {
if (window.scrollY > 300) {
backToTopButton.classList.add('show');
} else {
backToTopButton.classList.remove('show');
}
});

backToTopButton.addEventListener('click', ()=>{
window.scrollTo({
top: 0,
behavior:'smooth'
});
});
</script>


</body>
</html>
49 changes: 49 additions & 0 deletions category.html
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,55 @@ <h2 class="footer-title secondary-title mt-5">Connect with us</h2>
const app = new Vue({
el: '#app' });
</script>
<div id="back-to-top" class="back-to-top">
<i class="fas fa-chevron-up"></i>
</div>

<style>
.back-to-top {
position: fixed;
bottom: 20px;
right: 20px;
width: 50px;
height: 50px;
background-color: #007bff;
color: white;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
transition: opacity 0.3s;
opacity: 0;
visibility: hidden;
}

.back-to-top.show {
opacity: 1;
visibility: visible;
}
</style>

<script>
const backToTopButton = document.getElementById('back-to-top');

window.addEventListener('scroll', () => {
if (window.scrollY > 300) {
backToTopButton.classList.add('show');
} else {
backToTopButton.classList.remove('show');
}
});

backToTopButton.addEventListener('click', ()=>{
window.scrollTo({
top: 0,
behavior:'smooth'
});
});
</script>


</body>

Expand Down
50 changes: 50 additions & 0 deletions chatbot.html
Original file line number Diff line number Diff line change
Expand Up @@ -273,5 +273,55 @@
loader.style.display = "none";
});
</script>
<div id="back-to-top" class="back-to-top">
<i class="fas fa-chevron-up"></i>
</div>

<style>
.back-to-top {
position: fixed;
bottom: 20px;
right: 20px;
width: 50px;
height: 50px;
background-color: #007bff;
color: white;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
transition: opacity 0.3s;
opacity: 0;
visibility: hidden;
}

.back-to-top.show {
opacity: 1;
visibility: visible;
}
</style>

<script>
const backToTopButton = document.getElementById('back-to-top');

window.addEventListener('scroll', () => {
if (window.scrollY > 300) {
backToTopButton.classList.add('show');
} else {
backToTopButton.classList.remove('show');
}
});

backToTopButton.addEventListener('click', ()=>{
window.scrollTo({
top: 0,
behavior:'smooth'
});
});
</script>


</body>
</html>
51 changes: 50 additions & 1 deletion comment1.html
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,55 @@ <h2 class="footer-title secondary-title mt-2">Connect with us</h2>
<p>&copy; <span id="current-year"></span> WordWise. All rights reserved.</p>
</div>
</div>
</footer>
</footer><div id="back-to-top" class="back-to-top">
<i class="fas fa-chevron-up"></i>
</div>

<style>
.back-to-top {
position: fixed;
bottom: 20px;
right: 20px;
width: 50px;
height: 50px;
background-color: #007bff;
color: white;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
transition: opacity 0.3s;
opacity: 0;
visibility: hidden;
}

.back-to-top.show {
opacity: 1;
visibility: visible;
}
</style>

<script>
const backToTopButton = document.getElementById('back-to-top');

window.addEventListener('scroll', () => {
if (window.scrollY > 300) {
backToTopButton.classList.add('show');
} else {
backToTopButton.classList.remove('show');
}
});

backToTopButton.addEventListener('click', ()=>{
window.scrollTo({
top: 0,
behavior:'smooth'
});
});
</script>


</body>
</html>
51 changes: 50 additions & 1 deletion comment10.html
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,55 @@ <h2 class="footer-title secondary-title mt-2">Connect with us</h2>
<p>&copy; <span id="current-year"></span> WordWise. All rights reserved.</p>
</div>
</div>
</footer>
</footer><div id="back-to-top" class="back-to-top">
<i class="fas fa-chevron-up"></i>
</div>

<style>
.back-to-top {
position: fixed;
bottom: 20px;
right: 20px;
width: 50px;
height: 50px;
background-color: #007bff;
color: white;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
transition: opacity 0.3s;
opacity: 0;
visibility: hidden;
}

.back-to-top.show {
opacity: 1;
visibility: visible;
}
</style>

<script>
const backToTopButton = document.getElementById('back-to-top');

window.addEventListener('scroll', () => {
if (window.scrollY > 300) {
backToTopButton.classList.add('show');
} else {
backToTopButton.classList.remove('show');
}
});

backToTopButton.addEventListener('click', ()=>{
window.scrollTo({
top: 0,
behavior:'smooth'
});
});
</script>


</body>
</html>
51 changes: 50 additions & 1 deletion comment11.html
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,55 @@ <h2 class="footer-title secondary-title mt-2">Connect with us</h2>
<p>&copy; <span id="current-year"></span> WordWise. All rights reserved.</p>
</div>
</div>
</footer>
</footer><div id="back-to-top" class="back-to-top">
<i class="fas fa-chevron-up"></i>
</div>

<style>
.back-to-top {
position: fixed;
bottom: 20px;
right: 20px;
width: 50px;
height: 50px;
background-color: #007bff;
color: white;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
transition: opacity 0.3s;
opacity: 0;
visibility: hidden;
}

.back-to-top.show {
opacity: 1;
visibility: visible;
}
</style>

<script>
const backToTopButton = document.getElementById('back-to-top');

window.addEventListener('scroll', () => {
if (window.scrollY > 300) {
backToTopButton.classList.add('show');
} else {
backToTopButton.classList.remove('show');
}
});

backToTopButton.addEventListener('click', ()=>{
window.scrollTo({
top: 0,
behavior:'smooth'
});
});
</script>


</body>
</html>
Loading
Loading