Skip to content
Snippets Groups Projects
Unverified Commit c980fd4a authored by Matt Wang's avatar Matt Wang Committed by GitHub
Browse files

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
parent 312f1bce
No related branches found
No related tags found
No related merge requests found
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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment