Explorar el Código

fix css retour Maud

ouidade hace 9 meses
padre
commit
b7a5c3f375

BIN
private/4/Impot_sur_les_revenus_2022_Avance_de_reductions_et_credits_d_impot.pdf


BIN
private/4/afficheA3_chorale_2023.pdf


BIN
private/47/Document_de_Synthese_J00075735720_v3.pdf


+ 24 - 0
web/private:/.htaccess

@@ -0,0 +1,24 @@
+# Deny all requests from Apache 2.4+.
+<IfModule mod_authz_core.c>
+  Require all denied
+</IfModule>
+
+# Deny all requests from Apache 2.0-2.2.
+<IfModule !mod_authz_core.c>
+  Deny from all
+</IfModule>
+
+# Turn off all options we don't need.
+Options -Indexes -ExecCGI -Includes -MultiViews
+
+# Set the catch-all handler to prevent scripts from being executed.
+SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
+<Files *>
+  # Override the handler again if we're run later in the evaluation list.
+  SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003
+</Files>
+
+# If we know how to do it safely, disable the PHP engine entirely.
+<IfModule mod_php.c>
+  php_flag engine off
+</IfModule>

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


+ 4 - 134
web/themes/custom/reha/reha.theme

@@ -64,111 +64,17 @@ 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;
-
-    // }
   }
 
-/**
- * Implements hook_preprocess_HOOK() for page templates.
- */
-// function reha_preprocess_page(&$variables) {
-//   // Vérifiez si c'est une page de nœud.
-//   if ($node = \Drupal::routeMatch()->getParameter('node')) {
-//     if ($node instanceof \Drupal\node\NodeInterface) {
-//       // Ajoutez une classe unique basée sur le nid (Node ID).
-//       $variables['attributes']['class'][] = 'page-node-' . $node->id();
-
-//       // Ajoutez un ID unique basé sur le nid.
-//       $variables['attributes']['id'] = 'page-node-' . $node->id();
-//     }
-//   }
-//   else {
-//     // Si ce n'est pas une page de nœud, vous pouvez ajouter un ID basé sur le nom de la route.
-//     $route_name = \Drupal::routeMatch()->getRouteName();
-//     $variables['attributes']['id'] = 'page-' . str_replace('.', '-', $route_name);
-//   }
-
-// }
-
-
-
-
-// /**
-//  * Implements hook_preprocess_HOOK() for node templates.
-//  */
-// function reha_preprocess_node(&$variables) {
-//   if ($variables['node']->getType() == 'site') {
-//     $fields_to_exclude = [
-//       'field--type-image', // Remplacez par le nom machine exact de votre champ image
-//     ];
-
-//     $filtered_content = [];
-//     $image_field_content = '';
 
-//     foreach ($variables['content'] as $field_name => $field_content) {
-//       if (!in_array($field_name, $fields_to_exclude)) {
-//         $filtered_content[$field_name] = $field_content;
-//       } else {
-//         $image_field_content = $field_content;
-//       }
-//     }
-
-//     $variables['filtered_content'] = $filtered_content;
-//     $variables['image_field_content'] = $image_field_content;
-//   }
-// }
-
-
-
-/**
- * Prepares variables for block templates.
- *
- * Default template: block.html.twig.
- *
- * Prepares the values passed to the theme_block function to be passed
- * into a pluggable template engine. Uses block properties to generate a
- * series of template file suggestions. If none are found, the default
- * block.html.twig is used.
- *
- * Most themes use their own copy of block.html.twig. The default is located
- * inside "core/modules/block/templates/block.html.twig". Look in there for the
- * full list of available variables.
- *
- * @param array $variables
- *   An associative array containing:
- *   - elements: An associative array containing the properties of the element.
- *     Properties used: #block, #configuration, #children, #plugin_id.
- */
-
-//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 (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']]);
@@ -195,42 +101,6 @@ 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 = [
-  //     'field_image', // Remplacez par le nom machine exact du champ que vous souhaitez exclure
-  //   ];
-
-  //   $filtered_content = [];
-  //   $excluded_field_content = '';
-
-  //   foreach ($variables['content'] as $field_name => $field_content) {
-  //     if (!in_array($field_name, $fields_to_exclude)) {
-  //       $filtered_content[$field_name] = $field_content;
-  //     } else {
-  //       $excluded_field_content = $field_content;
-  //     }
-  //   }
-
-  //   $variables['filtered_content'] = $filtered_content;
-  //   $variables['excluded_field_content'] = $excluded_field_content;
-  // }
-
 }
 

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

@@ -1,5 +1,5 @@
 
-$header-height : 150px;
+$header-height : 110px;
 $width-menu-slidedown : 550px; 
 
 .layout-container {

+ 4 - 6
web/themes/custom/reha/scss/global/variables/_buttons.scss

@@ -3,10 +3,11 @@
 
 %buttonwithborder {
     text-transform: uppercase;
-    padding: 1rem;
+    padding: 0.5rem;
     border: solid black 1px;
     margin-bottom: 1rem;
     background-color: $white-button;
+    font-size: 0.9rem;
     @media (max-width:891px) {
         font-size: 1rem;
      }
@@ -23,15 +24,12 @@
 .page-programme .field--type-link {
     @extend %buttonwithborder;
     width: fit-content;
-        padding: 0.4rem;
-    
+    padding: 0.3rem;
+    background-color: transparent;
 }
 .field--type-link {
     @extend %buttonwithborder;
     width: fit-content;
-    .page-programme{
-        padding: 0.4rem;
-    }
 }
 
 

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

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

+ 3 - 2
web/themes/custom/reha/scss/pages/home/home-view-actualites.scss

@@ -2,6 +2,7 @@
     // display:none;
     background-color: white;
     padding-bottom: 3rem;
+    padding-left: 12%;
     h2{
         width: 80%;
         margin: auto;
@@ -15,8 +16,8 @@
     //    justify-content: space-between;
 
         .views-row{
-            width: 30%;
-            padding-right: 2rem;
+            width: 20vw !important;
+            padding-right: 5rem;
             .node-type-actualite{
                 width: 100%;
                 display: flex;

+ 3 - 2
web/themes/custom/reha/scss/pages/home/home-view-presentation.scss

@@ -6,10 +6,11 @@
             .view-display-id-block_1{
                 width: 60%;
                 margin: auto;
-                padding-top: 5rem;
-                max-height: 300px;
+                padding-top: 3rem;
+                // max-height: 300px;
                 overflow: hidden;
                 text-overflow: ellipsis;
+                font-size: 1.3rem;
                 @media(max-width: 891px){
                     width: 80%;
                     padding-top: 3rem;

+ 13 - 8
web/themes/custom/reha/scss/pages/home/home-view-sites.scss

@@ -6,10 +6,10 @@
     font-weight: 800;
     padding: 2rem;
     margin-right: 1rem;
-    width: 20%;
+    width: 20vw;
     margin-left: 12%;
     padding-top: 0.5rem;
-    padding-left: 0.5rem;
+    padding-left: 0.8rem;
     padding-bottom: 5rem;
     @media(max-width: 891px){
         margin-bottom: 1rem;
@@ -17,10 +17,13 @@
         width: 50%;
         // margin: auto;
     }
-    p{margin: 0;}
-    strong{
+    p{
+        margin: 0;
         font-size: 1.3rem;
     }
+    strong{
+        font-size: 1.5rem;
+    }
     }
     .block-views-blocksites-block-1 {
         top: -60px;
@@ -52,14 +55,15 @@
                         // width: 70%;
                         // // object-fit: cover;
                         // height: auto;
-                        height: 500px;
-                        width: auto;                        
+                        max-height: 500px;
+                        width: 100%;
+                        object-fit: cover;                      
                     }
                 }
-                .filtered-content{
+                .infos-content-site{
                     // border: solid $yellow-puca 1px;
                     background-color: $white-button;
-                    width: 80%;
+                    width: 20vw;
                     order: 2;
                     display: flex;
                     flex-direction: column;
@@ -126,5 +130,6 @@
         margin: auto;
         z-index: 99;
         position: relative;
+        top: -20px;
     }
 }

+ 19 - 25
web/themes/custom/reha/scss/pages/le-programme.scss

@@ -6,49 +6,48 @@
     .block-region-second{
         h2{
             font-weight: 1000;
+            font-size: 1.8rem;
+        }
+        .block-views-blockhome-block-1{
+            width: 80%;
+            font-size: 1.2rem;
         }
         .view-display-id-block_1{
             margin: 0;
             width: 80%;
             padding-top: 1rem;
-       }
-    
-      
-    
-      .block-config-pages-block{
+        }
+
+       .block-config-pages-block{
         margin: 0;
         width: 80%;
         padding-top: 1rem;
         .config_pages--partenaires--full{
-           
             .paragraph--type--partenaire{
-                // background-color: $white;
                 width: 100%;
                 padding-bottom: 3rem;
-                display: grid;
-                grid-template-columns: repeat(7, 1fr);
-                grid-template-rows: repeat(auto-fill);
+                height: 205px;
+                display: flex;
+                flex-direction: column;
+                flex-wrap: wrap;
+                justify-content: center;
+                align-content: baseline;
                 @media (max-width: 810px){
                     display: flex;
                     flex-direction: column;
                 }
+                .paragraph--type--partenaire>* {
+                flex: 1 1 80px;
+                }
                 .field--name-field-logo{
-                
-                    grid-column: 1 / 2;
-                    grid-row:  2;
-                    margin-top: 2rem;
+                    width: fit-content;
                     padding-right: 1rem;
                 }
                 .field--name-field-nom{
-                    grid-column: 2 / 8;
-                    grid-row:  1;
                     font-weight: 900;
                     font-size: 1.2rem
-                    
                 }
                 .field--name-field-texte{
-                    grid-column: 2 / 8;
-                    grid-row:  2;
                     .field__item{
                         p{
                             strong{
@@ -56,20 +55,15 @@
                             }
                         }
                     }
-                    
                 }
                 .field--name-field-lien{
-                    grid-column: 2 / 8;
-                    grid-row:  3;
+                    background-color: none;
                 }
                
             
             }
         }
-    
       }
-
-
     }
 }
 

+ 12 - 11
web/themes/custom/reha/scss/pages/node-site.scss

@@ -14,15 +14,6 @@
 
         #block-reha-titredepage{
             display: none;
-            // background-color: white;
-            // width: 25vw;
-            // padding-top: 1rem;
-            // padding-left: 1rem;
-            // padding-right: 1rem;
-            // font-size: 0.8rem;
-            // h1{
-            //     margin: 0 ;
-            // }
         }
         .node-type-site{
             margin: auto;
@@ -35,16 +26,18 @@
                 .field--name-field-image{
                     // position: relative;
                     // order: 2;
-                    width: 80%;
+                    width: 100%;
                     margin: auto;
                     // max-width: 100%;
                     .field__item{
                         display: flex;
                         flex-direction: row;
+                        // padding-left: 20%;
                         img{
                             width: 100%;
                             object-fit: cover;
                             height: auto;
+                            padding-left: 13%;
                         }
                         blockquote{
                             align-self: flex-end;
@@ -61,7 +54,7 @@
                 }
             }
            
-            .filtered-content{
+            .infos-content-site{
                 z-index: 99;
                 background-color: $white-button;
                 width: 25vw;
@@ -135,6 +128,14 @@
                 }
                 
             }  
+            .body-content-site{
+                order: 3;
+                top: -60px;
+                position: relative;
+                width: 50%;
+                margin: auto;
+                font-size: 1.3rem;
+            }
         }
     }
 }

+ 7 - 6
web/themes/custom/reha/scss/partials/_header.scss

@@ -2,7 +2,7 @@
 
 header{                       
     display: block;
-    height: 150px;
+    height: 120px;
     background-color: $white-header;
     z-index: 99;
     width: 100vw;
@@ -29,10 +29,10 @@ header{
 
         #block-reha-logoministere{
             grid-column: 1;
-            width: 200px;
+            width: 135px;
             min-width: 100px;
             padding-left: 80px;
-            padding-top: 30px;
+            // padding-top: 30px;
             height: 100%;
                 img{
                     max-width: 100%;
@@ -55,14 +55,15 @@ header{
             grid-column: 2;
             // max-height: 80%;
             height: $header-height;
-            padding-top: 20px;
+            padding-left: 1rem;
+            // padding-top: 20px;
             .field--name-field-logo{
                 height: $header-height;
                 .field__item{
                     height: $header-height;
                     img{
-                        max-height:inherit;
-                        width: fit-content;
+                        max-height:$header-height;
+                        width: auto;
                     }
                 }
             }

+ 16 - 1
web/themes/custom/reha/templates/node--site.html.twig

@@ -106,7 +106,7 @@
   {% endif %}
 
   {# Envelopper le titre et tous les autres champs dans une nouvelle div #}
-  <div class="filtered-content">
+  <div class="infos-content-site">
   <h1>{{ node.label }}</h1>
     {% if label and not page %}
       <h2{{ title_attributes }}>
@@ -118,6 +118,21 @@
       {{ field_content }}
     {% endfor %}
   </div>
+    {% if body_field_content is defined or files_field_content is defined %}
+    <div class="body-content-site">
+      {% if body_field_content is defined %}
+        <div class="summary-content">
+          {{ body_field_content }}
+        </div>
+      {% endif %}
+      {% if files_field_content is defined %}
+        <div class="links-content">
+          {{ files_field_content }}
+          {{ liens_field_content }}
+        </div>
+      {% endif %}
+    </div>
+  {% endif %}
 
   {{ title_suffix }}
 

+ 55 - 0
web/themes/custom/reha/templates/paragraph--partenaire--complet.html.twig

@@ -0,0 +1,55 @@
+{#
+/**
+ * @file
+ * Default theme implementation to display a paragraph.
+ *
+ * Available variables:
+ * - paragraph: Full paragraph entity.
+ *   Only method names starting with "get", "has", or "is" and a few common
+ *   methods such as "id", "label", and "bundle" are available. For example:
+ *   - paragraph.getCreatedTime() will return the paragraph creation timestamp.
+ *   - paragraph.id(): The paragraph ID.
+ *   - paragraph.bundle(): The type of the paragraph, for example, "image" or "text".
+ *   - paragraph.getOwnerId(): The user ID of the paragraph author.
+ *   See Drupal\paragraphs\Entity\Paragraph for a full list of public properties
+ *   and methods for the paragraph object.
+ * - content: All paragraph items. Use {{ content }} to print them all,
+ *   or print a subset such as {{ content.field_example }}. Use
+ *   {{ content|without('field_example') }} to temporarily suppress the printing
+ *   of a given child element.
+ * - attributes: HTML attributes for the containing element.
+ *   The attributes.class element may contain one or more of the following
+ *   classes:
+ *   - paragraphs: The current template type (also known as a "theming hook").
+ *   - paragraphs--type-[type]: The current paragraphs type. For example, if the paragraph is an
+ *     "Image" it would result in "paragraphs--type--image". Note that the machine
+ *     name will often be in a short form of the human readable label.
+ *   - paragraphs--view-mode--[view_mode]: The View Mode of the paragraph; for example, a
+ *     preview would result in: "paragraphs--view-mode--preview", and
+ *     default: "paragraphs--view-mode--default".
+ * - view_mode: View mode; for example, "preview" or "full".
+ * - logged_in: Flag for authenticated user status. Will be true when the
+ *   current user is a logged-in member.
+ * - is_admin: Flag for admin user status. Will be true when the current user
+ *   is an administrator.
+ *
+ * @see template_preprocess_paragraph()
+ *
+ * @ingroup themeable
+ */
+#}
+{%
+  set classes = [
+    'paragraph',
+    'paragraph--type--' ~ paragraph.bundle|clean_class,
+    view_mode ? 'paragraph--view-mode--' ~ view_mode|clean_class,
+    not paragraph.isPublished() ? 'paragraph--unpublished'
+  ]
+%}
+{% block paragraph %}
+  <div{{ attributes.addClass(classes) }}>
+    {% block content %}
+      {{ content }}
+    {% endblock %}
+  </div>
+{% endblock paragraph %}

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