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
19 changes: 19 additions & 0 deletions bihar-culture-landing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,25 @@ <h2>Contribute to Bihar Culture</h2>
</div>
</footer>

<!-- Back to Top Button -->
<button id="backToTopBtn" title="Back to Top">↑ Back to Top</button>

<script src="script.js"></script>
<script>
// Show/hide button on scroll
const backToTopBtn = document.getElementById('backToTopBtn');
window.onscroll = function() {
if (document.body.scrollTop > 200 || document.documentElement.scrollTop > 200) {
backToTopBtn.style.display = "block";
} else {
backToTopBtn.style.display = "none";
}
};

// Smooth scroll to top
backToTopBtn.onclick = function() {
window.scrollTo({ top: 0, behavior: 'smooth' });
};
</script>
</body>
</html>
25 changes: 25 additions & 0 deletions bihar-culture-landing/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,31 @@ footer {
font-size: 0.95rem;
}

/* Back to Top Button Styles */
#backToTopBtn {
display: none;
position: fixed;
bottom: 32px;
right: 32px;
z-index: 1000;
background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
color: var(--white);
border: none;
outline: none;
padding: 12px 20px;
border-radius: 24px;
font-size: 1rem;
cursor: pointer;
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
transition: background 0.2s, box-shadow 0.2s;
font-weight: 600;
letter-spacing: 0.5px;
}
#backToTopBtn:hover {
background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
box-shadow: 0 4px 16px rgba(255,107,53,0.18);
}

/* Responsive Design */
@media (max-width: 768px) {
.nav-container {
Expand Down
Loading