Merge branch 'prod' into stage
This commit is contained in:
commit
6119477d19
@ -951,6 +951,91 @@ $(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,10 +4079,6 @@ 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,6 +92,7 @@ function quartiers_de_demain_preprocess_field(&$variables) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prepares variables for block templates.
|
* Prepares variables for block templates.
|
||||||
*
|
*
|
||||||
|
@ -893,6 +893,91 @@ $(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);
|
||||||
|
|
||||||
|
|
||||||
|
@ -0,0 +1,42 @@
|
|||||||
|
#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,6 +482,3 @@
|
|||||||
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,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 }}
|
||||||
|
@ -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