WSGC's and Anthology's templates.

This commit is contained in:
Norm Rasmussen
2024-09-16 18:08:12 -04:00
parent e78efae8aa
commit d87eb0db7f
3 changed files with 9 additions and 11 deletions

View File

@ -37,7 +37,6 @@
$('document').ready(function(){
let allCategoryFilters = document.querySelectorAll('.category-filter-entry');
let allSearchedResults = document.querySelectorAll('.course-card');
for(let i = 1; i < allCategoryFilters.length; i++){
let catFound = false;
for(let j = 0; j < allSearchedResults.length; j++){
@ -52,13 +51,13 @@
// allCategoryFilters[i].style.display = 'none';
// }
allCategoryFilters[i].style.display = 'none';
}
}
}
});
let filterByCategory = () => {
// console.log(event.target.value);
let allLearning = document.querySelector('.np-catalog-courses').children;
// console.log(allLearning);
@ -67,11 +66,11 @@
if(event.target.value == 'Default'){
// if(!allLearning[i].classList.contains('hidden-by-search')){
// allLearning[i].style.display = 'block';
// }
// }
if(!allLearning[i].classList.contains('hidden-by-product')){
allLearning[i].style.display = 'block';
}
}
allLearning[i].classList.remove('filtered');
} else {
if(allLearning[i].dataset.categories.indexOf(event.target.value) == -1){
@ -81,13 +80,13 @@
// if(!allLearning[i].classList.contains('hidden-by-search')){
// allLearning[i].style.display = 'block';
// }
if(!allLearning[i].classList.contains('hidden-by-product')){
allLearning[i].style.display = 'block';
}
}
allLearning[i].classList.remove('filtered');
};
};
};
}
</script>
</script>

View File

@ -36,7 +36,6 @@
<span class="np-resource-subtitle-number">{{ results.count }} Resources</span> {% endcomment %}
{% endif %}
{% comment %} {% t .results_for %} {% endcomment %}
</div>
{% if render_search %}
<div style="align-items: center; display: flex; flex-direction: row;">
@ -213,4 +212,4 @@
height: 100%;
}
}
</style>
</style>

View File

@ -36,4 +36,4 @@
text-decoration: none;
}
</style>
</style>