untrack content dir

This commit is contained in:
isUnknown 2024-03-09 11:27:10 +01:00
parent 55684b6079
commit fb310b279e
47 changed files with 634 additions and 189 deletions

View file

@ -1,13 +1,21 @@
const remFactor = 16;
const verticalUnit = 1.3 * remFactor;
function openTab(data, tab) {
data.activeTab === tab ? (data.activeTab = "") : (data.activeTab = tab);
function toggleTab(data, tab) {
if (data.activeTab === tab) {
scrollToElem("body");
setTimeout(() => {
data.activeTab = "";
}, 200);
} else {
data.activeTab = tab;
scrollToElem(".active-tab");
}
}
function scrollToElem(selector) {
setTimeout(() => {
const yOffset = -9 * verticalUnit;
const yOffset = -7 * verticalUnit;
const elem = document.querySelector(selector);
const top = elem.getBoundingClientRect().top;
window.scrollTo({