Add 'jakstys.lt/themes/default/' from commit '641a854a0a705a5ddbb3badeb2bc23cc079f9de6'
git-subtree-dir: jakstys.lt/themes/default git-subtree-mainline: b82ef4c7a5626048be31904c02f41567b158f043 git-subtree-split: 641a854a0a705a5ddbb3badeb2bc23cc079f9de6
This commit is contained in:
21
themes/default/layouts/partials/search.html
Normal file
21
themes/default/layouts/partials/search.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<div class="search">
|
||||
<script>
|
||||
function check_search() {
|
||||
var s = document.getElementById('_display_keyword').value;
|
||||
s = s.replace(/(^\s*)|(\s*$)/g, '');
|
||||
if (s == '' || s == undefined || s == null) {
|
||||
document.getElementById('_display_keyword').focus();
|
||||
return false;
|
||||
}
|
||||
document.getElementById('{{ .key }}').value = s + " site:{{ site.BaseURL }}";
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
<form class="search" action="{{ .url }}" target="_blank" onsubmit="return check_search()">
|
||||
<input id="_display_keyword" type="text" placeholder="Search.." name="keyword">
|
||||
<input id="{{ .key }}" type="hidden" name="{{ .key }}">
|
||||
<button type="submit"><svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" style="width:20px;height:20px;color:#333">
|
||||
<path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path>
|
||||
</svg></button>
|
||||
</form>
|
||||
</div>
|
||||
Reference in New Issue
Block a user