mirror of
https://github.com/jgthms/bulma
synced 2026-03-17 19:04:30 -07:00
Add main layout
This commit is contained in:
@@ -287,23 +287,23 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}
|
||||
}
|
||||
|
||||
translateHeader(window.scrollY, false);
|
||||
// translateHeader(window.scrollY, false);
|
||||
|
||||
let ticking = false;
|
||||
let lastY = 0;
|
||||
|
||||
window.addEventListener('scroll', function() {
|
||||
const currentY = window.scrollY;
|
||||
// window.addEventListener('scroll', function() {
|
||||
// const currentY = window.scrollY;
|
||||
|
||||
if (!ticking) {
|
||||
window.requestAnimationFrame(function() {
|
||||
upOrDown(lastY, currentY);
|
||||
ticking = false;
|
||||
lastY = currentY;
|
||||
});
|
||||
}
|
||||
// if (!ticking) {
|
||||
// window.requestAnimationFrame(function() {
|
||||
// upOrDown(lastY, currentY);
|
||||
// ticking = false;
|
||||
// lastY = currentY;
|
||||
// });
|
||||
// }
|
||||
|
||||
ticking = true;
|
||||
});
|
||||
// ticking = true;
|
||||
// });
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user