Skip to content

Commit

Permalink
modify google search
Browse files Browse the repository at this point in the history
  • Loading branch information
EZLippi committed Sep 4, 2015
1 parent 9b364a0 commit ba8cd38
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
1 change: 1 addition & 0 deletions _config.yml
Expand Up @@ -4,6 +4,7 @@ exclude: [".rvmrc", ".rbenv-version", "README.md", "Rakefile", "changelog.md", "
markdown: kramdown markdown: kramdown
highlights: pygments highlights: pygments
url: url:
cdn_url: 7u2t01.com1.z0.glb.clouddn.com
lsi: false lsi: false
safe: true safe: true
timezone: Asia/Shanghai timezone: Asia/Shanghai
Expand Down
28 changes: 15 additions & 13 deletions _includes/search.html
Expand Up @@ -2,23 +2,25 @@
<div class="categories-list-header"> <div class="categories-list-header">
站内搜索 站内搜索
</div> </div>
<form action="https://google3.azurewebsites.net/search" method="get"> <script>
<div class="input-group"> (function() {
<input type="text" name="q" class="form-control"> var cx = '015104026998727815951:bza74imjgds';
<input type="hidden" name="ie" value="UTF-8" /> var gcse = document.createElement('script');
<input type="hidden" name="sitesearch" value="{{ site.domain }}" /> gcse.type = 'text/javascript';
<span class="input-group-btn"> gcse.async = true;
<button class="btn btn-default" type="submit"> gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
<span class="glyphicon glyphicon-search"> '//cse.google.com/cse.js?cx=' + cx;
</span> var s = document.getElementsByTagName('script')[0];
</button> s.parentNode.insertBefore(gcse, s);
</span> })();
</div> </script>
</form> <gcse:search></gcse:search>

</div> </div>













0 comments on commit ba8cd38

Please sign in to comment.