소스 검색

change search summary icon

krvpb024 2 년 전
부모
커밋
fa7508e28d
2개의 변경된 파일17개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      internal/template/templates/common/layout.html
  2. 14 0
      internal/ui/static/css/common.css

+ 3 - 0
internal/template/templates/common/layout.html

@@ -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>

+ 14 - 0
internal/ui/static/css/common.css

@@ -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;
 }