Skip to content

Commit

Permalink
add search box to feed list page
Browse files Browse the repository at this point in the history
  • Loading branch information
qinwf committed Apr 18, 2020
1 parent bf52932 commit 17f2266
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions feedlist.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,20 @@
{% raw %}

<div id="main-post" class="post">
<form id="search-form-inline" target="_blank" action="/search.html" method="get">
<label for="search-box-inline"></label>
<input type="text" class="github-search-box" id="search-box-inline" name="query" placeholder="search">
</form>

<script>
document.getElementById('search-form-inline').addEventListener('submit', function(e){
e.preventDefault();
var value_search = document.getElementById('search-box-inline').value;
setTimeout(function(){
document.location = "https://github.com/rweekly/rweekly.org/search?utf8=%E2%9C%93&q=" + encodeURIComponent(value_search) + "+extension%3Ar+extension%3Amd&type=Code";
}, 250);
});
</script>

<div id="latest-app" class="inner-app-hide">
<h3>R Weekly Live Feed List</h3>
Expand Down

0 comments on commit 17f2266

Please sign in to comment.