tren/views/search.html
ngn 15ffbfae4d
All checks were successful
Build and publish the docker image / build (push) Successful in 38s
save the provided dictionary accross translations
Signed-off-by: ngn <ngn@ngn.tf>
2025-04-05 10:30:59 +03:00

18 lines
611 B
HTML

<form class="search" method="post" action="/translate">
{{if .term}}
<input name="term" type="text" placeholder="Enter a word or a sentence" value="{{.term}}">
{{else}}
<input name="term" type="text" placeholder="Enter a word or a sentence">
{{end}}
<select name="dictionary">
{{range .dictionaries}}
{{if and ($.dictionary) (eq $.dictionary .ShortName)}}
<option value="{{.ShortName}}" selected>{{.Name}}</option>
{{else}}
<option value="{{.ShortName}}">{{.Name}}</option>
{{end}}
{{end}}
</select>
<button type="submit">Translate</button>
</form>