2021-04-13 09:04:16 -05:00
|
|
|
<div class="search">
|
2021-07-07 07:33:45 -05:00
|
|
|
<input id="searchbar" type="text" placeholder='{{ i18n "searchbarTxt" }}' />
|
2021-04-13 09:04:16 -05:00
|
|
|
<a class="nerdlink" onclick="newSearch();"></a>
|
|
|
|
</div>
|
|
|
|
<script>
|
|
|
|
function newSearch() {
|
|
|
|
let term = searchbar.value.trim();
|
|
|
|
if (!term) return;
|
|
|
|
location.href = `/search?q=${term}`;
|
|
|
|
}
|
|
|
|
searchbar.onkeyup = (ev) => {if (ev.keyCode == 13) newSearch()};
|
|
|
|
</script>
|