hacks-guide-minimal-mistake.../_includes/search/search_form.html
user414 3a817c2bdb Implement feature #1652 google custom search support. (#1667)
Implement feature #1652 google custom search support. For now we only support the look and feel "results only" and the engine must be set to use that layout. Add a google section to the search providers and search_form and search layout.

Close #1652
2018-05-15 14:42:10 -04:00

18 lines
947 B
HTML

<div class="search-content__inner-wrap">
{%- assign search_provider = site.search_provider | default: "lunr" -%}
{%- case search_provider -%}
{%- when "lunr" -%}
<input type="text" id="search" class="search-input" tabindex="-1" placeholder="{{ site.data.ui-text[site.locale].search_placeholder_text | default: 'Enter your search term...' }}" />
<div id="results" class="results"></div>
{%- when "google" -%}
<form onsubmit="return executeQuery();" id="cse-search-box-form-id">
<input type="text" id="cse-search-input-box-id" class="search-input" tabindex="-1" placeholder="{{ site.data.ui-text[site.locale].search_placeholder_text | default: 'Enter your search term...' }}" />
</form>
<div id="results" class="results">
<gcse:searchresults-only></gcse:searchresults-only>
</div>
{%- when "algolia" -%}
<div class="search-searchbar"></div>
<div class="search-hits"></div>
{%- endcase -%}
</div>