ouidade hace 4 meses
padre
commit
7b93e0576c

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
web/themes/custom/reha/dist/bundle.js


+ 10 - 5
web/themes/custom/reha/dist/css/bundle.css

@@ -227,10 +227,6 @@ main {
   margin-top: 7rem;
 }
 
-#block-reha-titredepage {
-  display: none;
-}
-
 p {
   background-color: transparent;
 }
@@ -969,7 +965,7 @@ input {
   font-family: "slick";
   font-size: 200px;
   line-height: 1;
-  color: #fdc300;
+  color: rgb(153, 147, 174);
   opacity: 0.75;
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale;
@@ -1169,6 +1165,12 @@ input {
   bottom: -40px !important;
 }
 
+.view-actus.slick-slider.slick-next:before {
+  content: ">";
+  font-weight: 100;
+  background: rgba(255, 255, 255, 0.1);
+}
+
 /*pages*/
 .home-page-layout-content {
   width: 100%;
@@ -2253,6 +2255,9 @@ html.js body.node-type-operation.node-id-7 div.dialog-off-canvas-main-canvas div
   width: fit-content;
   padding: 0.2rem 0.9rem;
 }
+.page-actualites .view-actus .views-row .node-type-actualite .infos-content .field--name-field-site div:nth-child(1) {
+  display: none;
+}
 .page-actualites .view-actus .views-row .node-type-actualite .infos-content .field--name-field-site .field__item {
   display: inline;
 }

+ 1 - 1
web/themes/custom/reha/js/reha.js

@@ -127,7 +127,7 @@ jQuery(document).ready(function($){
           }
         }]
     });
-    console.log('salut slick home');
+    console.log('slick actu');
 
 });
 

+ 46 - 0
web/themes/custom/reha/reha.theme

@@ -4,6 +4,7 @@
 use Drupal\Core\Url;
 use Drupal\Core\Link;
 use Drupal\Core\Render\Markup;
+use Drupal\Component\Utility\Html;
 
 
 /**
@@ -63,6 +64,28 @@ function reha_preprocess_html(&$variables) {
           $variables['files_field_content'] = $files_field_content;
           $variables['liens_field_content'] = $liens_field_content;
       }
+
+    //   if ($node->getType() == 'site') {
+    //     $blocks_to_exclude = [
+    //         'block-entity-fieldnodefield-image',
+    //     ];
+
+    //     $filtered_block_content = [];
+    //     $image_block_content = '';
+
+    //     foreach ($variables['content'] as $block_name => $field_content) {
+    //         if (!in_array($block_name, $blocks_to_exclude)) {
+    //             $filtered_block_content[$block_name] = $field_content;
+    //         } else {
+    //             $image_block_content = $field_content;
+    //         }
+    //     }
+
+    //     // Set variables for the template
+    //     $variables['filtered_block_content'] = $filtered_block_content;
+    //     $variables['image_block_content'] = $image_block_content;
+
+    // }
   }
 
 /**
@@ -137,6 +160,13 @@ function reha_preprocess_page(&$variables) {
 //https://www.hashbangcode.com/article/drupal-9-programmatically-creating-and-using-urls-and-links
 
 function reha_preprocess_block(&$variables) {
+
+//  // Conserver les IDs existants et générer un ID unique uniquement si aucun ID n'est présent
+//  if (empty($variables['attributes']['id'])) {
+//   $block_id = 'block-' . uniqid();
+//   $variables['attributes']['id'] = $block_id;
+// }
+
   if ($variables['plugin_id'] === "user_login_block") {
     $url = new Url('user.register', [], ['query' => ['destination' => '/node/add/operation']]);
     $link = new Link('proposer une opération', $url);
@@ -162,6 +192,22 @@ function reha_preprocess_block(&$variables) {
         ];
       }
     }
+
+  //     // Extraction du texte du <h2> et transformation en ID
+  // if (isset($variables['content']['#contextual_links']['block']['h2'])) {
+  //   $h2_text = $variables['content']['#contextual_links']['block']['h2'];
+  //   $block_id = Html::cleanCssIdentifier($h2_text);
+  //   $variables['attributes']['id'] = $block_id;
+  // } elseif (isset($variables['content']['#block_content']['body']['0']['#text'])) {
+  //   $h2_text = $variables['content']['#block_content']['body']['0']['#text'];
+  //   $block_id = Html::cleanCssIdentifier(strip_tags($h2_text));
+  //   $variables['attributes']['id'] = $block_id;
+  // } else {
+  //   // Fallback ID if no <h2> is found
+  //   $block_id = Html::cleanCssIdentifier($variables['plugin_id']);
+  //   $variables['attributes']['id'] = $block_id;
+  // }
+    
   }
   // if ($variables['plugin_id'] == 'actus-block-1') {
   //   $fields_to_exclude = [

+ 1 - 1
web/themes/custom/reha/scss/global/_layout.scss

@@ -84,7 +84,7 @@ main{
 }
 
 #block-reha-titredepage{
-    display: none;
+    // display: none;
 }
 
 p{

+ 4 - 0
web/themes/custom/reha/scss/pages/actualites.scss

@@ -54,6 +54,10 @@
                         border-radius: 50px;
                         width: fit-content;
                         padding: 0.2rem 0.9rem;
+                        div:nth-child(1)
+                       {
+                            display: none;
+                        }
                         .field__item{
                             display: inline;
                         }         

+ 1 - 1
web/themes/custom/reha/scss/partials/_slick-theme.scss

@@ -10,7 +10,7 @@
 $slick-font-path: "./fonts/" !default;
 $slick-font-family: "slick" !default;
 $slick-loader-path: "./" !default;
-$slick-arrow-color: $yellow-puca !default;
+$slick-arrow-color: $gris-violet !default;
 $slick-dot-color: black !default;
 $slick-dot-color-active: $slick-dot-color !default;
 $slick-prev-character: "\003C" !default;

+ 12 - 0
web/themes/custom/reha/scss/partials/_slick_custom.scss

@@ -1,4 +1,9 @@
 
+$slick-prev-character: "\003C" !default;
+$slick-next-character: "\003E" !default;
+$slick-arrow-color: $yellow-puca !default;
+
+
 
 .home-page-layout-content{
     .slick-dots {
@@ -6,3 +11,10 @@
     }
 }
 
+.view-actus.slick-slider.slick-next {
+    &:before {
+        content: $slick-next-character;
+        font-weight: 100;
+        background: rgba(255, 255, 255, 0.1);
+    }
+}

+ 1 - 0
web/themes/custom/reha/templates/field.html.twig

@@ -53,6 +53,7 @@
   ]
 %}
 
+
 {% if label_hidden %}
   {% if multiple %}
       <div{{ attributes.addClass(classes, 'field__items') }}>

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio