grav-theme-libretic/templates/partials/simplesearch_searchbox.html.twig
Olivier Navas 17bb11854e - Several modifications of template files for Libretic's web site
- Addition of prerequisites files for scss modifications
- Update of Fontawesome font
- Update of NovecentoSans font for latin characters
- Integration of Pacifico font in the theme instead of dynamically downloading from some google web site
- Removal of some unuseful font files
2022-05-14 19:43:00 +02:00

13 lines
548 B
Twig

<input type="text" placeholder="Rechercher..." value="{{ query }}" data-searchsidebar-input="{{ base_url_relative }}{{ config.plugins.simplesearch.route}}/query" />
<script>
jQuery(document).ready(function($){
var input = $('[data-searchsidebar-input]');
input.on('keypress', function(event) {
if (event.which == 13 && input.val().length > 3) {
event.preventDefault();
window.location.href = input.data('searchsidebar-input') + '{{ config.system.param_sep }}' + input.val();
}
});
});
</script>