Przeglądaj źródła

font size title soustitle

ouidade 2 tygodni temu
rodzic
commit
de0d122ca4

Plik diff jest za duży
+ 0 - 0
web/themes/custom/eql/dist/assets/bundle.js


+ 3 - 3
web/themes/custom/eql/dist/assets/css/bundle.css

@@ -6820,7 +6820,7 @@ article.node-type-ressource .wrapper-ressource .field--name-title h2 {
 }
 article.node-type-ressource .wrapper-ressource .field--name-title h2 a {
   color: rgb(0, 0, 0);
-  font-size: 1rem;
+  font-size: 0.9rem;
   font-weight: 900;
   font-style: normal;
 }
@@ -6841,9 +6841,9 @@ article.node-type-ressource .wrapper-ressource .field--name-field-sous-titre {
   grid-column: 2;
   margin-top: 0.8rem;
   order: 5;
-  font-size: 1rem;
+  font-size: 0.9rem;
   font-weight: 900;
-  line-height: 1.3;
+  line-height: 1.5;
 }
 article.node-type-ressource .wrapper-ressource .field--name-field-edition {
   order: 7;

+ 14 - 0
web/themes/custom/eql/scripts/main.js

@@ -272,4 +272,18 @@ document.addEventListener('DOMContentLoaded', () => {
 });
 
 
+////////////////// start tronquage sous titre  //////////////////
+document.addEventListener("DOMContentLoaded", function () {
+  const maxLength = 20; // <-- modifiez cette valeur si besoin
+  const field = document.querySelector(".field--name-field-sous-titre a");
+
+  if (field) {
+    const fullText = field.textContent.trim();
+    if (fullText.length > maxLength) {
+      const truncated = fullText.slice(0, maxLength).trim() + "...";
+      field.textContent = truncated;
+      field.setAttribute("title", fullText); // Affiche le texte complet au survol
+    }
+  }
+});
 

+ 3 - 3
web/themes/custom/eql/scss/partials/_node-type-ressource-teaser.scss

@@ -142,7 +142,7 @@ article.node-type-ressource{
                 margin-bottom: 0 !important;
                 a{
                     color: $black;
-                    font-size: 1rem;
+                    font-size: 0.9rem;
                     font-weight: 900;
                     font-style: normal;
                 }
@@ -167,9 +167,9 @@ article.node-type-ressource{
             grid-column: 2;
             margin-top: 0.8rem;
             order: 5;
-            font-size: 1rem;
+            font-size: 0.9rem;
             font-weight: 900;
-            line-height: 1.3;
+            line-height: 1.5;
         }
         .field--name-field-edition{
             order: 7;

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików