-
Notifications
You must be signed in to change notification settings - Fork 24
/
search.hbs
executable file
·40 lines (34 loc) · 1.28 KB
/
search.hbs
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
39
40
{{> head}}
<main class="main {{#checkIfNone @config.custom.sidebar}}main--full{{/checkIfNone}}">
<div class="page-header search">
<h1 class="page-header__title">
{{ translate 'search.title' }}
</h1>
<p class="page-header__desc">
{{ translate 'search.description' }}
</p>
</div>{{!-- .page-header --}}
<form action="{{@website.searchUrl}}" class="search__form">
<input
type="search"
name="{{@config.custom.searchParam}}"
placeholder="{{ translate 'search.placeholder' }}"
class="search__input"/>
</form>
<script>
(function () {
var cx = '{{@config.custom.searchId}}';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:searchresults-only></gcse:searchresults-only>
</main>
{{#if @config.custom.sidebar}}
{{> sidebar}}
{{/if}}
{{> footer}}