Skip to content

Commit

Permalink
feat: CMD + K to search - New Design (#909)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anush008 authored and generall committed May 21, 2024
1 parent 51a3efc commit 9983988
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions qdrant-landing/themes/qdrant-2024/layouts/partials/js.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,17 @@
});
</script>
{{ end }}

{{ if or (eq .Section "blog") (eq .Section "documentation") }}
<script>
document.addEventListener('keydown', function(event) {
if ((event.metaKey || event.ctrlKey) && event.key === 'k') {
event.preventDefault();

let searchButton = document.querySelector('[data-target="#searchModal"]');

if (searchButton) searchButton?.click();
}
});
</script>
{{ end }}

0 comments on commit 9983988

Please sign in to comment.