cheatsheets/_includes/2017/search-form.html

22 lines
808 B
HTML

<form
{% if include.live %}data-js-search-form{% endif %}
class='search'action='{{ base }}' method='get'>
<label class='search-box {{ include.class }}'>
{% comment %}
<span class='prefix'>{{ site.data.content.search_form.prefix }}</span>
<span class='sep'>/</span>
{% endcomment %}
<input name='q'
type='text'
{% if include.live %}
{% assign placeholder = site.data.content.search_form.home_placeholder | replace: "%{size}", size %}
autofocus data-js-search-input
placeholder='{{ placeholder }}'
{% else %}
{% assign size = site.pages | size %}
{% assign placeholder = site.data.content.search_form.default_placeholder | replace: "SIZE", size %}
placeholder='{{ placeholder }}'
{% endif %}>
</label>
</form>