From 7e85e5761a2d142ef35121a4ca28e14716777729 Mon Sep 17 00:00:00 2001 From: bach Date: Fri, 24 Nov 2023 11:14:50 +0100 Subject: [PATCH] footer blocks by regions #2420 --- composer.json | 1 + composer.lock | 53 ++++++++++++++++++- .../sync/block.block.reha_config_pages_2.yml | 4 +- .../sync/block.block.reha_config_pages_3.yml | 22 ++++++++ config/sync/block.block.reha_logoreha_2.yml | 4 +- config/sync/block.block.reha_logoreha_3.yml | 25 +++++++++ .../block.block.reha_operateurduprogramme.yml | 4 +- ...lock.block.reha_operateurduprogramme_2.yml | 25 +++++++++ config/sync/block.block.reha_pieddepage.yml | 4 +- config/sync/block.block.reha_pieddepage_2.yml | 31 +++++++++++ config/sync/core.extension.yml | 1 + web/sites/development.services.yml | 50 ----------------- web/themes/custom/reha/reha.info.yml | 6 ++- .../custom/reha/templates/page.html.twig | 10 +++- 14 files changed, 178 insertions(+), 62 deletions(-) create mode 100644 config/sync/block.block.reha_config_pages_3.yml create mode 100644 config/sync/block.block.reha_logoreha_3.yml create mode 100644 config/sync/block.block.reha_operateurduprogramme_2.yml create mode 100644 config/sync/block.block.reha_pieddepage_2.yml diff --git a/composer.json b/composer.json index 5145d16..35e13e0 100644 --- a/composer.json +++ b/composer.json @@ -29,6 +29,7 @@ "drupal/panels": "^4.7", "drupal/paragraphs": "^1.16", "drupal/phone_number": "^2.0@alpha", + "drupal/social_media_links": "^2.9", "drupal/webform": "^6.2", "wikimedia/composer-merge-plugin": "^2.1" }, diff --git a/composer.lock b/composer.lock index 9795376..e158a35 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "fe3a970f200733b71d21e9f07b783697", + "content-hash": "2ee73d5782748e4512d1f15529f70d10", "packages": [ { "name": "asm89/stack-cors", @@ -6663,6 +6663,57 @@ "issues": "https://www.drupal.org/project/issues/smtp" } }, + { + "name": "drupal/social_media_links", + "version": "2.9.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/social_media_links.git", + "reference": "8.x-2.9" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/social_media_links-8.x-2.9.zip", + "reference": "8.x-2.9", + "shasum": "d73ea6199b48e11e57fe8a2aeb2afbf3c295704a" + }, + "require": { + "drupal/core": "^8 || ^9 || ^10" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "8.x-2.9", + "datestamp": "1665768361", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "Neslee Canil Pinto", + "homepage": "https://www.drupal.org/u/neslee-canil-pinto", + "role": "Maintainer" + }, + { + "name": "Christian Beier", + "homepage": "https://www.drupal.org/u/cbeier", + "role": "Maintainer" + } + ], + "description": "The module provides a block that display links (icons) to your profiles on various social networking sites.", + "homepage": "https://www.drupal.org/project/social_media_links", + "support": { + "source": "https://git.drupalcode.org/project/social_media_links", + "issues": "https://www.drupal.org/project/issues/social_media_links" + } + }, { "name": "drupal/sophron", "version": "2.0.1", diff --git a/config/sync/block.block.reha_config_pages_2.yml b/config/sync/block.block.reha_config_pages_2.yml index b73029f..73012a0 100644 --- a/config/sync/block.block.reha_config_pages_2.yml +++ b/config/sync/block.block.reha_config_pages_2.yml @@ -1,6 +1,6 @@ uuid: ac51b453-f5af-4d1e-92bd-2beee0250794 langcode: fr -status: true +status: false dependencies: module: - config_pages @@ -8,7 +8,7 @@ dependencies: - reha id: reha_config_pages_2 theme: reha -region: footer +region: header weight: -1 provider: null plugin: config_pages_block diff --git a/config/sync/block.block.reha_config_pages_3.yml b/config/sync/block.block.reha_config_pages_3.yml new file mode 100644 index 0000000..93becd1 --- /dev/null +++ b/config/sync/block.block.reha_config_pages_3.yml @@ -0,0 +1,22 @@ +uuid: e667b914-a9dd-49f4-9ad6-b92a61f9dc8f +langcode: fr +status: true +dependencies: + module: + - config_pages + theme: + - reha +id: reha_config_pages_3 +theme: reha +region: footer_right +weight: 0 +provider: null +plugin: config_pages_block +settings: + id: config_pages_block + label: Partenaires + label_display: visible + provider: config_pages + config_page_type: partenaires + config_page_view_mode: full +visibility: { } diff --git a/config/sync/block.block.reha_logoreha_2.yml b/config/sync/block.block.reha_logoreha_2.yml index 141105a..5c33b3b 100644 --- a/config/sync/block.block.reha_logoreha_2.yml +++ b/config/sync/block.block.reha_logoreha_2.yml @@ -1,6 +1,6 @@ uuid: 0ea21b35-747c-42c6-bce2-e18cae5ed543 langcode: fr -status: true +status: false dependencies: content: - 'block_content:logo_link:6aedcd97-72c8-4328-b52d-f4d2a5285b96' @@ -10,7 +10,7 @@ dependencies: - reha id: reha_logoreha_2 theme: reha -region: footer +region: header weight: -4 provider: null plugin: 'block_content:6aedcd97-72c8-4328-b52d-f4d2a5285b96' diff --git a/config/sync/block.block.reha_logoreha_3.yml b/config/sync/block.block.reha_logoreha_3.yml new file mode 100644 index 0000000..f2f0651 --- /dev/null +++ b/config/sync/block.block.reha_logoreha_3.yml @@ -0,0 +1,25 @@ +uuid: 74cf208f-3ebc-421e-94bc-b89300b25370 +langcode: fr +status: true +dependencies: + content: + - 'block_content:logo_link:6aedcd97-72c8-4328-b52d-f4d2a5285b96' + module: + - block_content + theme: + - reha +id: reha_logoreha_3 +theme: reha +region: footer_left +weight: 0 +provider: null +plugin: 'block_content:6aedcd97-72c8-4328-b52d-f4d2a5285b96' +settings: + id: 'block_content:6aedcd97-72c8-4328-b52d-f4d2a5285b96' + label: 'Logo reha' + label_display: '0' + provider: block_content + status: true + info: '' + view_mode: full +visibility: { } diff --git a/config/sync/block.block.reha_operateurduprogramme.yml b/config/sync/block.block.reha_operateurduprogramme.yml index 8515188..6ab1770 100644 --- a/config/sync/block.block.reha_operateurduprogramme.yml +++ b/config/sync/block.block.reha_operateurduprogramme.yml @@ -1,6 +1,6 @@ uuid: 68cc1027-f227-46ae-a518-a1df0bf4d39d langcode: fr -status: true +status: false dependencies: content: - 'block_content:logo_link:bc48e271-75cf-4c3f-a4aa-ecc3c573c060' @@ -10,7 +10,7 @@ dependencies: - reha id: reha_operateurduprogramme theme: reha -region: footer +region: header weight: -2 provider: null plugin: 'block_content:bc48e271-75cf-4c3f-a4aa-ecc3c573c060' diff --git a/config/sync/block.block.reha_operateurduprogramme_2.yml b/config/sync/block.block.reha_operateurduprogramme_2.yml new file mode 100644 index 0000000..a9e4713 --- /dev/null +++ b/config/sync/block.block.reha_operateurduprogramme_2.yml @@ -0,0 +1,25 @@ +uuid: de42215d-b319-47c6-b7df-2df7d099e10e +langcode: fr +status: true +dependencies: + content: + - 'block_content:logo_link:bc48e271-75cf-4c3f-a4aa-ecc3c573c060' + module: + - block_content + theme: + - reha +id: reha_operateurduprogramme_2 +theme: reha +region: footer_middle +weight: 0 +provider: null +plugin: 'block_content:bc48e271-75cf-4c3f-a4aa-ecc3c573c060' +settings: + id: 'block_content:bc48e271-75cf-4c3f-a4aa-ecc3c573c060' + label: 'Opérateur du programme' + label_display: visible + provider: block_content + status: true + info: '' + view_mode: full +visibility: { } diff --git a/config/sync/block.block.reha_pieddepage.yml b/config/sync/block.block.reha_pieddepage.yml index e27b161..04c64e8 100644 --- a/config/sync/block.block.reha_pieddepage.yml +++ b/config/sync/block.block.reha_pieddepage.yml @@ -1,6 +1,6 @@ uuid: 2b27b1a3-1ae4-4364-8c92-dd12c41abe70 langcode: fr -status: true +status: false dependencies: config: - system.menu.footer @@ -10,7 +10,7 @@ dependencies: - reha id: reha_pieddepage theme: reha -region: footer +region: header weight: -3 provider: null plugin: 'menu_block:footer' diff --git a/config/sync/block.block.reha_pieddepage_2.yml b/config/sync/block.block.reha_pieddepage_2.yml new file mode 100644 index 0000000..8a1a8b2 --- /dev/null +++ b/config/sync/block.block.reha_pieddepage_2.yml @@ -0,0 +1,31 @@ +uuid: 1684b22f-aecf-40ec-a93a-9371ce6dafe0 +langcode: fr +status: true +dependencies: + config: + - system.menu.footer + module: + - menu_block + theme: + - reha +id: reha_pieddepage_2 +theme: reha +region: footer_left +weight: 0 +provider: null +plugin: 'menu_block:footer' +settings: + id: 'menu_block:footer' + label: 'Pied de page' + label_display: '0' + provider: menu_block + follow: false + follow_parent: child + label_link: false + label_type: block + level: 1 + depth: 0 + expand_all_items: false + parent: 'footer:' + suggestion: footer +visibility: { } diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index a779780..48eecf9 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -96,6 +96,7 @@ module: search_api_db: 0 smart_trim: 0 smtp: 0 + social_media_links: 0 system: 0 taxonomy: 0 telephone: 0 diff --git a/web/sites/development.services.yml b/web/sites/development.services.yml index cc931e1..d2857c6 100644 --- a/web/sites/development.services.yml +++ b/web/sites/development.services.yml @@ -3,56 +3,6 @@ # To activate this feature, follow the instructions at the top of the # 'example.settings.local.php' file, which sits next to this file. parameters: - twig.config: - # Twig debugging: - # - # When debugging is enabled: - # - The markup of each Twig template is surrounded by HTML comments that - # contain theming information, such as template file name suggestions. - # - Note that this debugging markup will cause automated tests that directly - # check rendered HTML to fail. When running automated tests, 'debug' - # should be set to FALSE. - # - The dump() function can be used in Twig templates to output information - # about template variables. - # - Twig templates are automatically recompiled whenever the source code - # changes (see auto_reload below). - # - # For more information about debugging Twig templates, see - # https://www.drupal.org/node/1906392. - # - # Not recommended in production environments - # @default false - debug: true - # Twig auto-reload: - # - # Automatically recompile Twig templates whenever the source code changes. - # If you don't provide a value for auto_reload, it will be determined - # based on the value of debug. - # - # Not recommended in production environments - # @default null - auto_reload: null - # Twig cache: - # - # By default, Twig templates will be compiled and stored in the filesystem - # to increase performance. Disabling the Twig cache will recompile the - # templates from source each time they are used. In most cases the - # auto_reload setting above should be enabled rather than disabling the - # Twig cache. - # - # Not recommended in production environments - # @default true - cache: false - # Cacheability debugging: - # - # Responses with cacheability metadata (CacheableResponseInterface instances) - # get X-Drupal-Cache-Tags and X-Drupal-Cache-Contexts headers. - # - # For more information about debugging cacheable responses, see - # https://www.drupal.org/developing/api/8/response/cacheable-response-interface - # - # Not recommended in production environments - # @default false http.response.debug_cacheability_headers: true services: cache.backend.null: diff --git a/web/themes/custom/reha/reha.info.yml b/web/themes/custom/reha/reha.info.yml index 1ecab93..d001c68 100644 --- a/web/themes/custom/reha/reha.info.yml +++ b/web/themes/custom/reha/reha.info.yml @@ -18,4 +18,8 @@ regions: content: 'Content' sidebar_first: 'Sidebar first' sidebar_second: 'Sidebar second' - footer: 'Footer' + footer_top: 'Footer top' + footer_left: 'Footer left' + footer_middle: 'Footer middle' + footer_right: 'Footer right' + footer_bottom: 'Footer bottom' diff --git a/web/themes/custom/reha/templates/page.html.twig b/web/themes/custom/reha/templates/page.html.twig index 032b724..4b2a08e 100644 --- a/web/themes/custom/reha/templates/page.html.twig +++ b/web/themes/custom/reha/templates/page.html.twig @@ -81,9 +81,15 @@ - {% if page.footer %} + {% if page.footer_top or page.footer_left or page.footer_middle or page.footer_right or page.footer_bottom %} {% endif %}