6 Commits

Author SHA1 Message Date
735a9a0278 retrouve page lessites 2025-03-03 23:35:36 +01:00
104633faa1 actu page 2025-03-03 22:39:58 +01:00
4aaa3f90c5 fix tamporaire bug actu carroussel =responsive 2025-03-03 22:20:41 +01:00
5eceec0083 alias url 2025-03-03 18:38:03 +01:00
f745ce2f6c fix tamporaire bug actu carroussel 2025-03-03 17:25:43 +01:00
7176f2d82d désactive js actus caroussel pour accès contenu 2025-03-03 15:48:39 +01:00
13 changed files with 844 additions and 644 deletions

View File

@ -0,0 +1,11 @@
uuid: 0be47de1-35a4-49f3-ae07-99b77c62db51
langcode: fr
status: true
dependencies:
config:
- block_content.type.live_youtube
id: block_content.live_youtube
target_entity_type_id: block_content
target_bundle: live_youtube
default_langcode: site_default
language_alterable: false

View File

@ -0,0 +1,22 @@
uuid: b4825987-4cfe-4342-a7d0-29d190fd71b3
langcode: fr
status: true
dependencies:
module:
- node
id: actus
label: Actus
type: 'canonical_entities:node'
pattern: '/actualites/[node:title]'
selection_criteria:
ae8c556c-ba96-4e19-87c1-46ee3c9639d4:
id: 'entity_bundle:node'
negate: false
uuid: ae8c556c-ba96-4e19-87c1-46ee3c9639d4
context_mapping:
node: node
bundles:
actualite: actualite
selection_logic: and
weight: -5
relationships: { }

File diff suppressed because one or more lines are too long

View File

@ -202,7 +202,7 @@ h2, h3 {
}
@media (max-width: 810px) {
.layout-container main#home {
padding-top: 380px;
padding-top: 300px;
}
}
@media (max-width: 810px) {
@ -432,17 +432,17 @@ header .header_nav_container {
transform: translateX(0);
transition: transform 0.3s ease-in-out;
z-index: -1;
}
@media (max-width: 1090px) {
header .header_nav_container {
height: fit-content;
}
display: flex;
flex-direction: column;
}
@media (max-width: 500px) {
header .header_nav_container {
flex: 0 0 40%;
}
}
header .header_nav_container #block-quartiers-de-demain-entete {
margin: auto;
}
header .header_nav_container #block-quartiers-de-demain-entete h2 {
display: none;
}
@ -564,7 +564,6 @@ header .header:hover + .header_nav_container {
flex: 1 0 100%;
position: relative;
left: -100%;
top: -45px;
}
}
@ -607,7 +606,11 @@ header .header:hover + .header_nav_container {
flex: 1 0 100%;
position: relative;
left: -100%;
top: -75px;
}
}
@media (max-width: 550px) {
.header--collapsed-already .header_nav_container {
top: 0px;
}
}
@ -1498,7 +1501,6 @@ footer {
display: flex;
flex-direction: column;
align-items: center;
padding-bottom: 4rem;
}
#actus-caroussel h2 {
width: fit-content;
@ -1512,6 +1514,19 @@ footer {
#actus-caroussel button {
top: -2.5rem;
}
@media (max-width: 810px) {
#actus-caroussel button {
top: -1.5rem;
}
}
#actus-caroussel .content-actus .slick-list {
padding-bottom: 4rem;
}
@media (max-width: 810px) {
#actus-caroussel .content-actus .slick-list {
padding-bottom: 0rem;
}
}
#actus-caroussel .content-actus .view {
display: flex;
flex-direction: row;
@ -1527,11 +1542,14 @@ footer {
padding-top: 3rem;
}
}
#actus-caroussel .content-actus .views-row article.node-type-actualite {
#actus-caroussel .content-actus .views-row article.node-type-actualite a {
display: flex;
flex-direction: column;
}
#actus-caroussel .content-actus .views-row article.node-type-actualite .field_field_images {
#actus-caroussel .content-actus .views-row article.node-type-actualite a h2 {
display: none;
}
#actus-caroussel .content-actus .views-row article.node-type-actualite a .field_field_images {
order: 1;
background-color: black;
-moz-border-radius: 9px; /* pour Mozilla */
@ -1542,18 +1560,18 @@ footer {
margin-bottom: 0.6rem;
}
@media (max-width: 550px) {
#actus-caroussel .content-actus .views-row article.node-type-actualite .field_field_images {
#actus-caroussel .content-actus .views-row article.node-type-actualite a .field_field_images {
height: 170px;
}
}
#actus-caroussel .content-actus .views-row article.node-type-actualite .field_field_images div {
#actus-caroussel .content-actus .views-row article.node-type-actualite a .field_field_images div {
height: 100%;
}
#actus-caroussel .content-actus .views-row article.node-type-actualite .field_field_images div div a {
#actus-caroussel .content-actus .views-row article.node-type-actualite a .field_field_images div div a {
display: block;
height: 100%;
}
#actus-caroussel .content-actus .views-row article.node-type-actualite .field_field_images div div a img {
#actus-caroussel .content-actus .views-row article.node-type-actualite a .field_field_images div div a img {
width: 100%;
height: 100%;
object-fit: cover;
@ -1563,11 +1581,11 @@ footer {
border-radius: 9px; /* CSS3 */
}
@media (max-width: 550px) {
#actus-caroussel .content-actus .views-row article.node-type-actualite .field_field_images div div a img {
#actus-caroussel .content-actus .views-row article.node-type-actualite a .field_field_images div div a img {
max-height: 170px;
}
}
#actus-caroussel .content-actus .views-row article.node-type-actualite .field_field_images img {
#actus-caroussel .content-actus .views-row article.node-type-actualite a .field_field_images img {
width: 100%;
height: 100%;
object-fit: cover;
@ -1577,11 +1595,11 @@ footer {
border-radius: 9px; /* CSS3 */
}
@media (max-width: 550px) {
#actus-caroussel .content-actus .views-row article.node-type-actualite .field_field_images img {
#actus-caroussel .content-actus .views-row article.node-type-actualite a .field_field_images img {
max-height: 170px;
}
}
#actus-caroussel .content-actus .views-row article.node-type-actualite .field_field_type_d_actualite {
#actus-caroussel .content-actus .views-row article.node-type-actualite a .field_field_type_d_actualite {
text-transform: uppercase;
color: red;
font-size: 0.5rem;
@ -1589,51 +1607,81 @@ footer {
display: inline-flex;
align-items: center;
}
#actus-caroussel .content-actus .views-row article.node-type-actualite .field_field_type_d_actualite::before {
#actus-caroussel .content-actus .views-row article.node-type-actualite a .field_field_type_d_actualite::before {
content: url("../img/type-actu.svg");
padding-right: 0.3rem;
padding-bottom: 0.2rem;
}
#actus-caroussel .content-actus .views-row article.node-type-actualite .infos-actu {
#actus-caroussel .content-actus .views-row article.node-type-actualite a .infos-actu {
order: 2;
}
#actus-caroussel .content-actus .views-row article.node-type-actualite .field_field_date {
#actus-caroussel .content-actus .views-row article.node-type-actualite a .infos-actu h2 {
font-family: "gilroy-semibold";
}
#actus-caroussel .content-actus .views-row article.node-type-actualite a .field_field_date {
color: red;
display: inline-flex;
align-items: center;
font-size: 0.5rem;
font-family: "gilroy-bold";
}
#actus-caroussel .content-actus .views-row article.node-type-actualite .field_field_date::before {
#actus-caroussel .content-actus .views-row article.node-type-actualite a .field_field_date::before {
content: url("../img/date-actu.svg");
padding-right: 0.3rem;
}
#actus-caroussel .content-actus .views-row article.node-type-actualite .field_title {
#actus-caroussel .content-actus .views-row article.node-type-actualite a .field_title {
order: 3;
padding-top: 0.2rem;
}
#actus-caroussel .content-actus .views-row article.node-type-actualite .field_title h2 {
#actus-caroussel .content-actus .views-row article.node-type-actualite a .field_title h2 {
margin: 0;
line-height: 0.4;
padding-bottom: 0.6rem;
}
#actus-caroussel .content-actus .views-row article.node-type-actualite .field_title h2 a {
#actus-caroussel .content-actus .views-row article.node-type-actualite a .field_title h2 a {
font-size: 0.8rem;
color: rgb(7, 50, 194);
}
#actus-caroussel .content-actus .views-row article.node-type-actualite .field_body {
#actus-caroussel .content-actus .views-row article.node-type-actualite a .field_body {
order: 4;
opacity: 1 !important;
transform: none !important;
font-family: "gilroy-regular";
}
#actus-caroussel .content-actus .views-row article.node-type-actualite .field_body p {
#actus-caroussel .content-actus .views-row article.node-type-actualite a .field_body p {
margin: 0;
margin-bottom: 1rem;
font-size: 0.7rem;
}
#actus-caroussel .content-actus .views-row article.node-type-actualite .field_field_liens {
#actus-caroussel .content-actus .views-row article.node-type-actualite a .field_body a {
color: rgb(7, 50, 194);
}
#actus-caroussel .content-actus .views-row article.node-type-actualite a .field_field_liens {
order: 5;
width: fit-content;
padding-left: 0.5rem;
background: black;
}
@media (max-width: 810px) {
#actus-caroussel .content-actus .views-row article.node-type-actualite a .field_field_liens {
margin-left: 0;
}
}
#actus-caroussel .content-actus .views-row article.node-type-actualite a .field_field_liens a {
display: inline-flex;
align-items: center;
color: white;
text-transform: uppercase;
font-size: 0.6rem;
}
#actus-caroussel .content-actus .views-row article.node-type-actualite a .field_field_liens a svg {
display: none;
}
#actus-caroussel .content-actus .views-row article.node-type-actualite a .field_field_liens a::after {
display: inline-flex;
content: url("../img/noun-arrow-to-right.svg");
padding-right: 0.2rem;
padding-left: 0.2rem;
}
#actus-caroussel .content-actus .views-row:nth-child(odd) {
position: relative;
@ -1912,6 +1960,9 @@ body {
transform: scale(1.3);
}
}
#home .content_container #block-quartiers-de-demain-titredepage {
display: none;
}
#home .paragraph--type--static-parts {
padding-top: 4rem;
padding-bottom: 2rem;
@ -3134,7 +3185,12 @@ body {
width: 100%;
padding-bottom: 7rem;
}
#page-node .content_container .node-type-actualite a {
display: flex;
flex-direction: column;
}
#page-node .content_container .node-type-actualite .infos-actu {
order: 1;
display: flex;
flex-direction: row;
border-top: solid red 1px;
@ -3165,15 +3221,20 @@ body {
padding-right: 0.4rem;
}
#page-node .content_container .node-type-actualite .field_body {
order: 2;
padding-bottom: 2rem;
}
#page-node .content_container .node-type-actualite .field_body p {
font-size: 0.8rem;
}
#page-node .content_container .node-type-actualite .field_field_liens {
order: 3;
padding-bottom: 2rem;
padding-top: 2rem;
}
#page-node .content_container .node-type-actualite .field_field_liens a {
display: flex;
flex-direction: row;
padding-left: 0.5rem;
display: inline-flex;
align-items: center;
@ -3191,6 +3252,12 @@ body {
padding-right: 0.2rem;
padding-left: 0.2rem;
}
#page-node .content_container .node-type-actualite .field_field_liens a:not(.ext) {
display: none;
}
#page-node .content_container .node-type-actualite .field_field_images {
order: 5;
}
#page-node .content_container .node-type-actualite .field_field_images img {
width: 100%;
height: auto;

View File

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
version="1.1"
id="svg1"
width="1801.0212"
height="4029.4231"
viewBox="0 0 1801.0212 4029.4232"
sodipodi:docname="formes-animees.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1">
<inkscape:page
x="0"
y="0"
width="1801.0212"
height="4029.4231"
id="page2"
margin="0"
bleed="0" />
</sodipodi:namedview>
<defs
id="defs1">
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath258">
<path
d="M 0,0 H 1920 V 9000 H 0 Z"
transform="translate(-1095.6993,-8098.7595)"
id="path258" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath301">
<path
d="M 0,0 H 1920 V 9000 H 0 Z"
transform="translate(-1476.5001,-5895.4337)"
id="path301" />
</clipPath>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath303">
<path
d="M 0,0 H 1920 V 9000 H 0 Z"
transform="translate(-1623.8512,-4272.9005)"
id="path303" />
</clipPath>
</defs>
<g
id="g2"
transform="translate(-299.16899,-2519.6031)">
<g
id="g1"
transform="translate(0.17944336,-2.9196463)">
<path
id="path256"
d="m 321.27266,3336.1817 182.91889,175.8201"
style="fill:none;stroke:#0833c2;stroke-width:64.3111;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:export-filename="formes-animees.svg"
inkscape:export-xdpi="300"
inkscape:export-ydpi="300" />
<path
id="path256-3"
d="m 1852.1683,6336.9184 -163.0856,194.3583"
style="fill:none;stroke:#0833c2;stroke-width:64.3111;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
id="path257"
d="M 0,0 C -205.098,0 -371.361,-166.265 -371.361,-371.362"
style="fill:none;stroke:#f7002b;stroke-width:137.482;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
transform="matrix(-0.80902482,0,0,-0.80902482,1743.8143,2885.2905)"
clip-path="url(#clipPath258)" />
<path
id="path300"
d="M 0,0 C 0,-126.805 102.795,-229.6 229.6,-229.6"
style="fill:none;stroke:#f7002b;stroke-width:85;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
transform="matrix(0.72647042,0,0,-0.72647042,1836.7965,4740.0583)"
clip-path="url(#clipPath301)" />
<path
id="path302"
d="M 0,0 C 0,126.805 -102.795,229.6 -229.6,229.6"
style="fill:none;stroke:#0833c2;stroke-width:85;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
transform="matrix(0.82260013,0,0,-0.82260013,2025.1937,5635.4927)"
clip-path="url(#clipPath303)" />
<path
id="path311"
d="M 456.65311,5469.771 V 5209.7705"
style="fill:none;stroke:#000000;stroke-width:78.092;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
</g>
<rect
style="fill:none;stroke:none;stroke-width:0;paint-order:fill markers stroke"
id="rect2"
width="1550.348"
height="114.74608"
x="122.31378"
y="-9.4031076e-13" />
<rect
style="fill:none;stroke:none;stroke-width:0;paint-order:fill markers stroke"
id="rect1"
width="1540.1483"
height="112.19624"
x="73.095963"
y="68.049309" />
<rect
style="fill:none;stroke-width:0;paint-order:stroke fill markers"
id="rect3"
width="1559.4871"
height="238.19258"
x="108.70975"
y="3395.3674" />
<rect
style="fill:none;stroke-width:0;paint-order:stroke fill markers"
id="rect4"
width="1801.0212"
height="252.14297"
x="1.3299257e-06"
y="4.5025892" />
</svg>

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -11,11 +11,11 @@
console.log('It works!');
}
};
} (Drupal));
} (Drupal));
//////// start header ////////////
document.addEventListener('DOMContentLoaded', function() {
//////// start header ////////////
document.addEventListener('DOMContentLoaded', function() {
const header = document.querySelector('header');
const logo = document.querySelector('#block-quartiers-de-demain-logoquartiersdedemain > div:nth-child(1) > div:nth-child(1) > a:nth-child(1) > svg:nth-child(1)');
@ -200,7 +200,7 @@
}
}
});
});
//////// end header ////////////
@ -210,22 +210,22 @@
(function($, window) {
var adjustAnchor = function() {
var adjustAnchor = function() {
var $anchor = $('.sidebar_first_container'),
fixedElementHeight = 500;
if ($anchor.length > 0) {
$('html, body').stop().animate({scrollTop: $anchor.offset().top - fixedElementHeight }, 0);
}
};
};
$(window).on('hashchange', function() {
$(window).on('hashchange', function() {
adjustAnchor();
});
});
//////////////////////// start script smooth apparition des textes /////////////////
//////////////////////// start script smooth apparition des textes /////////////////
function scrollReaveal(){
function scrollReaveal(){
const nodes = {
logo : document.querySelectorAll('#logo-animated-container'),
@ -263,16 +263,16 @@
ScrollReveal().reveal(nodes.lienDoc, showUp);
ScrollReveal().reveal(nodes.lienURL, showUp);
}
}
$( document ).ready(function() {
$( document ).ready(function() {
scrollReaveal();
});
});
//////////////////////// end script smooth apparition des textes /////////////////
//////////////////////// end script smooth apparition des textes /////////////////
// //////////////////// start Timeline script ///////////////////////
// //////////////////// start Timeline script ///////////////////////
// Update month field to only show the first 3 letters
document.querySelectorAll('.paragraph--type--phase-deroulement').forEach(function(paragraph) {
@ -322,7 +322,7 @@
});
// ////////////////////// start calendrier home /////////////////////////////////
// ////////////////////// start calendrier home /////////////////////////////////
$(document).ready(function(){
$('.__timeline-content').slick({
slidesToShow: 3,
@ -349,49 +349,33 @@
});
//////////////////////// end calendrier home /////////////////////////////////
//////////////////////// end calendrier home /////////////////////////////////
//////////////////////// end Timeline script /////////////////////////////////////////////
//////////////////////// end Timeline script /////////////////////////////////////////////
/////////////////// caracteres body actus/////////////////////////
/////////////////// caracteres body actus/////////////////////////
document.addEventListener('DOMContentLoaded', function() {
// Nombre maximum de caractères à afficher
const maxChars = 140; // Ajustez cette valeur selon vos besoins
document.addEventListener('DOMContentLoaded', function() {
// Maximum number of characters to display
const maxChars = 140; // Adjust this value as needed
document.querySelectorAll('#actus-caroussel .node-type-actualite').forEach(function(node) {
let paragraphs = node.querySelectorAll('.field_body p');
let fullText = "";
// Concaténer tous les paragraphes
paragraphs.forEach(p => fullText += p.textContent.trim() + " ");
fullText = fullText.trim();
// Vérifier si le texte dépasse la limite
if (fullText.length > maxChars) {
let truncatedText = fullText.slice(0, maxChars) + '...';
// Vider tout le contenu et insérer seulement le texte tronqué
let firstParagraph = paragraphs[0];
firstParagraph.textContent = truncatedText;
// Masquer les autres paragraphes
for (let i = 1; i < paragraphs.length; i++) {
paragraphs[i].style.display = "none";
}
document.querySelectorAll('#actus-caroussel .node-type-actualite .field_body p').forEach(function(paragraph) {
let text = paragraph.textContent.trim();
if (text.length > maxChars) {
let truncatedText = text.slice(0, maxChars) + '...';
paragraph.textContent = truncatedText;
}
});
});
});
//////////// start slideshow home //////////////////////////
//////////// start slideshow home //////////////////////////
$(document).ready(function(){
$(document).ready(function(){
let actuview = $('.content-actus .view ')
if (actuview) {
actuview.slick({
@ -428,12 +412,12 @@
lazyLoad: 'progressive', // Option 'ondemand' ou 'progressive'
});
});
});
$(document).ready(function () {
$(document).ready(function () {
let diapohome = $('.config_pages--type--diaporama-home .diaporama');
if (diapohome.length) {
@ -462,10 +446,10 @@
}]
});
}
}
});
//////////// end slideshow home //////////////////////////
//////////// end slideshow home //////////////////////////
//////////////// start lightbox galerie image page site////////////////////////
@ -504,56 +488,56 @@ lightbox.appendChild(nextBtn);
// Fonction pour afficher l'image et la légende à l'index donné
function showImage(index) {
if (index < 0) index = images.length - 1;
if (index >= images.length) index = 0;
currentIndex = index;
if (index < 0) index = images.length - 1;
if (index >= images.length) index = 0;
currentIndex = index;
// Mettre à jour l'image
img.src = images[currentIndex].getAttribute('src');
// Mettre à jour l'image
img.src = images[currentIndex].getAttribute('src');
// Récupérer la légende associée (le paragraphe dans blockquote suivant l'image)
const captionText = images[currentIndex]
// Récupérer la légende associée (le paragraphe dans blockquote suivant l'image)
const captionText = images[currentIndex]
.closest('.cadre-img-zoom')
.nextElementSibling.querySelector('.image-field-caption p')
.textContent;
caption.textContent = captionText || ''; // Affiche la légende ou une chaîne vide si elle est absente
lightbox.style.display = 'flex';
caption.textContent = captionText || ''; // Affiche la légende ou une chaîne vide si elle est absente
lightbox.style.display = 'flex';
}
// Événements de clic sur chaque image pour ouvrir le lightbox avec la légende
images.forEach((image, index) => {
image.addEventListener('click', () => {
image.addEventListener('click', () => {
showImage(index);
});
});
});
// Fermer le lightbox
closeBtn.addEventListener('click', () => {
lightbox.style.display = 'none';
lightbox.style.display = 'none';
});
// Navigation pour images précédente et suivante
prevBtn.addEventListener('click', (e) => {
e.stopPropagation();
showImage(currentIndex - 1);
e.stopPropagation();
showImage(currentIndex - 1);
});
nextBtn.addEventListener('click', (e) => {
e.stopPropagation();
showImage(currentIndex + 1);
e.stopPropagation();
showImage(currentIndex + 1);
});
// Fermer le lightbox en cliquant en dehors de l'image
lightbox.addEventListener('click', (e) => {
if (e.target === lightbox) {
if (e.target === lightbox) {
lightbox.style.display = 'none';
}
}
});
// Ajout des contrôles clavier (Échap, flèches gauche/droite)
document.addEventListener('keydown', (e) => {
if (lightbox.style.display === 'flex') {
if (lightbox.style.display === 'flex') {
if (e.key === 'Escape') {
lightbox.style.display = 'none';
} else if (e.key === 'ArrowLeft') {
@ -561,7 +545,7 @@ document.addEventListener('keydown', (e) => {
} else if (e.key === 'ArrowRight') {
showImage(currentIndex + 1);
}
}
}
});
@ -571,11 +555,11 @@ document.addEventListener('keydown', (e) => {
//////////////////// start wrapper views-row lessites /////////////////////////
document.addEventListener("DOMContentLoaded", function() {
// Sélectionne le conteneur principal avec l'ID 'lessites'
const container = document.getElementById("lessites");
// Sélectionne le conteneur principal avec l'ID 'lessites'
const container = document.getElementById("lessites");
// Vérifie si le conteneur existe pour éviter toute erreur sur d'autres pages
if (container) {
// Vérifie si le conteneur existe pour éviter toute erreur sur d'autres pages
if (container) {
// Sélectionne l'élément 'view' à l'intérieur de '.views-element-container'
const viewContainer = container.querySelector(".views-element-container .view");
@ -592,7 +576,7 @@ document.addEventListener("DOMContentLoaded", function() {
// Ajoute la div englobante dans le 'viewContainer'
viewContainer.appendChild(wrapperDiv);
}
}
}
});
@ -604,31 +588,31 @@ document.addEventListener("DOMContentLoaded", function() {
// Vérifie si la page a la classe 'node-type-site' dans le <body>
if (document.body.classList.contains('node-type-site')) {
// Sélectionne le conteneur principal
const blockRegion = document.querySelector('.block-region-second');
// Sélectionne le conteneur principal
const blockRegion = document.querySelector('.block-region-second');
// Liste des classes spécifiques à cibler
const fieldClasses = [
// Liste des classes spécifiques à cibler
const fieldClasses = [
'.field_field_region',
'.field_field_nom_du_qpv_nb_d_hab',
'.field_field_departement_s',
'.field_field_programme_de_l_etat',
'.field_field_porteur_s_de_site',
'.field_field_nom_de_la_commune_nb_d_hab'
];
];
// Sélectionne les div parents de chacun des champs listés
const elementsToWrap = [];
fieldClasses.forEach(className => {
// Sélectionne les div parents de chacun des champs listés
const elementsToWrap = [];
fieldClasses.forEach(className => {
const fieldElement = blockRegion.querySelector(className);
if (fieldElement) {
// Ajoute le parent du champ au tableau si trouvé
elementsToWrap.push(fieldElement.parentElement);
}
});
});
// Vérifie que des éléments ont été trouvés
if (elementsToWrap.length > 0) {
// Vérifie que des éléments ont été trouvés
if (elementsToWrap.length > 0) {
// Crée le conteneur avec la classe 'infos'
const infosContainer = document.createElement('div');
infosContainer.className = 'infos';
@ -639,47 +623,47 @@ if (document.body.classList.contains('node-type-site')) {
// Déplace chaque élément dans le conteneur `.infos`
elementsToWrap.forEach(element => infosContainer.appendChild(element));
}
}
}
//////////////////// end div infos site ////////////////////////
document.addEventListener("DOMContentLoaded", function() {
// Sélectionner les éléments à déplacer
const documentsField = document.querySelector(".field_field_documents");
const liensSiteField = document.querySelector(".field_field_liens_site");
// Sélectionner les éléments à déplacer
const documentsField = document.querySelector(".field_field_documents");
const liensSiteField = document.querySelector(".field_field_liens_site");
// Sélectionner la destination
const thirdRegion = document.querySelector(".block-region-third > div");
// Sélectionner la destination
const thirdRegion = document.querySelector(".block-region-third > div");
// Créer une nouvelle div pour englober les éléments déplacés
const wrapperDiv = document.createElement("div");
wrapperDiv.classList.add("documents-liens-wrapper");
// Créer une nouvelle div pour englober les éléments déplacés
const wrapperDiv = document.createElement("div");
wrapperDiv.classList.add("documents-liens-wrapper");
// Déplacer les éléments dans la nouvelle div
if (documentsField && liensSiteField && thirdRegion) {
// Déplacer les éléments dans la nouvelle div
if (documentsField && liensSiteField && thirdRegion) {
wrapperDiv.appendChild(documentsField);
wrapperDiv.appendChild(liensSiteField);
// Ajouter la nouvelle div dans la destination
thirdRegion.appendChild(wrapperDiv);
}
}
});
document.addEventListener("DOMContentLoaded", function() {
// Sélectionner les éléments pertinents
const documentsLiensWrapper = document.querySelector(".documents-liens-wrapper");
const blockRegionThird = document.querySelector(".block-region-third");
// Sélectionner les éléments pertinents
const documentsLiensWrapper = document.querySelector(".documents-liens-wrapper");
const blockRegionThird = document.querySelector(".block-region-third");
// Vérifier que les éléments existent avant de les manipuler
if (documentsLiensWrapper && blockRegionThird) {
// Vérifier que les éléments existent avant de les manipuler
if (documentsLiensWrapper && blockRegionThird) {
// Déplacer .documents-liens-wrapper en dehors du div contenant les boutons prev/next
blockRegionThird.appendChild(documentsLiensWrapper);
}
}
});
document.addEventListener("DOMContentLoaded", function () {
// Fonction pour déplacer le bloc en fonction de la taille de l'écran
function moveLanguageSwitcher() {
// Fonction pour déplacer le bloc en fonction de la taille de l'écran
function moveLanguageSwitcher() {
const languageSwitcher = document.getElementById("block-quartiers-de-demain-selecteurdelangue");
const navContainer = document.querySelector(".header_nav_container");
@ -693,99 +677,14 @@ document.addEventListener("DOMContentLoaded", function () {
headerRightContainer.appendChild(languageSwitcher); // Remet le bloc dans sa position initiale
}
}
}
}
// Déclencher au chargement et au redimensionnement
moveLanguageSwitcher();
window.addEventListener("resize", moveLanguageSwitcher);
// Déclencher au chargement et au redimensionnement
moveLanguageSwitcher();
window.addEventListener("resize", moveLanguageSwitcher);
});
//////////////////////////////////////////
/////////// 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);

View File

@ -45,7 +45,7 @@ $width-menu-slidedown : 550px;
@media(max-width: 810px){
padding-top: 380px;
padding-top: 300px;
}
}
}

View File

@ -33,7 +33,13 @@
.node-type-actualite{
width: 100%;
padding-bottom: 7rem;
a{
display: flex;
flex-direction: column;
}
.infos-actu{
order: 1;
display: flex;
flex-direction: row;
border-top: solid red 1px;
@ -65,14 +71,19 @@
}
.field_body {
order: 2;
padding-bottom: 2rem;
p{
font-size: 0.8rem;
}
}
.field_field_liens{
order: 3;
padding-bottom: 2rem;
padding-top: 2rem;
a{
display: flex;
flex-direction: row;
padding-left: 0.5rem;
display: inline-flex;
align-items: center;
@ -91,9 +102,14 @@
}
}
a:not(.ext){
display: none;
}
}
.field_field_images{
order: 5;
img{
width: 100%;
height: auto;

View File

@ -52,7 +52,7 @@
}
.content_container{
#block-quartiers-de-demain-titredepage{
// display: none;
display: none;
}
}
.paragraph--type--static-parts{

View File

@ -2,7 +2,7 @@
display: flex;
flex-direction: column;
align-items: center;
padding-bottom: 4rem;
// padding-bottom: 4rem;
h2{
width: fit-content;
@ -16,8 +16,17 @@
}
button{
top: -2.5rem;
@media(max-width: 810px){
top: -1.5rem;
}
}
.content-actus{
.slick-list{
padding-bottom: 4rem;
@media(max-width: 810px){
padding-bottom: 0rem;
}
}
.view{
display: flex;
flex-direction: row;
@ -33,8 +42,12 @@
padding-top: 3rem;
}
article.node-type-actualite{
a{
display: flex;
flex-direction: column;
h2{
display: none;
}
.field_field_images{
order: 1;
background-color: black;
@ -100,6 +113,9 @@
}
.infos-actu{
order: 2;
h2{
font-family: 'gilroy-semibold';
}
}
.field_field_date{
@ -140,9 +156,40 @@
margin-bottom: 1rem;
font-size: 0.7rem ;
}
a{
color: $blue_QDD;
}
}
.field_field_liens{
order: 5;
width: fit-content;
padding-left: 0.5rem;
// padding-bottom: 0.2rem;
// padding-top: 0.2rem;
background: black;
@media (max-width:810px) {
margin-left: 0;
}
a{
display: inline-flex;
align-items: center;
color: white;
text-transform: uppercase;
font-size: 0.6rem;
svg{
display: none;
}
&::after{
display: inline-flex;
content: url("../img/noun-arrow-to-right.svg");
padding-right: 0.2rem;
padding-left: 0.2rem;
// padding-bottom: 0.2rem;
}
}
}
}
}

View File

@ -184,14 +184,18 @@ header{
transform: translateX(0);
transition: transform 0.3s ease-in-out;
z-index: -1 ;
display: flex;
flex-direction: column;
@media(max-width: 1090px){
// text-align:left;
height: fit-content;
// height: fit-content;
}
@media(max-width: 500px){
flex: 0 0 40%;
}
#block-quartiers-de-demain-entete{
margin: auto;
h2{
display: none;
}
@ -307,7 +311,7 @@ header{
flex: 1 0 100%;
position: relative;
left: -100%;
top: -45px;
// top: -45px; /* a remettre et faire varier si ajoute éléments dans menu */
}
}
@ -343,7 +347,10 @@ header{
flex: 1 0 100%;
position: relative;
left: -100%;
top: -75px;
// top: -75px;
}
@media(max-width: 550px){
top: 0px;
}
}

View File

@ -92,15 +92,17 @@
{# {{ content }} #}
{# </div> #}
{% block content %}
<a href="{{ url }}" rel="bookmark">{{ label }}
{{content.field_images}}
<div class="infos-actu">
{{content.field_type_d_actualite}}
{{content.field_date}}
</div>
{{content.body}}
{{content.field_liens}}
{{content.field_images}}
</a>
{% endblock %}
</article>