diff --git a/composer.json b/composer.json index 016460e1bf0e0a8eece3c85a5cd42d20106ee3e5..f70e13b97255e73450469b2e3429092d66adbe71 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ "php": ">=7.3", "cweagans/composer-patches": "^1.7", "drupal/core": "^8.9 || ^9.1", - "openeuropa/oe_bootstrap_theme": "^1.0.0-alpha6" + "openeuropa/oe_bootstrap_theme": "0.1.202202031130" }, "require-dev": { "composer/installers": "^1.11", diff --git a/modules/oe_whitelabel_search/src/Form/SearchForm.php b/modules/oe_whitelabel_search/src/Form/SearchForm.php index 34a59a04f270813ff18b85f0b6c65993c0f1aa1a..ed7aca9bcc4679bf691ec1f16907e92e9d916e06 100644 --- a/modules/oe_whitelabel_search/src/Form/SearchForm.php +++ b/modules/oe_whitelabel_search/src/Form/SearchForm.php @@ -81,10 +81,7 @@ class SearchForm extends FormBase { '#id' => 'button', '#variant' => 'light', '#fields' => [ - 'icon' => [ - 'name' => 'search', - 'size' => 'xs', - ], + 'icon' => 'search', 'settings' => [ 'type' => 'submit', ], diff --git a/templates/overrides/navigation/block--oe-authentication-login_block.html.twig b/templates/overrides/navigation/block--oe-authentication-login_block.html.twig index 6abbfa74c3b1a74ae871a0c3a2b17ce151736ef7..f32cf98384132c836b6c72b282596f65d77df6a6 100644 --- a/templates/overrides/navigation/block--oe-authentication-login_block.html.twig +++ b/templates/overrides/navigation/block--oe-authentication-login_block.html.twig @@ -21,9 +21,10 @@ path: content['#url']|render, icon: { name: 'person-fill', - size: 'xs' + size: 'xs', }, icon_position: 'before', + standalone: true, attributes: extra_attributes }) }} </li> diff --git a/templates/overrides/navigation/links--language-block.html.twig b/templates/overrides/navigation/links--language-block.html.twig index 9cf491ea2f1fedc8c5972a84aa826158c4284296..c236d89e6e30ff01457212b4cfdd6c85d9c7a1de 100644 --- a/templates/overrides/navigation/links--language-block.html.twig +++ b/templates/overrides/navigation/links--language-block.html.twig @@ -37,9 +37,10 @@ path: _language.link.href, icon: { name: 'chat-left-dots-fill', - size: 'xs' + size: 'xs', }, icon_position: 'before', + standalone: true, attributes: extra_attributes }) }} </li> diff --git a/templates/overrides/search/block--facets-form.html.twig b/templates/overrides/search/block--facets-form.html.twig index 749b340ad09473904d60aa997286d17c12eb2a40..3729c6255aff361caa5880102f6b798c1feb8004 100644 --- a/templates/overrides/search/block--facets-form.html.twig +++ b/templates/overrides/search/block--facets-form.html.twig @@ -32,38 +32,34 @@ {% if content.actions.reset['#type'] == 'link' %} {% set extra_attributes = create_attribute() %} - {% set reset = pattern('button', { + {% set reset = pattern('link', { 'label': content.actions['reset']['#title'], - 'url': content.actions['reset']['#url'].toString(), - 'style': 'secondary', - 'attributes': extra_attributes.addClass('ms-2') + 'path': content.actions['reset']['#url'].toString(), + 'variant': 'secondary', + 'attributes': extra_attributes.addClass(['ms-2', 'btn', 'btn-secondary']) }) %} {% set actions = content.actions %} {% set actions = actions|merge({('reset'): reset}) %} {% set content = content|merge({('actions'): actions}) %} {% endif %} +{% set button_attributes = create_attribute().addClass(['d-lg-none', 'w-100', 'mb-4']) %} +{% set toogle_button = { + 'label': label, + 'variant': 'light', + 'size': 'lg', + 'icon': 'filter', + 'icon_position': 'before', + 'attributes': button_attributes +} %} {% block content %} {{ pattern('offcanvas', { - 'title': { - 'label': label, - 'heading': 4, - 'extra_classes': "mb-lg-4", - }, - 'attributes': attributes.addClass('bcl-offcanvas'), - 'offcanvas_id': 'bcl-offcanvas', + 'variant': 'search', + 'title': label, 'body': content, 'placement': 'start', - 'with_body_scroll': false, - 'with_backdrop': true, - 'extra_classes_body': 'bcl-offcanvas p-lg-0', - 'extra_classes_close': "d-lg-none", - 'extra_classes_header': "p-lg-0", - 'with_trigger': true, - 'toggle_button_label': label, - 'icon_position': 'before', - 'icon': { - 'name': 'filter', - }, + 'body_scroll': false, + 'backdrop': true, + 'toggle': toogle_button, }) }} {% endblock %} diff --git a/templates/overrides/search/facets-result-item.html.twig b/templates/overrides/search/facets-result-item.html.twig index 1ee3de657de9ae5d7af08478ff81a8116e6ae037..06be11a425b1b9439a42d4effc30416a2ca699d7 100644 --- a/templates/overrides/search/facets-result-item.html.twig +++ b/templates/overrides/search/facets-result-item.html.twig @@ -20,8 +20,6 @@ {{ pattern('badge', { 'background': 'light', 'label': value, - 'assistive_text': assistive_text, 'dismissible': true, - 'icons_path': bcl_icon_path, 'attributes': attributes }) }} diff --git a/templates/patterns/header/pattern-header.html.twig b/templates/patterns/header/pattern-header.html.twig index d30ade52406b6a0abb80ce3a360ee07aebf95b4b..8562e3edfa8de7190b7eae474c0e86bdf3363b4c 100644 --- a/templates/patterns/header/pattern-header.html.twig +++ b/templates/patterns/header/pattern-header.html.twig @@ -4,17 +4,19 @@ * Template for header pattern. */ #} -{% - set _nav_attributes = create_attribute().addClass([ - 'w-100', - 'shadow-sm', - 'navbar', - 'navbar-expand-lg', - 'navbar-light', - ]) -%} +{% set _nav_attributes = create_attribute().addClass([ + 'w-100', + 'shadow-sm', + 'navbar', + 'navbar-expand-lg', + 'navbar-light', +]) %} {% set navbar_attributes = create_attribute().addClass(['bcl-header__navbar']) %} {% set _header_attributes = create_attribute() %} +{% set _project_attributes = create_attribute().addClass([ + 'bcl-header__project', + bcl_header_style == 'light' ? bcl_header_style, +]) %} {% block header %} <header {{ _header_attributes }}> {% endblock %} @@ -26,22 +28,16 @@ </ul> </div> </nav> - {% - set _project_attributes = create_attribute().addClass([ - 'bcl-header__project', - bcl_header_style == 'light' ? bcl_header_style, - ]) - %} <div {{ _project_attributes }}> <div class="container"> {{ header_top }} </div> </div> {{ pattern('navbar', { - navbar_left: header_left, - navbar_right: header_right, - color_set: 'dark', - collapse_id: 'navbarNavDropdown', + navigation: header_left, + right: header_right, + color_scheme: 'dark', + background: false, attributes: navbar_attributes, }) }} <div class="container">