fix tamporaire bug actu carroussel
This commit is contained in:
		
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@@ -1498,7 +1498,6 @@ footer {
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-direction: column;
 | 
			
		||||
  align-items: center;
 | 
			
		||||
  padding-bottom: 4rem;
 | 
			
		||||
}
 | 
			
		||||
#actus-caroussel h2 {
 | 
			
		||||
  width: fit-content;
 | 
			
		||||
@@ -1512,6 +1511,9 @@ footer {
 | 
			
		||||
#actus-caroussel button {
 | 
			
		||||
  top: -2.5rem;
 | 
			
		||||
}
 | 
			
		||||
#actus-caroussel .content-actus .slick-list {
 | 
			
		||||
  padding-bottom: 4rem;
 | 
			
		||||
}
 | 
			
		||||
#actus-caroussel .content-actus .view {
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-direction: row;
 | 
			
		||||
@@ -1527,11 +1529,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 +1547,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 +1568,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 +1582,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 +1594,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;
 | 
			
		||||
 
 | 
			
		||||
@@ -357,33 +357,33 @@
 | 
			
		||||
 | 
			
		||||
  ///////////////////  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() {
 | 
			
		||||
    // Nombre maximum de caractères à afficher
 | 
			
		||||
    const maxChars = 140; // Ajustez cette valeur selon vos besoins
 | 
			
		||||
 | 
			
		||||
  //   document.querySelectorAll('#actus-caroussel .node-type-actualite').forEach(function(node) {
 | 
			
		||||
  //       let paragraphs = node.querySelectorAll('.field_body p');
 | 
			
		||||
  //       let fullText = "";
 | 
			
		||||
    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();
 | 
			
		||||
        // 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) + '...';
 | 
			
		||||
        // 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;
 | 
			
		||||
            // 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";
 | 
			
		||||
  //           }
 | 
			
		||||
  //       }
 | 
			
		||||
  //   });
 | 
			
		||||
  // });
 | 
			
		||||
            // Masquer les autres paragraphes
 | 
			
		||||
            for (let i = 1; i < paragraphs.length; i++) {
 | 
			
		||||
                paragraphs[i].style.display = "none";
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@
 | 
			
		||||
    display: flex;
 | 
			
		||||
    flex-direction: column;
 | 
			
		||||
    align-items: center;
 | 
			
		||||
    padding-bottom: 4rem;
 | 
			
		||||
    // padding-bottom: 4rem;
 | 
			
		||||
 | 
			
		||||
    h2{
 | 
			
		||||
        width: fit-content;
 | 
			
		||||
@@ -18,6 +18,9 @@
 | 
			
		||||
        top: -2.5rem;
 | 
			
		||||
    }
 | 
			
		||||
    .content-actus{
 | 
			
		||||
        .slick-list{
 | 
			
		||||
            padding-bottom: 4rem;
 | 
			
		||||
        }
 | 
			
		||||
        .view{
 | 
			
		||||
            display: flex;
 | 
			
		||||
            flex-direction: row;
 | 
			
		||||
@@ -33,8 +36,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 +107,9 @@
 | 
			
		||||
                }
 | 
			
		||||
                .infos-actu{
 | 
			
		||||
                    order: 2;
 | 
			
		||||
                    h2{
 | 
			
		||||
                        font-family: 'gilroy-semibold';
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                .field_field_date{
 | 
			
		||||
                    
 | 
			
		||||
@@ -140,11 +150,42 @@
 | 
			
		||||
                        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;
 | 
			
		||||
                        }
 | 
			
		||||
                    }   
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
        .views-row:nth-child(odd){
 | 
			
		||||
 
 | 
			
		||||
@@ -93,19 +93,20 @@
 | 
			
		||||
  {# </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>
 | 
			
		||||
    <h2{{ title_attributes }}>
 | 
			
		||||
      <a href="{{ url }}" rel="bookmark">{{ label }}</a>
 | 
			
		||||
     
 | 
			
		||||
    </h2>
 | 
			
		||||
    {{content.body}}
 | 
			
		||||
   {{content.field_liens}}
 | 
			
		||||
    {{content.field_images}}
 | 
			
		||||
    {{content.field_title}}
 | 
			
		||||
   
 | 
			
		||||
    {{content.field_liens}}
 | 
			
		||||
    
 | 
			
		||||
    
 | 
			
		||||
    </a>
 | 
			
		||||
 | 
			
		||||
  {% endblock %}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user