From 09bf2b4c8b69faa1fc39bab23af62c30df54524e Mon Sep 17 00:00:00 2001 From: ouidade Date: Fri, 23 May 2025 09:50:35 +0200 Subject: [PATCH] class article --- web/themes/custom/eql/dist/assets/css/bundle.css | 2 +- web/themes/custom/eql/eql.theme | 15 ++++++++------- web/themes/custom/eql/scss/pages/ressources.scss | 2 +- .../templates/node--ressource--teaser.html.twig | 2 ++ 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/web/themes/custom/eql/dist/assets/css/bundle.css b/web/themes/custom/eql/dist/assets/css/bundle.css index 09bace1..8ad6a88 100644 --- a/web/themes/custom/eql/dist/assets/css/bundle.css +++ b/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); diff --git a/web/themes/custom/eql/eql.theme b/web/themes/custom/eql/eql.theme index a02fef9..9a08876 100644 --- a/web/themes/custom/eql/eql.theme +++ b/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) { diff --git a/web/themes/custom/eql/scss/pages/ressources.scss b/web/themes/custom/eql/scss/pages/ressources.scss index 955fec6..aa13bcc 100644 --- a/web/themes/custom/eql/scss/pages/ressources.scss +++ b/web/themes/custom/eql/scss/pages/ressources.scss @@ -378,7 +378,7 @@ opacity: 0 !important; } .slick-next { - right: 3%; + right: 10%; } } diff --git a/web/themes/custom/eql/templates/node--ressource--teaser.html.twig b/web/themes/custom/eql/templates/node--ressource--teaser.html.twig index 87246e6..29dcf3b 100644 --- a/web/themes/custom/eql/templates/node--ressource--teaser.html.twig +++ b/web/themes/custom/eql/templates/node--ressource--teaser.html.twig @@ -74,6 +74,7 @@ #} + {{ title_prefix }} {% if label and not page %} @@ -93,6 +94,7 @@ {% endif %}
+ {{ content }}
{{content.bottom}}