change search summary icon

This commit is contained in:
krvpb024 2024-01-25 19:25:17 +08:00 committed by Frédéric Guillot
parent c217a31444
commit fa7508e28d
2 changed files with 17 additions and 0 deletions

View File

@ -117,6 +117,9 @@
<details {{ if $.searchQuery }}open{{ end }}>
<summary>
<span>{{ t "search.label" }}</span>
<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708"/>
</svg>
</summary>
<form action="{{ route "searchEntries" }}" aria-labelledby="search-input-label">
<input type="search" name="q" aria-label="{{ t "search.label" }}" {{ if $.searchQuery }}value="{{ .searchQuery }}"{{ end }} required>

View File

@ -223,6 +223,20 @@ a:hover {
margin-right: 5px;
}
.search details[open] svg {
rotate: 180deg;
}
.search details > summary {
list-style: none;
}
.search details > summary::marker, /* Latest Chrome, Edge, Firefox */
.search details > summary::-webkit-details-marker /* Safari */ {
display: none;
}
.search-toggle-switch {
display: none;
}