fix: use a search icon instead of text

This commit is contained in:
thansk 2024-05-20 11:49:56 +00:00 committed by GitHub
parent 9cd2e93a2e
commit 5abafb8296
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View file

@ -321,6 +321,9 @@ input[type="search"]::-webkit-search-cancel-button {
border: 0;
background: none;
text-transform: uppercase;
display: grid;
place-items: center;
width: 1.5em;
}
.searchbar #searchbutton:hover {

View file

@ -6,5 +6,9 @@
title="<%= translate(locale, "search") %>"
value="<%= env.get?("search").try {|x| HTML.escape(x.as(String)) } %>">
</fieldset>
<button type="submit" id="searchbutton">Search</button>
<button type="submit" id="searchbutton" aria-label="<%= translate(locale, "search") %>">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z" />
</svg>
</button>
</form>