From 137647e7a18d0158218e75c98ece31f9b6d8bcc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?benjamin=20melan=C3=A7on?= Date: Tue, 18 Dec 2018 08:03:09 -0500 Subject: [PATCH] Add template for header search separate from navbar search It didn't look as good bouncing up and down in the middle of the page. Also, style it to be a bit longer. --- agaric/sass/agaric/_component.titlebar.scss | 4 +++ .../block/block--header-search.html.twig | 32 +++++++++++++++++++ agaric/templates/layout/page.html.twig | 3 +- 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 agaric/templates/block/block--header-search.html.twig diff --git a/agaric/sass/agaric/_component.titlebar.scss b/agaric/sass/agaric/_component.titlebar.scss index 355393f..638229f 100644 --- a/agaric/sass/agaric/_component.titlebar.scss +++ b/agaric/sass/agaric/_component.titlebar.scss @@ -51,3 +51,7 @@ .titlebar + .byline { margin-top: 1.5rem; } + +.header-search .form-text.input { + width: 25em; +} diff --git a/agaric/templates/block/block--header-search.html.twig b/agaric/templates/block/block--header-search.html.twig new file mode 100644 index 0000000..da3b6aa --- /dev/null +++ b/agaric/templates/block/block--header-search.html.twig @@ -0,0 +1,32 @@ +{# +/** + * @file + * Theme override 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() + */ +#} + + {% block content %} + {{ content }} + {% endblock %} + diff --git a/agaric/templates/layout/page.html.twig b/agaric/templates/layout/page.html.twig index 5b12d55..2fee38f 100644 --- a/agaric/templates/layout/page.html.twig +++ b/agaric/templates/layout/page.html.twig @@ -61,9 +61,10 @@ {% else %}
{{ page.header }} - {% if page.secondary_menu %} + {% if page.secondary_menu or page.header_search %} {% endif %}