From 51898c5571c9146c1cbdc270fef3c5912923372f Mon Sep 17 00:00:00 2001 From: arturu Date: Sun, 28 Apr 2024 22:51:56 +0200 Subject: [PATCH] release(2.1.8): show title in modal search diagraphe/issues#22 --- .../layout/header/_partial.header.html.twig | 2 + ...arch--views-exposed-filter-block.html.twig | 55 +++++++++++++++++++ .../search/form-element--name--ftxt.html.twig | 2 +- .../views/search/input--name--ftxt.html.twig | 2 +- 4 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 templates/views/search/block--header-center-search--views-exposed-filter-block.html.twig diff --git a/templates/layout/header/_partial.header.html.twig b/templates/layout/header/_partial.header.html.twig index 06633705..9bf2e2cc 100644 --- a/templates/layout/header/_partial.header.html.twig +++ b/templates/layout/header/_partial.header.html.twig @@ -70,6 +70,8 @@ modal_size: search_modal_size ?: 'fullscreen', dismissibile: false, } %} + {% block modalClose %}{% endblock %} + {% block modalBody %}
{{ page.header_center_search }} diff --git a/templates/views/search/block--header-center-search--views-exposed-filter-block.html.twig b/templates/views/search/block--header-center-search--views-exposed-filter-block.html.twig new file mode 100644 index 00000000..1cd00a14 --- /dev/null +++ b/templates/views/search/block--header-center-search--views-exposed-filter-block.html.twig @@ -0,0 +1,55 @@ +{# +/** + * @file + * Default theme implementation to display a block. + * + * Available variables: + * - plugin_id: The ID of the block implementation. + * - label: The configured label of the block if visible. + * - configuration: A list of the block's configuration values. + * - label: The configured label for the block. + * - label_display: The display settings for the label. + * - provider: The module or other provider that provided this block plugin. + * - Block plugin specific settings will also be stored here. + * - content: The content of this block. + * - attributes: array of HTML attributes populated by modules, intended to + * be added to the main container tag of this template. + * - id: A valid HTML ID and guaranteed unique. + * - title_attributes: Same as attributes, except applied to the main title + * tag that appears in the template. + * - title_prefix: Additional output populated by modules, intended to be + * displayed in front of the main title tag that appears in the template. + * - title_suffix: Additional output populated by modules, intended to be + * displayed after the main title tag that appears in the template. + * + * @see template_preprocess_block() + * + * @ingroup themeable + */ +#} +{% apply spaceless %} + {% set id_block = 'it-' ~ attributes.id %} + {% set classes = [ + 'block', + 'block-' ~ configuration.provider|clean_class, + 'block-' ~ plugin_id|clean_class, + ] %} + + + {{ title_prefix }} + {% if label %} + + {{ label }} + + + {% endif %} + {{ title_suffix }} + {% block content %} + {{ content }} + {% endblock %} +
+{% endapply %} diff --git a/templates/views/search/form-element--name--ftxt.html.twig b/templates/views/search/form-element--name--ftxt.html.twig index 22201e46..51cb586c 100644 --- a/templates/views/search/form-element--name--ftxt.html.twig +++ b/templates/views/search/form-element--name--ftxt.html.twig @@ -79,7 +79,7 @@ {% include '@bi-bcl/icon/icon.html.twig' with { name: 'icon-search', - size: 'xxl', + size: 'lg', color: 'bluelectric', icon_classes: ['svg-search'] } %} diff --git a/templates/views/search/input--name--ftxt.html.twig b/templates/views/search/input--name--ftxt.html.twig index 41e3707a..4ed3588a 100644 --- a/templates/views/search/input--name--ftxt.html.twig +++ b/templates/views/search/input--name--ftxt.html.twig @@ -1,5 +1,5 @@ {% set attributes = attributes - .addClass(['fs-1', 'py-5', 'px-3']) + .addClass(['fs-2', 'py-4', 'px-3', 'mt-1']) .setAttribute('data-element', 'search-modal-input') .setAttribute('placeholder', 'Cerca servizi, notizie o documenti') %}