Skip to content
Permalink
Browse files

fix search halfway

  • Loading branch information
zutrinken committed Jan 16, 2020
1 parent 716f49b commit 6f0d33d5fc9b9ab54d5adaaa3bdcca317972e46e
Showing with 7 additions and 12 deletions.
  1. +1 −1 assets/js/script.js
  2. +3 −8 package-lock.json
  3. +3 −3 src/js/script.js

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more.

@@ -49,21 +49,21 @@ jQuery(function($) {
$(".nav-search").css({
'display': 'block'
});
$("#search-field").ghostHunter({
$('#search-field').ghostHunter({
results: "#results",
result_template: '<article class="post"><div class="inner"><div class="box post-box"><h2 class="post-title"><a href="{{link}}">{{title}}</a></h2><span class="post-meta">On <span class="post-date">{{pubDate}}</span></span></div></div></article>',
info_template: '<div class="blog-header"><div class="inner"><div class="archive archive-search box archive-box"><span class="archive-info"><span class="archive-type">Search</span><span class="archive-count">{{amount}} Posts</span></span><h1 class="archive-title">Results for "<span id="search-term"></span>"</h1></div></div></div>',
displaySearchInfo: true,
includebodysearch: true,
onComplete: function(results) {
if ($("#search-field").prop('value')) {
if ($('#search-field').prop('value')) {
$('#search').show();
$('#default').hide();
} else {
$('#search').hide();
$('#default').show();
}
$('#search-term').text($("#search-field").prop('value'));
$('#search-term').text($('#search-field').prop('value'));
html.removeClass('menu-active');
}
});

0 comments on commit 6f0d33d

Please sign in to comment.
You can’t perform that action at this time.