Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added anchors to guides and external resources #3075

Merged
merged 8 commits into from
May 27, 2022
17 changes: 10 additions & 7 deletions pages/toolkit.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,16 @@ <h2 class="title3">Guides</h2>
let currentHash = location.hash.split('#')[1].replace("+", "").toLowerCase();

let cardContainers = document.querySelectorAll("[data-article-type]");
cardContainers.forEach((card) => {
if (currentHash == 'all') {
card.style.display = 'block';
return;
}
card.dataset.articleType == currentHash ? card.style.display = "block" : card.style.display = "none";
});
let guidesCategories = ["all", "development", "design", "projectmanagement", "professionaldevelopment"]
Carlos-A-P marked this conversation as resolved.
Show resolved Hide resolved
if(guidesCategories.includes(currentHash)){
cardContainers.forEach((card) => {
if (currentHash == 'all') {
card.style.display = 'block';
return;
}
card.dataset.articleType == currentHash ? card.style.display = "block" : card.style.display = "none";
});
}
}
</script>

Expand Down