Merge branch 'sidebar' into live

* sidebar:
  simplistic qsearch support
  reveal sidebar when clicking the search icon
This commit is contained in:
Andreas Gohr 2017-02-21 15:22:00 +01:00
commit d8b607a333
3 changed files with 20 additions and 1 deletions

View file

@ -94,6 +94,12 @@
}
}
}
#qsearch__out {
left: auto;
top: auto;
width: 100%;
}
}
.wide-content {
.search.main-sidebar {

View file

@ -135,10 +135,23 @@ jQuery(function () {
});
};
/**
* Show sidebar when accessing the search
*/
const initSearchToggling = function () {
jQuery('.toggleSearch').find('a').click(function (e) {
setDefaultContent();
e.preventDefault();
jQuery('#qsearch__in').focus();
});
};
// main
initContentNav();
initSidebarToggling();
initMenuHandling();
initContentMinHeight();
initSearchToggling();
});

View file

@ -3,4 +3,4 @@
echo '<h6 class="sr-only" role="heading" aria-level="2">'.tpl_getLang('head_quick_search').'</h6>'; ?>
<p class="toggleSearch"><a href="#qsearch__out"><span class="prefix">Zur Suche springen</span></a></p>
<?php tpl_searchform(); ?>
<?php tpl_searchform(true, false); ?>