Skip to content

Commit

Permalink
#591, hide search field if JS is not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-shpak committed May 18, 2024
1 parent ecbe879 commit 90eab4a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion layouts/partials/docs/search.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{{ if default true .Site.Params.BookSearch }}
<div class="book-search">
<div class="book-search hidden">
<input type="text" id="book-search-input" placeholder="{{ i18n "Search" }}" aria-label="{{ i18n "Search" }}" maxlength="64" data-hotkeys="s/" />
<div class="book-search-spinner hidden"></div>
<ul id="book-search-results"></ul>
</div>
<script>document.querySelector(".book-search").classList.remove("hidden")</script>
{{ end }}

0 comments on commit 90eab4a

Please sign in to comment.