mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-04-07 04:31:21 -06:00
feat: adds search placeholder configuration (#613)
* implements search placeholder configuration * changes implementation approach to use search_placeholder_custom Thanks to @pdmosses for the suggestion! * strips whitespace and HTML for both placeholder and aria-label
This commit is contained in:
parent
312f1bceac
commit
c980fd4a64
1
_includes/search_placeholder_custom.html
Normal file
1
_includes/search_placeholder_custom.html
Normal file
@ -0,0 +1 @@
|
||||
Search {{site.title}}
|
@ -92,9 +92,12 @@ layout: table_wrappers
|
||||
<div class="main" id="top">
|
||||
<div id="main-header" class="main-header">
|
||||
{% if site.search_enabled != false %}
|
||||
|
||||
{% capture search_placeholder %}{% include search_placeholder_custom.html %}{% endcapture %}
|
||||
|
||||
<div class="search">
|
||||
<div class="search-input-wrap">
|
||||
<input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search {{ site.title }}" aria-label="Search {{ site.title }}" autocomplete="off">
|
||||
<input type="text" id="search-input" class="search-input" tabindex="0" placeholder="{{ search_placeholder | strip_html | strip }}" aria-label="{{ search_placeholder | strip_html| strip }}" autocomplete="off">
|
||||
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#svg-search"></use></svg></label>
|
||||
</div>
|
||||
<div id="search-results" class="search-results"></div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user