Skip to content

Commit

Permalink
Update Resume
Browse files Browse the repository at this point in the history
  • Loading branch information
erlisakulla committed Sep 23, 2021
1 parent 16bae16 commit 3d78cf0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 42 deletions.
24 changes: 0 additions & 24 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,30 +33,6 @@

gtag('config', '%REACT_APP_MEASUREMENT_ID%');
</script>

<script>
const sections = document.querySelectorAll("section");
const navLi = document.querySelectorAll(".nav a .nav-link");
window.addEventListener("scroll", () => {
let current = "";
sections.forEach((section) => {
const sectionTop = section.offsetTop;
const sectionHeight = section.clientHeight;
if (pageYOffset >= sectionTop - sectionHeight / 3) {
current = section.getAttribute("id");
}
});

navLi.forEach((li) => {
li.classList.remove("active");
if (li.classList.contains(current)) {
li.classList.add("active");
console.log(li);
}
});
});

</script>

<title>Erlisa Kulla</title>
</head>
Expand Down
Binary file modified src/resume/ErlisaKullaCV-Sep2021.pdf
Binary file not shown.
36 changes: 18 additions & 18 deletions src/utils/activenav.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
const sections = document.querySelectorAll("section");
const navLi = document.querySelectorAll(".nav-link");
window.addEventListener("scroll", () => {
let current = "";
sections.forEach((section) => {
const sectionTop = section.offsetTop;
const sectionHeight = section.clientHeight;
if (pageYOffset >= sectionTop - sectionHeight / 3) {
current = section.getAttribute("id");
}
});
// const sections = document.querySelectorAll("section");
// const navLi = document.querySelectorAll(".nav-link");
// window.addEventListener("scroll", () => {
// let current = "";
// sections.forEach((section) => {
// const sectionTop = section.offsetTop;
// const sectionHeight = section.clientHeight;
// if (pageYOffset >= sectionTop - sectionHeight / 3) {
// current = section.getAttribute("id");
// }
// });

navLi.forEach((li) => {
li.classList.remove("active");
if (li.classList.contains(current)) {
li.classList.add("active");
}
});
});
// navLi.forEach((li) => {
// li.classList.remove("active");
// if (li.classList.contains(current)) {
// li.classList.add("active");
// }
// });
// });

0 comments on commit 3d78cf0

Please sign in to comment.