mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
Fix search (#16522)
This commit is contained in:
parent
bbc7312a7e
commit
99a444cdb5
@ -14,3 +14,18 @@ body_id: not_found
|
|||||||
<a href='#' class='search404-close'><i class="icon-remove-sign"></i></a>
|
<a href='#' class='search404-close'><i class="icon-remove-sign"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
docsearch({
|
||||||
|
apiKey: '{{ site.algolia.api_key }}',
|
||||||
|
indexName: 'home-assistant',
|
||||||
|
inputSelector: '#search404',
|
||||||
|
debug: false // Set debug to true if you want to inspect the dropdown
|
||||||
|
});
|
||||||
|
|
||||||
|
document.querySelector('.search404-close').addEventListener('click', function(ev) {
|
||||||
|
ev.preventDefault();
|
||||||
|
document.querySelector('#search404').value = "";
|
||||||
|
});
|
||||||
|
</script>
|
@ -16,17 +16,7 @@ docsearch({
|
|||||||
inputSelector: '#search',
|
inputSelector: '#search',
|
||||||
debug: false // Set debug to true if you want to inspect the dropdown
|
debug: false // Set debug to true if you want to inspect the dropdown
|
||||||
});
|
});
|
||||||
docsearch({
|
|
||||||
apiKey: '{{ site.algolia.api_key }}',
|
|
||||||
indexName: 'home-assistant',
|
|
||||||
inputSelector: '#search404',
|
|
||||||
debug: false // Set debug to true if you want to inspect the dropdown
|
|
||||||
});
|
|
||||||
|
|
||||||
document.querySelector('.search404-close').addEventListener('click', function(ev) {
|
|
||||||
ev.preventDefault();
|
|
||||||
document.querySelector('#search404').value = "";
|
|
||||||
});
|
|
||||||
document.querySelector('.search .close').addEventListener('click', function(ev) {
|
document.querySelector('.search .close').addEventListener('click', function(ev) {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
document.querySelector('.search-container').style.display = 'none';
|
document.querySelector('.search-container').style.display = 'none';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user