gitea/templates/code/searchform.tmpl
HesterG c082689471
Use flex instead of float for sort button and search input (#25519)
Right now some sort buttons beside search input are unclickable because
#25338 removed `max-width` and the sort button is using float, sort
button is then covered by the `input`.

The way to fix this in this PR is changing the layout to `flex` and put
`input form` and sort `button` into `secondary menu`.

After:

<img width="1411" alt="Screen Shot 2023-06-26 at 16 40 52"
src="https://github.com/go-gitea/gitea/assets/17645053/63c12b17-793a-4ae7-bbda-f67b13b87212">

<img width="1428" alt="Screen Shot 2023-06-26 at 16 34 06"
src="https://github.com/go-gitea/gitea/assets/17645053/cb7d967e-355d-4cb0-955c-6139580fc17a">
<img width="716" alt="Screen Shot 2023-06-26 at 16 34 22"
src="https://github.com/go-gitea/gitea/assets/17645053/c74b5ef2-d46e-4487-8794-28bec984bb36">
<img width="1424" alt="Screen Shot 2023-06-26 at 16 34 32"
src="https://github.com/go-gitea/gitea/assets/17645053/8a5fdc05-a2c5-4ec4-979d-15a21501fe14">
<img width="1425" alt="Screen Shot 2023-06-26 at 16 35 21"
src="https://github.com/go-gitea/gitea/assets/17645053/eb73cd31-3914-4bc9-92ab-aba56f25128b">
<img width="1437" alt="Screen Shot 2023-06-26 at 16 36 14"
src="https://github.com/go-gitea/gitea/assets/17645053/1c3b4595-bb26-491f-aa68-60dc9ab22b84">
2023-06-28 20:10:36 +08:00

15 lines
1.1 KiB
Cheetah

<form class="ui form ignore-dirty">
<div class="ui fluid action input">
{{template "shared/searchinput" dict "locale" .locale "Value" .Keyword "AutoFocus" true "Disabled" .CodeIndexerUnavailable}}
<div class="ui dropdown selection {{if .CodeIndexerUnavailable}} disabled{{end}}" data-tooltip-content="{{.locale.Tr "explore.search.type.tooltip"}}">
<input name="t" type="hidden" value="{{.queryType}}"{{if .CodeIndexerUnavailable}} disabled{{end}}>{{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="text">{{.locale.Tr (printf "explore.search.%s" (or .queryType "fuzzy"))}}</div>
<div class="menu">
<div class="item" data-value="" data-tooltip-content="{{.locale.Tr "explore.search.fuzzy.tooltip"}}">{{.locale.Tr "explore.search.fuzzy"}}</div>
<div class="item" data-value="match" data-tooltip-content="{{.locale.Tr "explore.search.match.tooltip"}}">{{.locale.Tr "explore.search.match"}}</div>
</div>
</div>
<button class="ui primary button"{{if .CodeIndexerUnavailable}} disabled{{end}}>{{.locale.Tr "explore.search"}}</button>
</div>
</form>