-
Notifications
You must be signed in to change notification settings - Fork 732
/
search.html
38 lines (38 loc) · 2.14 KB
/
search.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!--/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Copyright 2017 Adobe
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/-->
<section data-sly-use.search="com.adobe.cq.wcm.core.components.models.Search"
id="${search.id}"
class="cmp-search"
role="search"
data-cmp-is="search"
data-cmp-min-length="${search.searchTermMinimumLength}"
data-cmp-results-size="${search.resultsSize}">
<form class="cmp-search__form" data-cmp-hook-search="form"
method="get" action="${currentPage.path @ addSelectors=['searchresults'], extension='json', suffix = search.relativePath}"
autocomplete="off">
<div class="cmp-search__field">
<i class="cmp-search__icon" data-cmp-hook-search="icon"></i>
<span class="cmp-search__loading-indicator" data-cmp-hook-search="loadingIndicator"></span>
<input class="cmp-search__input" data-cmp-hook-search="input" type="text" name="fulltext" placeholder="${'Search' @ i18n}"
role="combobox" aria-autocomplete="list" aria-haspopup="true" aria-invalid="false" aria-expanded="false">
<button class="cmp-search__clear" data-cmp-hook-search="clear" aria-label="${'Clear' @ i18n}">
<i class="cmp-search__clear-icon"></i>
</button>
</div>
</form>
<div class="cmp-search__results" aria-label="${'Search results' @ i18n}" data-cmp-hook-search="results" role="listbox" aria-multiselectable="false"></div>
<sly data-sly-include="itemTemplate.html"/>
</section>