From e5bbde2a54956dd041eeef07aef112bf1989b6ea Mon Sep 17 00:00:00 2001 From: 22Alexandra Date: Thu, 2 Jun 2022 10:11:33 +0300 Subject: [PATCH] EWPP-2098: Remove usage of ecl_branding in site header templates. --- package.json | 3 +-- templates/blocks/block--oe-search.html.twig | 4 ++-- .../blocks/block--system-branding-block.html.twig | 8 ++++---- .../language-list-selector.html.twig | 12 +++++------- templates/form/form--oe-search-search-form.html.twig | 2 +- .../page--ecl-branding--standardised.html.twig | 8 ++++---- templates/layout/page.html.twig | 10 +++++----- templates/navigation/links--language-block.html.twig | 3 +-- 8 files changed, 23 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index 01b5bf2f4..3567ea388 100644 --- a/package.json +++ b/package.json @@ -50,8 +50,7 @@ "@ecl/twig-component-pagination": "3.3.1", "@ecl/twig-component-radio": "3.3.1", "@ecl/twig-component-search-form": "3.3.1", - "@ecl/twig-component-site-header-core": "3.3.1", - "@ecl/twig-component-site-header-standardised": "3.3.1", + "@ecl/twig-component-site-header": "3.3.1", "@ecl/twig-component-skip-link": "3.3.1", "@ecl/twig-component-social-media-follow": "3.3.1", "@ecl/twig-component-social-media-share": "3.3.1", diff --git a/templates/blocks/block--oe-search.html.twig b/templates/blocks/block--oe-search.html.twig index fcc46a9d3..202811ef9 100644 --- a/templates/blocks/block--oe-search.html.twig +++ b/templates/blocks/block--oe-search.html.twig @@ -6,9 +6,9 @@ * @see ./core/themes/stable/templates/block/block.html.twig */ #} -
+
@@ -16,20 +16,20 @@ {{ site_logo_alt }} {{ site_logo_alt }} {% else %} {{ site_logo_alt }} {% endif %} diff --git a/templates/compositions/ec-component-language-list/language-list-selector.html.twig b/templates/compositions/ec-component-language-list/language-list-selector.html.twig index 773cafa57..1f4095b75 100644 --- a/templates/compositions/ec-component-language-list/language-list-selector.html.twig +++ b/templates/compositions/ec-component-language-list/language-list-selector.html.twig @@ -29,8 +29,7 @@ "value" (string) (default: '') }, ... - ] - - "ecl_branding" (string) (default: 'core'): "core" or "standardised" template. + ]. #} {# Internal properties #} @@ -39,7 +38,6 @@ {% set _code = code|default('') %} {% set _path = path|default('') %} {% set _icon_path = icon_path|default('') %} -{% set _ecl_branding = ecl_branding|default('core') %} {% set _css_class = 'ecl-site-header__selector' %} {% set _extra_attributes = [] %} @@ -66,22 +64,22 @@ {% endif %} diff --git a/templates/form/form--oe-search-search-form.html.twig b/templates/form/form--oe-search-search-form.html.twig index f06394088..6e9149d20 100644 --- a/templates/form/form--oe-search-search-form.html.twig +++ b/templates/form/form--oe-search-search-form.html.twig @@ -30,7 +30,7 @@ extra_classes: 'ecl-search-form__button' } %} {% set extra_attributes = attributes|to_ecl_attributes|merge([{'name': 'data-ecl-search-form'}]) %} -{% set extra_classes = 'ecl-site-header-' ~ ecl_branding ~ '__search' %} +{% set extra_classes = 'ecl-site-header__search' %} {% extends '@ecl-twig/search-form' %} {% block extra_form_elements %} {{ element.form_build_id }} diff --git a/templates/layout/page--ecl-branding--standardised.html.twig b/templates/layout/page--ecl-branding--standardised.html.twig index b532479a6..744a27719 100644 --- a/templates/layout/page--ecl-branding--standardised.html.twig +++ b/templates/layout/page--ecl-branding--standardised.html.twig @@ -11,16 +11,16 @@ {% extends "page.html.twig" %} {% block site_header_container %} -
+
{{ parent() }}
{% endblock %} {% block navigation %} -
+
{% if site_name is not empty %} -
{{ site_name }}
+
{{ site_name }}
{% endif %} {% if cta_link is not empty %} {% include '@ecl-twig/link' with { @@ -31,7 +31,7 @@ icon_position: 'after' }, icon: get_link_icon(cta_link.path), - extra_classes: 'ecl-standardised__cta', + extra_classes: 'ecl-site-header__cta', } only %} {% endif %}
diff --git a/templates/layout/page.html.twig b/templates/layout/page.html.twig index 1cc372ab5..94e7c4c37 100644 --- a/templates/layout/page.html.twig +++ b/templates/layout/page.html.twig @@ -9,16 +9,16 @@ {% block site_header %} {% set has_menu = page.navigation|render|striptags|trim is not empty %}
{{ page.site_top_bar }} {% block site_header_container %} -
-
+
+
{{ page.site_header }} -
+
{{ page.site_header_secondary }}
diff --git a/templates/navigation/links--language-block.html.twig b/templates/navigation/links--language-block.html.twig index 886570ea7..1d83730a4 100644 --- a/templates/navigation/links--language-block.html.twig +++ b/templates/navigation/links--language-block.html.twig @@ -14,7 +14,6 @@ icon_path: ecl_icon_path, items: languages, eu_languages: eu_languages, - non_eu_languages: non_eu_languages, - ecl_branding: ecl_branding + non_eu_languages: non_eu_languages } only %} {%- endif %}