Skip to content

Commit

Permalink
Improve checkpoint behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
alanrme committed Jul 14, 2024
1 parent d804073 commit 5e67eec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ ready(() => {
}, 150);

function sectionActions() {
const vh = Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0)
const vh = Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0) * 0.8
// width to set the scroll progress bar to
let newWidth = 0;

Expand All @@ -202,7 +202,8 @@ ready(() => {
if (rect.top < 0) {
header.classList.add("sticky")
listenerF = (event) => {
if (event.target.classList.contains("sticky")) {
console.log(event)
if (event.propertyName == "transform" && event.target.classList.contains("sticky")) {
event.target.classList.add("active")
}
event.target.removeEventListener("transitionend", listenerF)
Expand Down

0 comments on commit 5e67eec

Please sign in to comment.