fix: don't search on empty query string (#140)

* fix: don't search on empty query string

* refactor

Co-authored-by: sigoden <sigoden@gmail.com>
This commit is contained in:
David Politis
2022-11-10 21:02:55 +11:00
committed by GitHub
parent bd07783cde
commit 1a9990f04e
3 changed files with 43 additions and 32 deletions

View File

@@ -37,7 +37,7 @@
<div class="icon">
<svg width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/></svg>
</div>
<input id="search" name="q" type="text" maxlength="128" autocomplete="off" tabindex="1">
<input id="search" name="q" type="text" maxlength="128" autocomplete="off" tabindex="1" required>
<input type="submit" hidden />
</form>
</div>