save before move tabs outside from header

This commit is contained in:
isUnknown 2024-03-10 12:03:31 +01:00
parent f9397935bd
commit 94d404288f
13 changed files with 116 additions and 64 deletions

10
assets/dist/script.js vendored
View file

@ -1,7 +1,7 @@
"use strict";
function openTab(data, tab) {
data.activeTab === tab ? data.activeTab = "" : data.activeTab = tab;
data.activeTab === tab ? (data.activeTab = "") : (data.activeTab = tab);
}
function scrollToElem(selector) {
setTimeout(function () {
@ -10,7 +10,7 @@ function scrollToElem(selector) {
var top = elem.getBoundingClientRect().top;
window.scrollTo({
top: top + window.scrollY + yOffset,
behavior: "smooth"
behavior: "smooth",
});
}, 100);
}
@ -18,12 +18,12 @@ document.addEventListener("DOMContentLoaded", function () {
function toggleLogoState() {
var scrollY = window.scrollY || window.pageYOffset;
if (scrollY > 10) {
document.querySelector("#header").classList.add("minimized");
document.querySelector("#main-header").classList.add("minimized");
} else {
document.querySelector("#header").classList.remove("minimized");
document.querySelector("#main-header").classList.remove("minimized");
}
}
window.addEventListener("scroll", function () {
toggleLogoState();
});
});
});