Jelajahi Sumber

class article

ouidade 1 hari lalu
induk
melakukan
09bf2b4c8b

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

@@ -5605,7 +5605,7 @@ svg.ext {
   opacity: 0 !important;
 }
 .path-ressources .layout-content .region-content #block-contenudelapageprincipale .layout--onecol .layout__region--content .block-region-content .block-views-blockbase-de-donnees-block-1 .view-base-de-donnees .view-content .view-type-slide:not(footer) .views-row-wrapper .slick-next {
-  right: 3%;
+  right: 10%;
 }
 .path-ressources .layout-content .region-content #block-contenudelapageprincipale .layout--onecol .layout__region--content .block-region-content .block-views-blockbase-de-donnees-block-1 .view-base-de-donnees .view-content .view-type-slide:has(.type-publication-issue-du-programme-eqld)::before {
   background-color: rgba(0, 158, 227, 0.2);

+ 8 - 7
web/themes/custom/eql/eql.theme

@@ -24,6 +24,7 @@ function eql_preprocess_html(&$variables) {
 function eql_preprocess_node(&$variables){
   $node = &$variables['node'];
   $variables['attributes']['class'][] = 'node-type-' . $node->gettype();
+
   if($node->gettype() == "actualite") {
     $actu_type = $node->get('field_actu_type')->getString();
     $variables['attributes']['class'][] = 'actu-type-' . $actu_type;
@@ -42,13 +43,13 @@ function eql_preprocess_node(&$variables){
   //     $variables['attributes']['class'][] = 'type-de-ressource-' . Html::cleanCssIdentifier($type_de_ressource_name);
   //   }
   // }
-  // if ($node->getType() === 'ressource' && $node->hasField('field_type_de_ressource') && !$node->get('field_type_de_ressource')->isEmpty()) {
-  //   foreach ($node->get('field_type_de_ressource')->referencedEntities() as $term) {
-  //     $label = $term->label(); // ex: "Presse"
-  //     $class = 'type-' . Html::cleanCssIdentifier(strtolower($label));
-  //     $variables['attributes']['class'][] = $class;
-  //   }
-  // }
+  if ($node->getType() === 'ressource' && $node->hasField('field_type_de_ressource') && !$node->get('field_type_de_ressource')->isEmpty()) {
+    foreach ($node->get('field_type_de_ressource')->referencedEntities() as $term) {
+      $label = $term->label(); // ex: "Presse"
+      $class = 'type-' . Html::cleanCssIdentifier(strtolower($label));
+      $variables['attributes']['class'][] = $class;
+    }
+  }
 }
 
 function eql_preprocess_field(&$variables) {

+ 1 - 1
web/themes/custom/eql/scss/pages/ressources.scss

@@ -378,7 +378,7 @@
                                                     opacity: 0 !important;
                                                 }
                                                 .slick-next {
-                                                    right: 3%;
+                                                    right: 10%;
                                                   }
                                             }
 

+ 2 - 0
web/themes/custom/eql/templates/node--ressource--teaser.html.twig

@@ -74,6 +74,7 @@
 #}
 <article{{ attributes }}>
 
+
   {{ title_prefix }}
   {% if label and not page %}
     <h2{{ title_attributes }}>
@@ -93,6 +94,7 @@
   {% endif %}
 
   <div class='wrapper-ressource'{{ content_attributes }}>
+  
     {{ content }}
     <div class="filtres_projet">
     {{content.bottom}}