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

@@ -1596,7 +1596,8 @@ div.posts>a:hover::after {
}
.navbar.scrolled {
background: #000 !important;
background: black !important;
transition: background 0.1s ease;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
@@ -4028,9 +4029,11 @@ input#s_avatar {
text-decoration: underline;
}
#comment-sort, #subscribe-btn, #lock-thread-btn {
background: none;
border: none;
#comment-sort,
#subscribe-btn,
#lock-thread-btn {
background: none;
border: none;
}
/* Admin buttons */

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');