From 4e9e2b25e12cf346c8553a42f012644a1fa8d16a Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Thu, 11 May 2023 17:17:16 +0300 Subject: [PATCH] [Library & openaire-theme & Explore | explore-redesign]: Added search form in menu (navbar) in landing pages. 1. search.less: Added css for modifier .small-vertical for .input-wrapper of . 2. layout.service.ts: Added hasMenuSearchBarSubject: BehaviorSubject = new BehaviorSubject(false), parsing and getter/setter methods. 3. navigationBar.module.ts: Imported SearchInputModule. 4. navigationBar.component.ts: a. Added searchMode: boolean = false; and hasSearchBar: boolean = false; (and other helpful fields) b. Subscribe to queryParams to hide search bar and reset keyword | Subscribe to layoutService.hasMenuSearchBar to check if search should be included in navbar or not. c. Added methods "openSearch()" to show the search form and "goTo()" to trigger the search action and navigate to the search page. 5. navigationBar.component.html: Added
and search-icon button to show search bar | Added checks if searchMode is enabled (search form visible) or not. 6. app-routing.module.ts: In routes for landing pages added in data: hasMenuSearchBar: true. --- less/search.less | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/less/search.less b/less/search.less index 4a29f67..e514a3f 100644 --- a/less/search.less +++ b/less/search.less @@ -116,6 +116,14 @@ } } } + + &.small-vertical { + --search-input-icon-padding-vertical: 10px; + + & .search { + --input-padding-vertical: 10px; + } + } } .hook-inverse-misc() {