Refactor code structure and remove redundant changes

This commit is contained in:
Marek Lesko
2025-08-05 11:50:31 +02:00
parent 0019c5c601
commit b34826f9bf
374 changed files with 49565 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
const scrollUp = () => {
const scrollUpElement = document.querySelector(".scroll-up");
if (scrollUpElement) {
scrollUpElement.addEventListener("click", () => {
window.scroll({ top: 0, left: 0, behavior: "smooth" });
});
window.addEventListener("scroll", () => {
const scrollCount = window.scrollY;
if (scrollCount < 300) {
scrollUpElement.classList.remove("active");
}
if (scrollCount > 300) {
scrollUpElement.classList.add("active");
}
});
}
};