Compare commits
2 Commits
1c09ac0a55
...
7176f2d82d
Author | SHA1 | Date | |
---|---|---|---|
7176f2d82d | |||
91f248bfd7 |
File diff suppressed because one or more lines are too long
@ -1594,6 +1594,9 @@ footer {
|
||||
padding-right: 0.3rem;
|
||||
padding-bottom: 0.2rem;
|
||||
}
|
||||
#actus-caroussel .content-actus .views-row article.node-type-actualite .infos-actu {
|
||||
order: 2;
|
||||
}
|
||||
#actus-caroussel .content-actus .views-row article.node-type-actualite .field_field_date {
|
||||
color: red;
|
||||
display: inline-flex;
|
||||
@ -1606,6 +1609,7 @@ footer {
|
||||
padding-right: 0.3rem;
|
||||
}
|
||||
#actus-caroussel .content-actus .views-row article.node-type-actualite .field_title {
|
||||
order: 3;
|
||||
padding-top: 0.2rem;
|
||||
}
|
||||
#actus-caroussel .content-actus .views-row article.node-type-actualite .field_title h2 {
|
||||
@ -1618,6 +1622,7 @@ footer {
|
||||
color: rgb(7, 50, 194);
|
||||
}
|
||||
#actus-caroussel .content-actus .views-row article.node-type-actualite .field_body {
|
||||
order: 4;
|
||||
opacity: 1 !important;
|
||||
transform: none !important;
|
||||
font-family: "gilroy-regular";
|
||||
@ -1627,6 +1632,9 @@ footer {
|
||||
margin-bottom: 1rem;
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
#actus-caroussel .content-actus .views-row article.node-type-actualite .field_field_liens {
|
||||
order: 5;
|
||||
}
|
||||
#actus-caroussel .content-actus .views-row:nth-child(odd) {
|
||||
position: relative;
|
||||
top: 60px;
|
||||
@ -1904,6 +1912,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;
|
||||
|
@ -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";
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
|
||||
|
||||
|
||||
|
@ -52,7 +52,7 @@
|
||||
}
|
||||
.content_container{
|
||||
#block-quartiers-de-demain-titredepage{
|
||||
// display: none;
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.paragraph--type--static-parts{
|
||||
|
@ -99,7 +99,7 @@
|
||||
}
|
||||
}
|
||||
.infos-actu{
|
||||
// order: 2;
|
||||
order: 2;
|
||||
}
|
||||
.field_field_date{
|
||||
|
||||
@ -117,7 +117,7 @@
|
||||
|
||||
|
||||
.field_title{
|
||||
// order: 3;
|
||||
order: 3;
|
||||
padding-top: 0.2rem;
|
||||
h2{
|
||||
margin: 0;
|
||||
@ -130,7 +130,7 @@
|
||||
}
|
||||
}
|
||||
.field_body{
|
||||
// order: 4;
|
||||
order: 4;
|
||||
// visibility: visible;
|
||||
opacity: 1 !important;
|
||||
transform: none !important;
|
||||
@ -142,7 +142,7 @@
|
||||
}
|
||||
}
|
||||
.field_field_liens{
|
||||
// order: 5;
|
||||
order: 5;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,13 +92,19 @@
|
||||
{# {{ content }} #}
|
||||
{# </div> #}
|
||||
{% block content %}
|
||||
|
||||
|
||||
<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}}
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user