Compare commits
No commits in common. "6119477d19ab8f611d2baeca7d78d85f7a4e4541" and "9f6a9a9c5eb4ee30c563e60d2230ae9072abb535" have entirely different histories.
6119477d19
...
9f6a9a9c5e
@ -951,91 +951,6 @@ $(document).ready(function () {
|
|||||||
/////////////////// end voir plus... actualite dans /actualites & /home ////////////////////
|
/////////////////// end voir plus... actualite dans /actualites & /home ////////////////////
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////// Start script ressources ////////////////////////////////
|
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", () => {
|
|
||||||
const view = document.querySelector(".view");
|
|
||||||
const elements = Array.from(view.children);
|
|
||||||
|
|
||||||
let newView = document.createElement("div");
|
|
||||||
newView.classList.add("view");
|
|
||||||
|
|
||||||
let group = null;
|
|
||||||
let groupContent = null;
|
|
||||||
|
|
||||||
elements.forEach((el) => {
|
|
||||||
if (el.tagName === "H3") {
|
|
||||||
if (group) {
|
|
||||||
newView.appendChild(group);
|
|
||||||
}
|
|
||||||
|
|
||||||
group = document.createElement("div");
|
|
||||||
group.classList.add("group");
|
|
||||||
|
|
||||||
groupContent = document.createElement("div");
|
|
||||||
groupContent.classList.add("group-content");
|
|
||||||
|
|
||||||
groupContent.appendChild(el);
|
|
||||||
group.appendChild(groupContent);
|
|
||||||
} else if (el.classList.contains("views-row")) {
|
|
||||||
groupContent.appendChild(el);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (group) {
|
|
||||||
newView.appendChild(group);
|
|
||||||
}
|
|
||||||
|
|
||||||
view.replaceWith(newView);
|
|
||||||
|
|
||||||
// Ajouter un bouton "Voir plus" dans chaque groupe
|
|
||||||
document.querySelectorAll(".group").forEach((group) => {
|
|
||||||
const rows = group.querySelectorAll(".views-row");
|
|
||||||
const button = document.createElement("button");
|
|
||||||
button.classList.add("toggle-btn");
|
|
||||||
button.textContent = "Voir plus de";
|
|
||||||
|
|
||||||
rows.forEach((row, index) => {
|
|
||||||
if (index >= 3) {
|
|
||||||
row.classList.add("hidden");
|
|
||||||
row.style.maxHeight = "0";
|
|
||||||
row.style.opacity = "0";
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
button.addEventListener("click", () => {
|
|
||||||
const isExpanded = button.textContent === "Voir moins de";
|
|
||||||
const hiddenRows = group.querySelectorAll(".views-row.hidden");
|
|
||||||
|
|
||||||
if (isExpanded) {
|
|
||||||
// Cacher les lignes avec un délai pour l'effet de transition
|
|
||||||
hiddenRows.forEach((row) => {
|
|
||||||
row.style.maxHeight = "0";
|
|
||||||
row.style.opacity = "0";
|
|
||||||
setTimeout(() => row.classList.add("hidden"), 500); // Délai pour la transition
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
// Afficher les lignes
|
|
||||||
hiddenRows.forEach((row) => {
|
|
||||||
row.classList.remove("hidden");
|
|
||||||
row.style.maxHeight = row.scrollHeight + "px";
|
|
||||||
row.style.opacity = "1";
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
button.textContent = isExpanded ? "Voir plus de" : "Voir moins de";
|
|
||||||
});
|
|
||||||
|
|
||||||
group.appendChild(button);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
/////////// end script ressources ////////////////////////////////
|
|
||||||
|
|
||||||
})(jQuery, window);
|
})(jQuery, window);
|
||||||
|
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
@ -4079,6 +4079,10 @@ body {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.html.js.sr body.node-type-site.node-id-40 div.dialog-off-canvas-main-canvas div#page-node.layout-container main div.layout-content div.content_container div.layout.layout--threecol-25-50-25 div.layout__region.layout__region--third div.block-region-third div div.field_field_documents div div span {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
main {
|
main {
|
||||||
background-color: #f6f7f3;
|
background-color: #f6f7f3;
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,6 @@ function quartiers_de_demain_preprocess_field(&$variables) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prepares variables for block templates.
|
* Prepares variables for block templates.
|
||||||
*
|
*
|
||||||
|
@ -893,91 +893,6 @@ $(document).ready(function () {
|
|||||||
/////////////////// end voir plus... actualite dans /actualites & /home ////////////////////
|
/////////////////// end voir plus... actualite dans /actualites & /home ////////////////////
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/////////// Start script ressources ////////////////////////////////
|
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", () => {
|
|
||||||
const view = document.querySelector(".view");
|
|
||||||
const elements = Array.from(view.children);
|
|
||||||
|
|
||||||
let newView = document.createElement("div");
|
|
||||||
newView.classList.add("view");
|
|
||||||
|
|
||||||
let group = null;
|
|
||||||
let groupContent = null;
|
|
||||||
|
|
||||||
elements.forEach((el) => {
|
|
||||||
if (el.tagName === "H3") {
|
|
||||||
if (group) {
|
|
||||||
newView.appendChild(group);
|
|
||||||
}
|
|
||||||
|
|
||||||
group = document.createElement("div");
|
|
||||||
group.classList.add("group");
|
|
||||||
|
|
||||||
groupContent = document.createElement("div");
|
|
||||||
groupContent.classList.add("group-content");
|
|
||||||
|
|
||||||
groupContent.appendChild(el);
|
|
||||||
group.appendChild(groupContent);
|
|
||||||
} else if (el.classList.contains("views-row")) {
|
|
||||||
groupContent.appendChild(el);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (group) {
|
|
||||||
newView.appendChild(group);
|
|
||||||
}
|
|
||||||
|
|
||||||
view.replaceWith(newView);
|
|
||||||
|
|
||||||
// Ajouter un bouton "Voir plus" dans chaque groupe
|
|
||||||
document.querySelectorAll(".group").forEach((group) => {
|
|
||||||
const rows = group.querySelectorAll(".views-row");
|
|
||||||
const button = document.createElement("button");
|
|
||||||
button.classList.add("toggle-btn");
|
|
||||||
button.textContent = "Voir plus de";
|
|
||||||
|
|
||||||
rows.forEach((row, index) => {
|
|
||||||
if (index >= 3) {
|
|
||||||
row.classList.add("hidden");
|
|
||||||
row.style.maxHeight = "0";
|
|
||||||
row.style.opacity = "0";
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
button.addEventListener("click", () => {
|
|
||||||
const isExpanded = button.textContent === "Voir moins de";
|
|
||||||
const hiddenRows = group.querySelectorAll(".views-row.hidden");
|
|
||||||
|
|
||||||
if (isExpanded) {
|
|
||||||
// Cacher les lignes avec un délai pour l'effet de transition
|
|
||||||
hiddenRows.forEach((row) => {
|
|
||||||
row.style.maxHeight = "0";
|
|
||||||
row.style.opacity = "0";
|
|
||||||
setTimeout(() => row.classList.add("hidden"), 500); // Délai pour la transition
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
// Afficher les lignes
|
|
||||||
hiddenRows.forEach((row) => {
|
|
||||||
row.classList.remove("hidden");
|
|
||||||
row.style.maxHeight = row.scrollHeight + "px";
|
|
||||||
row.style.opacity = "1";
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
button.textContent = isExpanded ? "Voir plus de" : "Voir moins de";
|
|
||||||
});
|
|
||||||
|
|
||||||
group.appendChild(button);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
/////////// end script ressources ////////////////////////////////
|
|
||||||
|
|
||||||
})(jQuery, window);
|
})(jQuery, window);
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
#ressources{
|
|
||||||
.group-content {
|
|
||||||
// background: #f9f9f9;
|
|
||||||
padding: 10px;
|
|
||||||
border-radius: 8px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
// box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.views-row {
|
|
||||||
padding: 8px;
|
|
||||||
// background: #f3f3f3;
|
|
||||||
margin: 2px 0;
|
|
||||||
border-radius: 4px;
|
|
||||||
transition: max-height 0.5s ease, opacity 0.5s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hidden {
|
|
||||||
max-height: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle-btn {
|
|
||||||
background: none;
|
|
||||||
color: $blue_QDD;
|
|
||||||
border: solid $blue_QDD 1px;
|
|
||||||
padding: 8px 12px;
|
|
||||||
cursor: pointer;
|
|
||||||
margin-top: 5px;
|
|
||||||
display: block;
|
|
||||||
margin: auto;
|
|
||||||
width: 20%;
|
|
||||||
text-align: center;
|
|
||||||
transition: background 0.3s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle-btn:hover {
|
|
||||||
background: $blue_QDD;
|
|
||||||
color:white;
|
|
||||||
}
|
|
||||||
}
|
|
@ -482,3 +482,6 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
.html.js.sr body.node-type-site.node-id-40 div.dialog-off-canvas-main-canvas div#page-node.layout-container main div.layout-content div.content_container div.layout.layout--threecol-25-50-25 div.layout__region.layout__region--third div.block-region-third div div.field_field_documents div div span{
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
@ -39,11 +39,7 @@
|
|||||||
* @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 }}
|
||||||
|
@ -9,7 +9,7 @@ let config = {
|
|||||||
|
|
||||||
// "./src/assets/js/animated_logo.js",
|
// "./src/assets/js/animated_logo.js",
|
||||||
"./src/assets/js/animated_formes.js",
|
"./src/assets/js/animated_formes.js",
|
||||||
"./src/assets/scss/quartiers_de_demain.scss",
|
"./src/assets/scss/quartiers_de_demain.scss",
|
||||||
// "./src/assets/fonts/*",
|
// "./src/assets/fonts/*",
|
||||||
// "./src/assets/css/animated_logo.css",
|
// "./src/assets/css/animated_logo.css",
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user