feat: use ui_seach directly
parent
4df04ed775
commit
dd679e0812
|
@ -2,14 +2,6 @@
|
||||||
{{ $lang := .Site.Language.Lang }}
|
{{ $lang := .Site.Language.Lang }}
|
||||||
{{ $searchFile := printf "content/%s/search.md" $lang }}
|
{{ $searchFile := printf "content/%s/search.md" $lang }}
|
||||||
|
|
||||||
{{ $check := "" }}
|
|
||||||
{{ if T "ui_search_placeholder" }}
|
|
||||||
{{ warnf "The search bar placeholder for the language %s is using a custom \"ui_search_placeholder\" key. Please change the key in the translations to the Docsy provided \"ui_search\"." $lang }}
|
|
||||||
{{ $check = T "ui_search_placeholder" }}
|
|
||||||
{{ else }}
|
|
||||||
{{ $check = T "ui_search" }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
<div class="search-bar">
|
<div class="search-bar">
|
||||||
<i class="search-icon fa-solid fa-search"></i>
|
<i class="search-icon fa-solid fa-search"></i>
|
||||||
<input
|
<input
|
||||||
|
@ -21,8 +13,8 @@
|
||||||
data-search-page="{{ "search/" | relURL }}"
|
data-search-page="{{ "search/" | relURL }}"
|
||||||
{{ end }}
|
{{ end }}
|
||||||
class="search-input td-search-input"
|
class="search-input td-search-input"
|
||||||
placeholder="{{ $check }}"
|
placeholder="{{ T "ui_search" }}"
|
||||||
aria-label="{{ $check }}"
|
aria-label="{{ T "ui_search" }}"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
Loading…
Reference in New Issue