Skip to content

Commit b3c82ed

Browse files
committed
Activate the google search function
1 parent 28e8473 commit b3c82ed

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

layouts/partials/content-navigation.html

+4-2
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424

2525

2626
<div class="content-nav__fixed-top">
27-
<form class="search">
27+
<form id="searchbox_011972015458788978446:zgdcy4fa-o0" class="search" action="">
2828

2929
<span class="block float-left search__icon-container docs-icon--search">|</span>
3030

3131
<span class="block overflow">
32-
<input class="search__input" id="primary-search" type="search" name="search" placeholder="Search">
32+
<input class="search__input" id="main-search" type="search" name="q" placeholder="Search">
3333
</span>
3434

3535
</form>
@@ -210,3 +210,5 @@
210210

211211

212212
</nav>
213+
214+
{{ partial "google-search.html" . }}

layouts/partials/google-search.html

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<script>
2+
(function() {
3+
var cx = '011972015458788978446:zgdcy4fa-o0';
4+
var gcse = document.createElement('script');
5+
gcse.type = 'text/javascript';
6+
gcse.async = true;
7+
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
8+
'//cse.google.com/cse.js?cx=' + cx;
9+
var s = document.getElementsByTagName('script')[0];
10+
s.parentNode.insertBefore(gcse, s);
11+
})();
12+
</script>
13+
<div style="width:0px;overflow:hidden;height:0px;">
14+
<gcse:search></gcse:search>
15+
</div>
16+

0 commit comments

Comments
 (0)