smoother navbar black background when scrolled
This commit is contained in:
@@ -1596,7 +1596,8 @@ div.posts>a:hover::after {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.navbar.scrolled {
|
.navbar.scrolled {
|
||||||
background: #000 !important;
|
background: black !important;
|
||||||
|
transition: background 0.1s ease;
|
||||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4028,9 +4029,11 @@ input#s_avatar {
|
|||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
#comment-sort, #subscribe-btn, #lock-thread-btn {
|
#comment-sort,
|
||||||
background: none;
|
#subscribe-btn,
|
||||||
border: none;
|
#lock-thread-btn {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Admin buttons */
|
/* Admin buttons */
|
||||||
|
|||||||
@@ -295,7 +295,7 @@ window.requestAnimFrame = (function () {
|
|||||||
const navbar = document.querySelector('.navbar');
|
const navbar = document.querySelector('.navbar');
|
||||||
if (navbar) {
|
if (navbar) {
|
||||||
window.addEventListener('scroll', () => {
|
window.addEventListener('scroll', () => {
|
||||||
if (window.scrollY > 50) {
|
if (window.scrollY > 10) {
|
||||||
navbar.classList.add('scrolled');
|
navbar.classList.add('scrolled');
|
||||||
} else {
|
} else {
|
||||||
navbar.classList.remove('scrolled');
|
navbar.classList.remove('scrolled');
|
||||||
|
|||||||
Reference in New Issue
Block a user