Compare commits
No commits in common. "21d1e760d5f78943bc31985919313b2ca143417f" and "6119477d19ab8f611d2baeca7d78d85f7a4e4541" have entirely different histories.
21d1e760d5
...
6119477d19
@ -954,87 +954,87 @@ $(document).ready(function () {
|
|||||||
//////////////////////////////////////////
|
//////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
// /////////// Start script ressources ////////////////////////////////
|
/////////// Start script ressources ////////////////////////////////
|
||||||
|
|
||||||
// document.addEventListener("DOMContentLoaded", () => {
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
// const view = document.querySelector(".view");
|
const view = document.querySelector(".view");
|
||||||
// const elements = Array.from(view.children);
|
const elements = Array.from(view.children);
|
||||||
|
|
||||||
// let newView = document.createElement("div");
|
let newView = document.createElement("div");
|
||||||
// newView.classList.add("view");
|
newView.classList.add("view");
|
||||||
|
|
||||||
// let group = null;
|
let group = null;
|
||||||
// let groupContent = null;
|
let groupContent = null;
|
||||||
|
|
||||||
// elements.forEach((el) => {
|
elements.forEach((el) => {
|
||||||
// if (el.tagName === "H3") {
|
if (el.tagName === "H3") {
|
||||||
// if (group) {
|
if (group) {
|
||||||
// newView.appendChild(group);
|
newView.appendChild(group);
|
||||||
// }
|
}
|
||||||
|
|
||||||
// group = document.createElement("div");
|
group = document.createElement("div");
|
||||||
// group.classList.add("group");
|
group.classList.add("group");
|
||||||
|
|
||||||
// groupContent = document.createElement("div");
|
groupContent = document.createElement("div");
|
||||||
// groupContent.classList.add("group-content");
|
groupContent.classList.add("group-content");
|
||||||
|
|
||||||
// groupContent.appendChild(el);
|
groupContent.appendChild(el);
|
||||||
// group.appendChild(groupContent);
|
group.appendChild(groupContent);
|
||||||
// } else if (el.classList.contains("views-row")) {
|
} else if (el.classList.contains("views-row")) {
|
||||||
// groupContent.appendChild(el);
|
groupContent.appendChild(el);
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
|
|
||||||
// if (group) {
|
if (group) {
|
||||||
// newView.appendChild(group);
|
newView.appendChild(group);
|
||||||
// }
|
}
|
||||||
|
|
||||||
// view.replaceWith(newView);
|
view.replaceWith(newView);
|
||||||
|
|
||||||
// // Ajouter un bouton "Voir plus" dans chaque groupe
|
// Ajouter un bouton "Voir plus" dans chaque groupe
|
||||||
// document.querySelectorAll(".group").forEach((group) => {
|
document.querySelectorAll(".group").forEach((group) => {
|
||||||
// const rows = group.querySelectorAll(".views-row");
|
const rows = group.querySelectorAll(".views-row");
|
||||||
// const button = document.createElement("button");
|
const button = document.createElement("button");
|
||||||
// button.classList.add("toggle-btn");
|
button.classList.add("toggle-btn");
|
||||||
// button.textContent = "Voir plus de";
|
button.textContent = "Voir plus de";
|
||||||
|
|
||||||
// rows.forEach((row, index) => {
|
rows.forEach((row, index) => {
|
||||||
// if (index >= 3) {
|
if (index >= 3) {
|
||||||
// row.classList.add("hidden");
|
row.classList.add("hidden");
|
||||||
// row.style.maxHeight = "0";
|
row.style.maxHeight = "0";
|
||||||
// row.style.opacity = "0";
|
row.style.opacity = "0";
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
|
|
||||||
// button.addEventListener("click", () => {
|
button.addEventListener("click", () => {
|
||||||
// const isExpanded = button.textContent === "Voir moins de";
|
const isExpanded = button.textContent === "Voir moins de";
|
||||||
// const hiddenRows = group.querySelectorAll(".views-row.hidden");
|
const hiddenRows = group.querySelectorAll(".views-row.hidden");
|
||||||
|
|
||||||
// if (isExpanded) {
|
if (isExpanded) {
|
||||||
// // Cacher les lignes avec un délai pour l'effet de transition
|
// Cacher les lignes avec un délai pour l'effet de transition
|
||||||
// hiddenRows.forEach((row) => {
|
hiddenRows.forEach((row) => {
|
||||||
// row.style.maxHeight = "0";
|
row.style.maxHeight = "0";
|
||||||
// row.style.opacity = "0";
|
row.style.opacity = "0";
|
||||||
// setTimeout(() => row.classList.add("hidden"), 500); // Délai pour la transition
|
setTimeout(() => row.classList.add("hidden"), 500); // Délai pour la transition
|
||||||
// });
|
});
|
||||||
// } else {
|
} else {
|
||||||
// // Afficher les lignes
|
// Afficher les lignes
|
||||||
// hiddenRows.forEach((row) => {
|
hiddenRows.forEach((row) => {
|
||||||
// row.classList.remove("hidden");
|
row.classList.remove("hidden");
|
||||||
// row.style.maxHeight = row.scrollHeight + "px";
|
row.style.maxHeight = row.scrollHeight + "px";
|
||||||
// row.style.opacity = "1";
|
row.style.opacity = "1";
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
|
|
||||||
// button.textContent = isExpanded ? "Voir plus de" : "Voir moins de";
|
button.textContent = isExpanded ? "Voir plus de" : "Voir moins de";
|
||||||
// });
|
});
|
||||||
|
|
||||||
// group.appendChild(button);
|
group.appendChild(button);
|
||||||
// });
|
});
|
||||||
// });
|
});
|
||||||
|
|
||||||
|
|
||||||
// /////////// end script ressources ////////////////////////////////
|
/////////// end script ressources ////////////////////////////////
|
||||||
|
|
||||||
})(jQuery, window);
|
})(jQuery, window);
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
@ -896,87 +896,87 @@ $(document).ready(function () {
|
|||||||
//////////////////////////////////////////
|
//////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
// /////////// Start script ressources ////////////////////////////////
|
/////////// Start script ressources ////////////////////////////////
|
||||||
|
|
||||||
// document.addEventListener("DOMContentLoaded", () => {
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
// const view = document.querySelector(".view");
|
const view = document.querySelector(".view");
|
||||||
// const elements = Array.from(view.children);
|
const elements = Array.from(view.children);
|
||||||
|
|
||||||
// let newView = document.createElement("div");
|
let newView = document.createElement("div");
|
||||||
// newView.classList.add("view");
|
newView.classList.add("view");
|
||||||
|
|
||||||
// let group = null;
|
let group = null;
|
||||||
// let groupContent = null;
|
let groupContent = null;
|
||||||
|
|
||||||
// elements.forEach((el) => {
|
elements.forEach((el) => {
|
||||||
// if (el.tagName === "H3") {
|
if (el.tagName === "H3") {
|
||||||
// if (group) {
|
if (group) {
|
||||||
// newView.appendChild(group);
|
newView.appendChild(group);
|
||||||
// }
|
}
|
||||||
|
|
||||||
// group = document.createElement("div");
|
group = document.createElement("div");
|
||||||
// group.classList.add("group");
|
group.classList.add("group");
|
||||||
|
|
||||||
// groupContent = document.createElement("div");
|
groupContent = document.createElement("div");
|
||||||
// groupContent.classList.add("group-content");
|
groupContent.classList.add("group-content");
|
||||||
|
|
||||||
// groupContent.appendChild(el);
|
groupContent.appendChild(el);
|
||||||
// group.appendChild(groupContent);
|
group.appendChild(groupContent);
|
||||||
// } else if (el.classList.contains("views-row")) {
|
} else if (el.classList.contains("views-row")) {
|
||||||
// groupContent.appendChild(el);
|
groupContent.appendChild(el);
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
|
|
||||||
// if (group) {
|
if (group) {
|
||||||
// newView.appendChild(group);
|
newView.appendChild(group);
|
||||||
// }
|
}
|
||||||
|
|
||||||
// view.replaceWith(newView);
|
view.replaceWith(newView);
|
||||||
|
|
||||||
// // Ajouter un bouton "Voir plus" dans chaque groupe
|
// Ajouter un bouton "Voir plus" dans chaque groupe
|
||||||
// document.querySelectorAll(".group").forEach((group) => {
|
document.querySelectorAll(".group").forEach((group) => {
|
||||||
// const rows = group.querySelectorAll(".views-row");
|
const rows = group.querySelectorAll(".views-row");
|
||||||
// const button = document.createElement("button");
|
const button = document.createElement("button");
|
||||||
// button.classList.add("toggle-btn");
|
button.classList.add("toggle-btn");
|
||||||
// button.textContent = "Voir plus de";
|
button.textContent = "Voir plus de";
|
||||||
|
|
||||||
// rows.forEach((row, index) => {
|
rows.forEach((row, index) => {
|
||||||
// if (index >= 3) {
|
if (index >= 3) {
|
||||||
// row.classList.add("hidden");
|
row.classList.add("hidden");
|
||||||
// row.style.maxHeight = "0";
|
row.style.maxHeight = "0";
|
||||||
// row.style.opacity = "0";
|
row.style.opacity = "0";
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
|
|
||||||
// button.addEventListener("click", () => {
|
button.addEventListener("click", () => {
|
||||||
// const isExpanded = button.textContent === "Voir moins de";
|
const isExpanded = button.textContent === "Voir moins de";
|
||||||
// const hiddenRows = group.querySelectorAll(".views-row.hidden");
|
const hiddenRows = group.querySelectorAll(".views-row.hidden");
|
||||||
|
|
||||||
// if (isExpanded) {
|
if (isExpanded) {
|
||||||
// // Cacher les lignes avec un délai pour l'effet de transition
|
// Cacher les lignes avec un délai pour l'effet de transition
|
||||||
// hiddenRows.forEach((row) => {
|
hiddenRows.forEach((row) => {
|
||||||
// row.style.maxHeight = "0";
|
row.style.maxHeight = "0";
|
||||||
// row.style.opacity = "0";
|
row.style.opacity = "0";
|
||||||
// setTimeout(() => row.classList.add("hidden"), 500); // Délai pour la transition
|
setTimeout(() => row.classList.add("hidden"), 500); // Délai pour la transition
|
||||||
// });
|
});
|
||||||
// } else {
|
} else {
|
||||||
// // Afficher les lignes
|
// Afficher les lignes
|
||||||
// hiddenRows.forEach((row) => {
|
hiddenRows.forEach((row) => {
|
||||||
// row.classList.remove("hidden");
|
row.classList.remove("hidden");
|
||||||
// row.style.maxHeight = row.scrollHeight + "px";
|
row.style.maxHeight = row.scrollHeight + "px";
|
||||||
// row.style.opacity = "1";
|
row.style.opacity = "1";
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
|
|
||||||
// button.textContent = isExpanded ? "Voir plus de" : "Voir moins de";
|
button.textContent = isExpanded ? "Voir plus de" : "Voir moins de";
|
||||||
// });
|
});
|
||||||
|
|
||||||
// group.appendChild(button);
|
group.appendChild(button);
|
||||||
// });
|
});
|
||||||
// });
|
});
|
||||||
|
|
||||||
|
|
||||||
// /////////// end script ressources ////////////////////////////////
|
/////////// end script ressources ////////////////////////////////
|
||||||
|
|
||||||
})(jQuery, window);
|
})(jQuery, window);
|
||||||
|
|
||||||
|
@ -39,7 +39,11 @@
|
|||||||
* @see html.html.twig
|
* @see html.html.twig
|
||||||
*/
|
*/
|
||||||
#}
|
#}
|
||||||
|
<<<<<<< HEAD
|
||||||
<div class="layout-container " id="ressources">
|
<div class="layout-container " id="ressources">
|
||||||
|
=======
|
||||||
|
<div class="layout-container" id="ressources">
|
||||||
|
>>>>>>> prod
|
||||||
|
|
||||||
<header role="banner">
|
<header role="banner">
|
||||||
{{ page.header_left }}
|
{{ page.header_left }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user