Add autofocus property to search widget

This commit is contained in:
Svilen Markov
2024-07-15 16:30:12 +01:00
parent 9bda88edbd
commit 5a62a8afe9
3 changed files with 6 additions and 1 deletions

View File

@@ -16,7 +16,7 @@
</svg>
</div>
<input class="search-input" type="text" placeholder="Type here to search…" autocomplete="off">
<input class="search-input" type="text" placeholder="Type here to search…" autocomplete="off"{{ if .Autofocus }} autofocus{{ end }}>
<div class="search-bang"></div>
<kbd class="hide-on-mobile" title="Press [S] to focus the search input">S</kbd>