Skip to content

Commit

Permalink
Trying to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
tnylea committed Sep 29, 2023
1 parent fe75c18 commit ab80f8d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 34 deletions.
48 changes: 14 additions & 34 deletions assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ document.addEventListener("DOMContentLoaded", function() {
loadGsapAnimations();
createRadialBackgrounds();
updateTOC();
window.addEventListener('static:content', function(evt) {
console.log('entered');
alert('got');
console.log(JSON.parse(evt.detail.toc));
window.dispatchEvent(new CustomEvent('set-toc', { detail: { toc: JSON.parse(evt.detail.toc) } }));
});
});

function loadGsapAnimations(){
Expand All @@ -39,8 +33,7 @@ function loadGsapAnimations(){
end: "top 10%",
scrub: true
},
opacity: 0,
scrub: true
opacity: 0
});
gsap.fromTo("#hero-main img.bounce-image", {
scale: 0.8
Expand All @@ -65,8 +58,7 @@ function loadGsapAnimations(){
scrub: true,
},
y: -150,
opacity: 1,
scrub: true
opacity: 1
});
}

Expand All @@ -79,8 +71,7 @@ function loadGsapAnimations(){
scrub: true
},
x: -50,
opacity: 1,
scrub: true
opacity: 1
});
}

Expand All @@ -93,8 +84,7 @@ function loadGsapAnimations(){
scrub: true
},
y: -150,
opacity: 1,
scrub: true
opacity: 1
});
}

Expand All @@ -108,8 +98,7 @@ function loadGsapAnimations(){
debug: true
},
y: 0,
opacity: 1,
scrub: true
opacity: 1
});
}

Expand All @@ -123,8 +112,7 @@ function loadGsapAnimations(){
},
opacity: 1,
y: 0,
opacity: 1,
scrub: true
opacity: 1
});
}

Expand All @@ -138,8 +126,7 @@ function loadGsapAnimations(){
debug: true
},
scale: 1,
y: 0,
scrub: true
y: 0
});
}

Expand All @@ -152,8 +139,7 @@ function loadGsapAnimations(){
scrub: true,
debug: true
},
opacity: 1,
scrub: true
opacity: 1
});
}

Expand All @@ -166,8 +152,7 @@ function loadGsapAnimations(){
scrub: true,
debug: true
},
y: 0,
scrub: true
y: 0
});
}

Expand All @@ -181,8 +166,7 @@ function loadGsapAnimations(){
},
opacity: 1,
y: 0,
opacity: 1,
scrub: true
opacity: 1
});
}

Expand All @@ -196,8 +180,7 @@ function loadGsapAnimations(){
},
opacity: 1,
y: 0,
opacity: 1,
scrub: true
opacity: 1
});
}

Expand All @@ -211,8 +194,7 @@ function loadGsapAnimations(){
},
opacity: 1,
y: 0,
opacity: 1,
scrub: true
opacity: 1
});
}

Expand All @@ -226,8 +208,7 @@ function loadGsapAnimations(){
debug: true
},
scale: 1,
y: 0,
scrub: true
y: 0
});
}

Expand All @@ -241,8 +222,7 @@ function loadGsapAnimations(){
debug: true
},
scale: 1,
y: 0,
scrub: true
y: 0
});
}
}
Expand Down
8 changes: 8 additions & 0 deletions layouts/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,13 @@
</div>

<script src="{ url('/assets/js/main.js') }"></script>
<script>
window.addEventListener('static:content', function(evt) {
console.log('entered');
alert('got');
console.log(JSON.parse(evt.detail.toc));
window.dispatchEvent(new CustomEvent('set-toc', { detail: { toc: JSON.parse(evt.detail.toc) } }));
});
</script>
</body>
</html>

0 comments on commit ab80f8d

Please sign in to comment.