Only show find as you type if enough templates

The find as you type only becomes useful once you have too many
templates to quickly scan visually on the page. I reckon that 7 is the
number where this starts becoming tricky. About 5 fit on the page
without scrolling (on my Macbook).
This commit is contained in:
Chris Hill-Scott
2017-03-17 16:10:43 +00:00
parent 04a5833d30
commit de30558d57

View File

@@ -47,14 +47,16 @@
{% endif %} {% endif %}
</div> </div>
<div data-module="autofocus"> {% if templates|length > 7 %}
<div class="live-search" data-module="live-search" data-targets="#template-list .column-whole"> <div data-module="autofocus">
{{ textbox( <div class="live-search" data-module="live-search" data-targets="#template-list .column-whole">
search_form.search, {{ textbox(
width='1-1' search_form.search,
) }} width='1-1'
) }}
</div>
</div> </div>
</div> {% endif %}
<nav class="grid-row" id=template-list> <nav class="grid-row" id=template-list>
{% for template in templates %} {% for template in templates %}