Permalink
Browse files

Use Google Search instead of GhostHunter

  • Loading branch information...
1 parent 9998f80 commit 94e060424d1e478eb19cff40671c7cc7f2e1ce8c @Kikobeats committed Jun 13, 2016
Showing with 4 additions and 27 deletions.
  1. +3 −0 assets/js/src/main.coffee
  2. +0 −26 assets/js/src/search.coffee
  3. +1 −1 partials/search.hbs
@@ -24,3 +24,6 @@ $ ->
s = document.createElement 'script'
s.setAttribute 'src','https://nthitz.github.io/turndownforwhatjs/tdfw.js'
document.body.appendChild s
+
+ $('#search-input').keyup (e) ->
+ $('#search-form').attr('action', Uno.search.url + '+' + encodeURIComponent(e.target.value))
@@ -1,26 +0,0 @@
-'use strict'
-
-$ ->
-
- showSearch = ->
- $(".content").hide()
- $('#search-results').addClass('active')
-
- hideSearch = ->
- $(".content").show()
- $('#search-results').removeClass('active')
-
- $("#search-field").ghostHunter
- results : "#search-results"
- zeroResultsInfo : false
- onKeyUp : true
- displaySearchInfo : true
- result_template :
- """
- <a class="result" href='{{link}}'>
- <h2>{{title}}</h2>
- <h4>{{pubDate}}</h4>
- </a>
- """
- onComplete : (query) ->
- if query.length > 0 then showSearch() else hideSearch()
View
@@ -1,6 +1,6 @@
<section class="icon icon-search" id="search-container">
<hr class="divider short" />
- <form id="search-form">
+ <form target="blank" id="search-form" action="https://www.google.com/#q=site:{{@blog.url}}">
<input type="text" name="search" placeholder="git, css, javascript,..." id="search-field" />
</form>
</section>

0 comments on commit 94e0604

Please sign in to comment.