css filtre, js type ressources

This commit is contained in:
2025-05-23 13:49:57 +02:00
parent 334a9e1508
commit 2beb6ca342
7 changed files with 128 additions and 19 deletions
+13 -9
View File
@@ -141,7 +141,19 @@ jQuery(function ($) {
});
console.log("classses media");
// MASQUER TYPE DE RESSOURCE DOUBLON
if (document.body.classList.contains("path-ressources")) {
$(".view-type-slide").each(function () {
const h3Content = $(this).find("h3").text().trim();
console.log(h3Content);
$(this).find(".field--name-field-type-de-ressource .field__item a").each(function () {
if ($(this).text().trim() === h3Content) {
$(this).hide();
}
});
});
}
// Ouvrir les liens externes dans un nouvel onglet
document.querySelectorAll('a[href^="http"]').forEach(link => {
@@ -165,14 +177,6 @@ jQuery(function ($) {
}
}
// MASQUER TYPE DE RESSOURCE DOUBLON
$(".view-type-slide").each(function () {
const h3Content = $(this).find("h3").text().trim();
$(this).find(".field--name-field-type-de-ressource").each(function () {
if ($(this).text().trim() === h3Content) {
$(this).hide();
}
});
});
}
});