smoother navbar black background when scrolled

This commit is contained in:
2026-01-26 18:23:49 +01:00
parent 588ab3c3de
commit b71711aa96
2 changed files with 8 additions and 5 deletions

View File

@@ -295,7 +295,7 @@ window.requestAnimFrame = (function () {
const navbar = document.querySelector('.navbar');
if (navbar) {
window.addEventListener('scroll', () => {
if (window.scrollY > 50) {
if (window.scrollY > 10) {
navbar.classList.add('scrolled');
} else {
navbar.classList.remove('scrolled');