Skip to content

Commit

Permalink
style(search): add the floating labels for selects
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Aug 23, 2022
1 parent 52cd459 commit cdfed99
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 4 deletions.
3 changes: 3 additions & 0 deletions i18n/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ other = "Please enter search keywords"
[search_no_results]
other = "No results found"

[search_score]
other = "Score"

[search_sorting]
other = "Sorting"

Expand Down
3 changes: 3 additions & 0 deletions i18n/zh-cn.toml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ other = "请输入搜索关键词"
[search_no_results]
other = "找不到相关结果"

[search_score]
other = "评分"

[search_sorting]
other = "排序"

Expand Down
3 changes: 3 additions & 0 deletions i18n/zh-hans.toml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ other = "请输入搜索关键词"
[search_no_results]
other = "找不到相关结果"

[search_score]
other = "评分"

[search_sorting]
other = "排序"

Expand Down
3 changes: 3 additions & 0 deletions i18n/zh-hant.toml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ other = "請輸入搜尋關鍵詞"
[search_no_results]
other = "找不到相關結果"

[search_score]
other = "評分"

[search_sorting]
other = "排序"

Expand Down
3 changes: 3 additions & 0 deletions i18n/zh-hk.toml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ other = "請輸入搜索關鍵詞"
[search_no_results]
other = "找不到相關結果"

[search_score]
other = "評分"

[search_sorting]
other = "排序"

Expand Down
3 changes: 3 additions & 0 deletions i18n/zh-tw.toml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ other = "請輸入搜尋關鍵詞"
[search_no_results]
other = "找不到相關結果"

[search_score]
other = "評分"

[search_sorting]
other = "排序"

Expand Down
10 changes: 6 additions & 4 deletions layouts/partials/search/form.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,22 @@
</span>
</div>
<div class="row g-1 collapse" id="advanced-search">
<div class="col-6 mb-2">
<div class="form-floating col-6 mb-2">
<select class="form-select" aria-label="{{ i18n "language" }}" name="lang" id="languages-select">
<option selected value="">{{ i18n "language" }}</option>
<option selected value="">{{ i18n "all" }}</option>
{{- range .Site.Languages -}}
<option value="{{ .Lang }}">{{ .LanguageName }}</option>
{{- end }}
</select>
<label for="languages-select">{{ i18n "language" }}</label>
</div>
<div class="col-6 mb-2">
<div class="form-floating col-6 mb-2">
<select class="form-select" aria-label="{{ i18n "search_sorting" }}" name="sort" id="sorting-select">
<option selected value="">{{ i18n "search_sorting" }}</option>
<option selected value="">{{ i18n "search_score" }}</option>
<option value="date asc">{{ i18n "search_date"}} ↑</option>
<option value="date desc">{{ i18n "search_date"}} ↓</option>
</select>
<label for="sorting-select">{{ i18n "search_sorting" }}</label>
</div>
<div class="form-floating col-6 col-lg-3">
<input type="text" class="form-control form-control-sm" name="author" id="author-input" list="authors-list" placeholder="{{ i18n "authors" }}">
Expand Down

0 comments on commit cdfed99

Please sign in to comment.