From 14d3e5bc50027dd4145ce8f789253b19d6cf9c89 Mon Sep 17 00:00:00 2001 From: bach Date: Fri, 15 Mar 2024 13:36:30 +0100 Subject: [PATCH] field sous-titre on ressources #2283 --- ...ity_view_display.node.ressource.teaser.yml | 21 ++++++++++++----- ...age_variant.node_view-panels_variant-3.yml | 23 ++++++++++++++++--- web/themes/custom/eql/css-compiled/styles.css | 10 ++++++++ .../custom/eql/scss/pages/_ressource.scss | 13 +++++++++++ .../custom/eql/scss/pages/_ressources.scss | 3 +++ 5 files changed, 61 insertions(+), 9 deletions(-) diff --git a/config/sync/core.entity_view_display.node.ressource.teaser.yml b/config/sync/core.entity_view_display.node.ressource.teaser.yml index 69d8220..66d9472 100644 --- a/config/sync/core.entity_view_display.node.ressource.teaser.yml +++ b/config/sync/core.entity_view_display.node.ressource.teaser.yml @@ -35,7 +35,7 @@ content: label: hidden settings: { } third_party_settings: { } - weight: 4 + weight: 5 region: content field_date_de_parution: type: datetime_default @@ -44,14 +44,14 @@ content: timezone_override: '' format_type: html_year third_party_settings: { } - weight: 5 + weight: 6 region: content field_edition: type: text_default label: hidden settings: { } third_party_settings: { } - weight: 3 + weight: 4 region: content field_images: type: image_delta_formatter @@ -61,6 +61,8 @@ content: image_link: '' deltas: 0 deltas_reversed: false + image_loading: + attribute: lazy third_party_settings: { } weight: 0 region: content @@ -70,7 +72,15 @@ content: settings: link: true third_party_settings: { } - weight: 6 + weight: 7 + region: content + field_sous_titre: + type: string + label: hidden + settings: + link_to_entity: false + third_party_settings: { } + weight: 3 region: content field_type_de_ressource: type: entity_reference_label @@ -83,7 +93,7 @@ content: links: settings: { } third_party_settings: { } - weight: 7 + weight: 8 region: content title: type: title @@ -101,7 +111,6 @@ hidden: field_fichiers: true field_liens: true field_ress: true - field_sous_titre: true field_textes: true field_videos: true langcode: true diff --git a/config/sync/page_manager.page_variant.node_view-panels_variant-3.yml b/config/sync/page_manager.page_variant.node_view-panels_variant-3.yml index 4f81136..a98f024 100644 --- a/config/sync/page_manager.page_variant.node_view-panels_variant-3.yml +++ b/config/sync/page_manager.page_variant.node_view-panels_variant-3.yml @@ -33,7 +33,7 @@ variant_settings: link: false third_party_settings: { } region: top - weight: -4 + weight: -5 uuid: caa20f04-91a3-4d10-88a2-b19119931e41 bdb9f644-29c7-40b1-aa7c-2530897794dd: id: 'entity_field:node:title' @@ -50,7 +50,7 @@ variant_settings: link_to_entity: false third_party_settings: { } region: top - weight: -3 + weight: -4 uuid: bdb9f644-29c7-40b1-aa7c-2530897794dd afc0d035-08fd-4687-a48a-eed9c8577b69: id: 'entity_field:node:field_edition' @@ -224,8 +224,25 @@ variant_settings: image_style: large third_party_settings: { } region: top - weight: -5 + weight: -6 uuid: 43592540-a6ef-4b23-92b2-300e056d69e6 + f3b0080e-eb99-4b42-995b-830660c6ac48: + id: 'entity_field:node:field_sous_titre' + label: 'Sous titre' + label_display: '0' + provider: ctools_block + context_mapping: + entity: node + formatter: + type: string + weight: 0 + label: hidden + settings: + link_to_entity: false + third_party_settings: { } + region: top + weight: -3 + uuid: f3b0080e-eb99-4b42-995b-830660c6ac48 page_title: '' layout: layout_threecol_25_50_25 layout_settings: diff --git a/web/themes/custom/eql/css-compiled/styles.css b/web/themes/custom/eql/css-compiled/styles.css index 101889d..2e193e0 100644 --- a/web/themes/custom/eql/css-compiled/styles.css +++ b/web/themes/custom/eql/css-compiled/styles.css @@ -1690,6 +1690,14 @@ a { .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodetitle { margin-left: 9%; margin-right: 9%; } } + .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-sous-titre { + margin-left: 13%; } + .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-sous-titre .field--name-field-edition p { + margin-bottom: 0; } + @media (max-width: 810px) { + .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-sous-titre { + margin-left: 9%; + margin-right: 9%; } } .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-edition { margin-left: 13%; } .page-node-type-ressource .layout__region--top .block-region-top .block-entity-fieldnodefield-edition .field--name-field-edition p { @@ -4220,6 +4228,8 @@ a { margin: 0; } .path-ressources .layout-content .region-content #block-contenudelapageprincipale .layout--onecol .layout__region--content .block-region-content .block-views-blockbase-de-donnees-block-1 .view-content .views-row .node-type-ressource .field--name-field-auteur-s- .field__label { display: none; } + .path-ressources .layout-content .region-content #block-contenudelapageprincipale .layout--onecol .layout__region--content .block-region-content .block-views-blockbase-de-donnees-block-1 .view-content .views-row .node-type-ressource .field--name-field-sous-titre { + margin-top: 0.5rem; } .path-ressources .layout-content .region-content #block-contenudelapageprincipale .layout--onecol .layout__region--content .block-region-content .block-views-blockbase-de-donnees-block-1 .view-content .views-row .node-type-ressource .field--name-field-edition { margin-top: 0.5rem; } .path-ressources .layout-content .region-content #block-contenudelapageprincipale .layout--onecol .layout__region--content .block-region-content .block-views-blockbase-de-donnees-block-1 .view-content .views-row .node-type-ressource .field--name-field-edition p { diff --git a/web/themes/custom/eql/scss/pages/_ressource.scss b/web/themes/custom/eql/scss/pages/_ressource.scss index abf2dc4..0008533 100644 --- a/web/themes/custom/eql/scss/pages/_ressource.scss +++ b/web/themes/custom/eql/scss/pages/_ressource.scss @@ -44,6 +44,19 @@ margin-right: 9%; } } + + .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%; + } + } .block-entity-fieldnodefield-edition{ margin-left: 13%; .field--name-field-edition{ diff --git a/web/themes/custom/eql/scss/pages/_ressources.scss b/web/themes/custom/eql/scss/pages/_ressources.scss index 050bccb..660162e 100644 --- a/web/themes/custom/eql/scss/pages/_ressources.scss +++ b/web/themes/custom/eql/scss/pages/_ressources.scss @@ -224,6 +224,9 @@ display:none; } } + .field--name-field-sous-titre{ + margin-top: 0.5rem; + } .field--name-field-edition{ margin-top: 0.5rem; p{