1
0

5 Commity 91befd8480 ... e22e7bcece

Autor SHA1 Správa Dátum
  ouidade e22e7bcece resp region top 1 mesiac pred
  ouidade 69c918f64d ajout lien projet à ressource 1 mesiac pred
  bach 447a6be5fb bug fix 1 mesiac pred
  bach 34f4895399 projets liés top block 1 mesiac pred
  bach 279c3041e8 projets liés 1 mesiac pred

+ 14 - 2
config/sync/core.entity_form_display.node.ressource.default.yml

@@ -12,6 +12,7 @@ dependencies:
     - field.field.node.ressource.field_images
     - field.field.node.ressource.field_liens
     - field.field.node.ressource.field_mots_clefs
+    - field.field.node.ressource.field_projets_liee
     - field.field.node.ressource.field_ress
     - field.field.node.ressource.field_sous_titre
     - field.field.node.ressource.field_textes
@@ -67,6 +68,7 @@ third_party_settings:
     group_liens:
       children:
         - field_liens
+        - field_projets_liee
         - field_ress
         - field_actu_liee
       label: Liens
@@ -142,7 +144,7 @@ mode: default
 content:
   field_actu_liee:
     type: entity_reference_autocomplete
-    weight: 129
+    weight: 130
     region: content
     settings:
       match_operator: CONTAINS
@@ -211,7 +213,7 @@ content:
       size: 60
       placeholder: ''
     third_party_settings: {  }
-  field_ress:
+  field_projets_liee:
     type: entity_reference_autocomplete
     weight: 128
     region: content
@@ -221,6 +223,16 @@ content:
       size: 60
       placeholder: ''
     third_party_settings: {  }
+  field_ress:
+    type: entity_reference_autocomplete
+    weight: 129
+    region: content
+    settings:
+      match_operator: CONTAINS
+      match_limit: 10
+      size: 60
+      placeholder: ''
+    third_party_settings: {  }
   field_sous_titre:
     type: string_textfield
     weight: -4

+ 22 - 11
config/sync/core.entity_view_display.node.ressource.default.yml

@@ -12,6 +12,7 @@ dependencies:
     - field.field.node.ressource.field_images
     - field.field.node.ressource.field_liens
     - field.field.node.ressource.field_mots_clefs
+    - field.field.node.ressource.field_projets_liee
     - field.field.node.ressource.field_ress
     - field.field.node.ressource.field_sous_titre
     - field.field.node.ressource.field_textes
@@ -38,14 +39,14 @@ content:
     settings:
       link: true
     third_party_settings: {  }
-    weight: 12
+    weight: 13
     region: content
   field_auteur_s_:
     type: text_default
     label: visually_hidden
     settings: {  }
     third_party_settings: {  }
-    weight: 3
+    weight: 4
     region: content
   field_collections:
     type: entity_reference_label
@@ -53,7 +54,7 @@ content:
     settings:
       link: true
     third_party_settings: {  }
-    weight: 5
+    weight: 6
     region: content
   field_date_de_parution:
     type: datetime_default
@@ -62,14 +63,14 @@ content:
       timezone_override: ''
       format_type: short
     third_party_settings: {  }
-    weight: 2
+    weight: 3
     region: content
   field_edition:
     type: text_default
     label: visually_hidden
     settings: {  }
     third_party_settings: {  }
-    weight: 4
+    weight: 5
     region: content
   field_fichiers:
     type: file_default
@@ -85,6 +86,8 @@ content:
     settings:
       image_style: ''
       image_link: ''
+      image_loading:
+        attribute: lazy
     third_party_settings: {  }
     weight: 8
     region: content
@@ -106,11 +109,19 @@ content:
     settings:
       link: true
     third_party_settings: {  }
-    weight: 13
+    weight: 14
+    region: content
+  field_projets_liee:
+    type: entity_reference_label
+    label: above
+    settings:
+      link: true
+    third_party_settings: {  }
+    weight: 12
     region: content
   field_ress:
     type: entity_reference_label
-    label: visually_hidden
+    label: above
     settings:
       link: true
     third_party_settings: {  }
@@ -122,7 +133,7 @@ content:
     settings:
       link_to_entity: false
     third_party_settings: {  }
-    weight: 1
+    weight: 2
     region: content
   field_textes:
     type: entity_reference_revisions_entity_view
@@ -131,7 +142,7 @@ content:
       view_mode: default
       link: ''
     third_party_settings: {  }
-    weight: 14
+    weight: 15
     region: content
   field_type_de_ressource:
     type: entity_reference_label
@@ -139,7 +150,7 @@ content:
     settings:
       link: true
     third_party_settings: {  }
-    weight: 0
+    weight: 1
     region: content
   field_videos:
     type: video_embed_field_video
@@ -159,7 +170,7 @@ content:
       linked: true
       tag: h2
     third_party_settings: {  }
-    weight: -50
+    weight: 0
     region: content
 hidden:
   created: true

+ 2 - 0
config/sync/core.entity_view_display.node.ressource.sidebar.yml

@@ -13,6 +13,7 @@ dependencies:
     - field.field.node.ressource.field_images
     - field.field.node.ressource.field_liens
     - field.field.node.ressource.field_mots_clefs
+    - field.field.node.ressource.field_projets_liee
     - field.field.node.ressource.field_ress
     - field.field.node.ressource.field_sous_titre
     - field.field.node.ressource.field_textes
@@ -97,6 +98,7 @@ hidden:
   field_edition: true
   field_fichiers: true
   field_liens: true
+  field_projets_liee: true
   field_ress: true
   field_textes: true
   field_videos: true

+ 2 - 0
config/sync/core.entity_view_display.node.ressource.teaser.yml

@@ -13,6 +13,7 @@ dependencies:
     - field.field.node.ressource.field_images
     - field.field.node.ressource.field_liens
     - field.field.node.ressource.field_mots_clefs
+    - field.field.node.ressource.field_projets_liee
     - field.field.node.ressource.field_ress
     - field.field.node.ressource.field_sous_titre
     - field.field.node.ressource.field_textes
@@ -110,6 +111,7 @@ hidden:
   field_collections: true
   field_fichiers: true
   field_liens: true
+  field_projets_liee: true
   field_ress: true
   field_textes: true
   field_videos: true

+ 29 - 0
config/sync/field.field.node.ressource.field_projets_liee.yml

@@ -0,0 +1,29 @@
+uuid: aeb56f7f-c4a9-4526-b6c8-28e6cd12f84f
+langcode: fr
+status: true
+dependencies:
+  config:
+    - field.storage.node.field_projets_liee
+    - node.type.projet
+    - node.type.ressource
+id: node.ressource.field_projets_liee
+field_name: field_projets_liee
+entity_type: node
+bundle: ressource
+label: 'Projet(s) lié(s)'
+description: ''
+required: false
+translatable: false
+default_value: {  }
+default_value_callback: ''
+settings:
+  handler: 'default:node'
+  handler_settings:
+    target_bundles:
+      projet: projet
+    sort:
+      field: _none
+      direction: ASC
+    auto_create: false
+    auto_create_bundle: ''
+field_type: entity_reference

+ 19 - 0
config/sync/field.storage.node.field_projets_liee.yml

@@ -0,0 +1,19 @@
+uuid: b6c3a689-a3d1-4b11-8afc-fda58f3137fa
+langcode: fr
+status: true
+dependencies:
+  module:
+    - node
+id: node.field_projets_liee
+field_name: field_projets_liee
+entity_type: node
+type: entity_reference
+settings:
+  target_type: node
+module: core
+locked: false
+cardinality: -1
+translatable: true
+indexes: {  }
+persist_with_no_fields: false
+custom_storage: false

+ 17 - 0
config/sync/page_manager.page_variant.node_view-panels_variant-3.yml

@@ -243,6 +243,23 @@ variant_settings:
       region: top
       weight: -3
       uuid: f3b0080e-eb99-4b42-995b-830660c6ac48
+    f5f57639-b8c6-4c52-914e-393de85997fc:
+      id: 'entity_field:node:field_projets_liee'
+      label: 'Projet(s) lié(s)'
+      label_display: visible
+      provider: ctools_block
+      context_mapping:
+        entity: node
+      formatter:
+        type: entity_reference_label
+        weight: 0
+        label: above
+        settings:
+          link: true
+        third_party_settings: {  }
+      region: top
+      weight: 0
+      uuid: f5f57639-b8c6-4c52-914e-393de85997fc
   page_title: ''
   layout: layout_threecol_25_50_25
   layout_settings:

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

@@ -2162,6 +2162,7 @@ a {
     grid-column: 1;
     grid-row: 1/span 7; /* Prendre toutes les lignes disponibles */
     align-self: start; /* S'assurer qu'il commence en haut */
+    justify-self: end;
   }
 }
 @media (max-width: 1100px) {
@@ -2182,7 +2183,8 @@ a {
 .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-edition,
 .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-auteur-s-,
 .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-date-de-parution,
-.page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-mots-clefs {
+.page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-mots-clefs,
+.page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-projets-liee {
   width: 100%;
   margin-left: 13%;
 }
@@ -2194,7 +2196,8 @@ a {
   .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-edition,
   .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-auteur-s-,
   .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-date-de-parution,
-  .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-mots-clefs {
+  .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-mots-clefs,
+  .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-projets-liee {
     width: auto;
     margin-right: 15%;
   }
@@ -2207,13 +2210,15 @@ a {
   .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-edition,
   .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-auteur-s-,
   .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-date-de-parution,
-  .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-mots-clefs {
+  .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-mots-clefs,
+  .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-projets-liee {
     width: auto;
-    margin-left: 7rem;
-    margin-right: 1;
-    grid-column: 3/4;
+    margin-left: 2rem;
+    margin-right: 15%;
+    grid-column: 2/4;
     align-self: start; /* S'assurer qu'il commence en haut */
     height: fit-content;
+    justify-self: start;
   }
   .page-node-type-ressource .layout__region--top .block-region-top .block-block-content4e5df355-e76c-4e44-bec0-e211d94f2640 p,
   .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-type-de-ressource p,
@@ -2222,7 +2227,8 @@ a {
   .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-edition p,
   .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-auteur-s- p,
   .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-date-de-parution p,
-  .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-mots-clefs p {
+  .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-mots-clefs p,
+  .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-projets-liee p {
     margin: 0;
   }
 }
@@ -2234,7 +2240,8 @@ a {
   .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-edition,
   .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-auteur-s-,
   .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-date-de-parution,
-  .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-mots-clefs {
+  .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-mots-clefs,
+  .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-projets-liee {
     margin-left: 9%;
     margin-right: 9%;
   }
@@ -2253,11 +2260,15 @@ a {
   vertical-align: middle;
 }
 .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-type-de-ressource {
-  margin-top: 2rem;
   color: rgb(0, 158, 227);
   text-transform: uppercase;
   font-weight: 800;
 }
+@media (max-width: 1099px) {
+  .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-type-de-ressource {
+    margin-top: 2rem;
+  }
+}
 .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodetitle {
   font-size: 2rem;
   font-weight: 600;
@@ -2304,6 +2315,18 @@ a {
     margin-bottom: 0.5rem;
   }
 }
+.page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-projets-liee h2 {
+  display: none;
+}
+.page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-projets-liee .field__label {
+  display: none;
+}
+.page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-projets-liee a {
+  color: black;
+}
+.page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-projets-liee a:hover {
+  color: rgb(0, 158, 227);
+}
 .page-node-type-ressource .layout__region--top .block-block-content4e5df355-e76c-4e44-bec0-e211d94f2640:empty,
 .page-node-type-ressource .layout__region--top .block-entity-fieldnodefield-type-de-ressource:empty,
 .page-node-type-ressource .layout__region--top .block-entity-fieldnodetitle:empty,

+ 9 - 9
web/themes/custom/eql/eql.theme

@@ -29,16 +29,16 @@ function eql_preprocess_node(&$variables){
     $type_protagoniste = $node->get('field_type_de_protagoniste')->getString();
     $variables['attributes']['class'][] = 'type-de-protagoniste-' . $type_protagoniste;
   }
-// Vérifie si le champ field_type_de_ressource existe et ajoute une classe basée sur sa valeur
-if ($node->hasField('field_type_de_ressource') && !$node->get('field_type_de_ressource')->isEmpty()) {
-  // Récupère la valeur de field_type_de_ressource
-  $type_de_ressource = $node->get('field_type_de_ressource')->entity->getName();
-  // Ajoute la classe CSS basée sur la valeur du type de ressource
-  $variables['attributes']['class'][] = 'type-de-ressource-' . Html::cleanCssIdentifier($type_de_ressource);
+  // Vérifie si le champ field_type_de_ressource existe et ajoute une classe basée sur sa valeur
+  if ($node->hasField('field_type_de_ressource') && !$node->get('field_type_de_ressource')->isEmpty()) {
+    // Récupère la valeur de field_type_de_ressource
+    $type_de_ressource_entity = $node->get('field_type_de_ressource')->entity;
+    if ($type_de_ressource_entity) {
+      $type_de_ressource_name = $type_de_ressource_entity->getName();
+      // Ajoute la classe CSS basée sur la valeur du type de ressource
+      $variables['attributes']['class'][] = 'type-de-ressource-' . Html::cleanCssIdentifier($type_de_ressource_name);
+    }
   }
-  
-
-  
 }
 
 function eql_preprocess_field(&$variables) {

+ 23 - 113
web/themes/custom/eql/scss/pages/_ressource.scss

@@ -12,29 +12,18 @@
                 flex-direction: column;
                 @media screen and (min-width:1100px) {
                     display: grid;
-                    // grid-template-columns: 1fr repeat(8, 1fr) 1fr;
-                    // grid-template-rows: auto;
                     grid-template-columns: 1fr 2fr; /* 1/3 pour l'image, 2/3 pour le contenu */
                     gap: 1rem;
                 }
-                // &div:not(.block-entity-fieldnodefield-images){
-                //     @media screen and (min-width:800px) {
-                //         grid-column: 5/span 7;
-                        
-                //     }
-                // }
                 .block-entity-fieldnodefield-images{
                     width: fit-content;
-                    // margin: auto;
                     padding-right: 2rem;
                     padding-left: 25%;
-                    @media screen and (min-width:1100px) {
-                        // grid-column: 2/span 4;
-                        // grid-row: 1 /span 5;
-                        
+                    @media screen and (min-width:1100px) {                        
                         grid-column: 1;
                         grid-row: 1 /span 7; /* Prendre toutes les lignes disponibles */
                         align-self: start; /* S'assurer qu'il commence en haut */
+                        justify-self: end;
                     }
                     @media (max-width: 1100px) {
                         padding-left: 13%;
@@ -52,7 +41,8 @@
                 .block-entity-fieldnodefield-edition, 
                 .block-entity-fieldnodefield-auteur-s-, 
                 .block-entity-fieldnodefield-date-de-parution, 
-                .block-entity-fieldnodefield-mots-clefs {
+                .block-entity-fieldnodefield-mots-clefs,
+                .block-entity-fieldnodefield-projets-liee {
                     width: 100%;
                     margin-left: 13%;
                     @media (max-width: 1099px) {
@@ -61,11 +51,12 @@
                     }
                     @media screen and (min-width: 1100px) {
                         width: auto;
-                        margin-left: 7rem;
-                        margin-right: 1;
-                        grid-column: 3 / 4;
+                        margin-left: 2rem;
+                        margin-right: 15%;
+                        grid-column: 2 / 4;
                         align-self: start; /* S'assurer qu'il commence en haut */
                         height: fit-content ;
+                        justify-self: start;
                         p{margin: 0;}
 
                     }
@@ -89,46 +80,19 @@
                     padding-top: 1rem;
                     padding-bottom: 0.5rem;
                     vertical-align: middle;
-                    // @media screen and (min-width:1100px) {
-                    //     // width: 50%;
-                    //     // grid-column: 5/span 7;
-                    //     // grid-row: 1;
-                    // }
-    
                 }
 
                 .block-entity-fieldnodefield-type-de-ressource{
-                    margin-top: 2rem;
-                    // margin-left: 13%;
                     color: $blue-light;
                     text-transform: uppercase;
                     font-weight: 800;
-                    // @media (max-width: 810px){
-                    //     margin-left:9%;
-                    //     margin-right: 9%;
-                    // }
-                    // @media screen and (min-width:1100px) {
-                    //     width: 50%;
-                    //     grid-column: 5/span 7;
-                    //     grid-row: 1;
-
-                    // }
-
+                    @media (max-width: 1099px) {
+                    margin-top: 2rem;
+                    }
                 }
                 .block-entity-fieldnodetitle{
-                    // margin-left: 13%;
                     font-size: 2rem;
                     font-weight: 600;
-                    // @media (max-width: 810px){
-                    //     margin-left:9%;
-                    //     margin-right: 9%;
-                    // }
-                    // @media screen and (min-width:1100px) {
-                    //     width: 50%;
-                    //     grid-column: 5/span 7;
-                    //     grid-row: 2;
-
-                    // }
                     .field--name-title{
                         @media (max-width: 550px) {
                             font-size: 1.5rem;
@@ -138,44 +102,21 @@
                 }
 
                 .block-entity-fieldnodefield-sous-titre{
-                    // margin-left: 13%;
                     .field--name-field-edition{
                         p{
                             margin-bottom: 0;
                         }
                     }
-                    // @media (max-width: 810px){
-                    //     margin-left:9%;
-                    //     margin-right: 9%;
-                    // }
-                    // @media screen and (min-width:1100px) {
-                    //     width: 50%;
-                    //     grid-column: 5/span 7;
-                    //     grid-row: 3;
-
-                    // }
                 }
                 .block-entity-fieldnodefield-edition{
-                    // margin-left: 13%;
                     .field--name-field-edition{
                         p{
                             margin-bottom: 0;
                         }
                     }
-                    // @media (max-width: 810px){
-                    //     margin-left:9%;
-                    //     margin-right: 9%;
-                    // }
-                    // @media screen and (min-width:1100px) {
-                    //     width: 50%;
-                    //     grid-column: 5/span 7;
-                    //     grid-row: 4;
-
-                    // }
 
                 }
                 .block-entity-fieldnodefield-auteur-s-{
-                    // margin-left: 13%;
                     .field--name-field-auteur-s-{
                         font-size: 1.5rem;
                         font-weight: 800;
@@ -183,40 +124,14 @@
                             margin: 0;
                         }
                     }
-                    // @media (max-width: 810px){
-                    //     margin-left:9%;
-                    //     margin-right: 9%;
-                    // }
-                    // @media screen and (min-width:1100px) {
-                    //     width: 50%;
-                    //     grid-column: 5/span 7;
-                    //     grid-row: 5;
-
-                    // }
                 }    
 
                 .block-entity-fieldnodefield-date-de-parution{
-                    // margin-left: 13%;
-                    // @media (max-width: 810px){
-                    //     margin-left:9%;
-                    //     margin-right: 9%;
-                    // }
-                    // @media screen and (min-width:1100px) {
-                    //     width: 50%;
-                    //     grid-column: 5/span 7;
-                    //     grid-row: 6;
-
-                    // }
                 }
                 .block-entity-fieldnodefield-mots-clefs{
-                    // margin-left: 13%;
                     .field--name-field-mots-clefs{
                         display: inline-flex;
                         margin-top: 2rem;
-                        // &::after{
-                        //     content: url("../images/pictos/noun_Arrow_3771902.svg");
-                        //     align-self: end;
-                        // }
                         .field__item{
                             background: $blue-dark;
                             margin-right: 1rem;
@@ -228,8 +143,6 @@
                         }
                     }
                     @media (max-width: 810px){
-                        // margin-left:9%;
-                        // margin-right: 9%;
                         .field--name-field-mots-clefs{
                             display: flex;
                             flex-direction: row;
@@ -241,12 +154,16 @@
                         }    
 
                     }
-                    // @media screen and (min-width:800px) {
-                    //     width: 50%;
-                    //     grid-column: 5/span 7;
-                    //     grid-row: 7;
-
-                    // }   
+                }
+                .block-entity-fieldnodefield-projets-liee{
+                    h2{display: none;}
+                    .field__label{display: none;}
+                    a{
+                        color: black;
+                        &:hover{
+                            color: $blue-light;
+                        }
+                    }
                 }
             }
                         /* Hide empty blocks */
@@ -530,18 +447,11 @@
                                 ul.links.inline{
                                     display: none;
                                 }
-    
                             }
                         }
                     }       
-            
-
-                }
-               
-            
-            }
-            
-        
+                }            
+            }        
         }
     // }
 }