Remove confusing disaperaing logic for landingpage fab (#26845)

This commit is contained in:
Joakim Sørensen 2023-04-03 10:44:17 +02:00 committed by GitHub
parent cd9e91f797
commit 534dd9cbb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,17 +81,10 @@ layout: page
"scroll", "scroll",
function (e) { function (e) {
const header = document.querySelector(".site-header"); const header = document.querySelector(".site-header");
const fab = document.querySelector(".fab");
if (e.currentTarget.scrollTop > 180) { if (e.currentTarget.scrollTop > 180) {
header.style.backgroundColor = "#ffffff"; header.style.backgroundColor = "#ffffff";
if (fab) {
fab.style.display = "flex";
}
} else { } else {
header.style.backgroundColor = "#ffffff66"; header.style.backgroundColor = "#ffffff66";
if (fab) {
fab.style.display = "none";
}
} }
}, },
{ passive: true, capture: true } { passive: true, capture: true }