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

View File

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

View File

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