untrack content dir
This commit is contained in:
parent
55684b6079
commit
fb310b279e
47 changed files with 634 additions and 189 deletions
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue