Skip to content

Commit

Permalink
Fix smooth scroll buttons on the Portfolio page (#37)
Browse files Browse the repository at this point in the history
* fix: fixed smooth scroll buttons

After preliminary changes the final adjustments came down to HTML id's being reassigned

* fix: remove console log statements
  • Loading branch information
acumulus8 authored Nov 10, 2023
1 parent 68d04f8 commit 40770c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 2 additions & 1 deletion app/assets/scripts/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ function loadPortfolioPageJS() {
hideShadeBtn: allHideShadeButtons[i],
shadedArticle: allShadedArticles[i],
});
new SmoothScroll(document.getElementById(`${allShowShadeButtons[i].getAttribute("id")}`));
new SmoothScroll(allShowShadeButtons[i]);
// new SmoothScroll(document.getElementById(`${allShowShadeButtons[i].getAttribute("id")}`));
}

shadeButtonGroups.forEach((group) => {
Expand Down
7 changes: 2 additions & 5 deletions app/portfolio.html
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,6 @@ <h5>TLDR Summary:</h5>
</div>
</article>

<!-- <hr class="project__divider" id="materials-proj-scroll-anchor" /> -->
<!-- <span id="materials-proj-scroll-anchor"></span> -->

<article class="project project--professional" id="materials-proj-scroll-anchor">
<div class="project__text">
<h3 class="project__heading">Materials Testing Online Ordering System</h3>
Expand Down Expand Up @@ -497,10 +494,10 @@ <h4>International Materials Testing Laboratory</h4>
</div>
</article>

<hr class="project__divider" id="salon-proj-scroll-anchor" />
<!-- <hr class="project__divider" id="salon-proj-scroll-anchor" /> -->

<article class="project project--professional" id="salon-business">
<div class="project__text">
<div class="project__text" id="salon-proj-scroll-anchor">
<h3 class="project__heading">Business Administration and Management Applications</h3>
<h4>Regional Franchised Salon Business</h4>
<p>
Expand Down

0 comments on commit 40770c4

Please sign in to comment.