ouidade 1 неделя назад
Родитель
Сommit
6be557a424
2 измененных файлов с 14 добавлено и 0 удалено
  1. 0 0
      web/themes/custom/eql/dist/assets/bundle.js
  2. 14 0
      web/themes/custom/eql/scripts/main.js

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
web/themes/custom/eql/dist/assets/bundle.js


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

@@ -287,3 +287,17 @@ document.addEventListener('DOMContentLoaded', () => {
 //   }
 //   }
 // });
 // });
 
 
+// ////////////////// start tronquage sous titre  //////////////////
+  document.addEventListener("DOMContentLoaded", function () {
+    const maxLength = 80;
+
+    document.querySelectorAll('.view-base-de-donnees .wrapper-ressource .field--name-field-sous-titre').forEach(function (element) {
+      const fullText = element.textContent.trim();
+
+      if (fullText.length > maxLength) {
+        const truncated = fullText.slice(0, maxLength).trim() + '...';
+        element.textContent = truncated;
+      }
+    });
+  });
+

Некоторые файлы не были показаны из-за большого количества измененных файлов