Add toggle filters to find more page.

This commit is contained in:
Edward Betts 2019-09-27 15:38:36 +01:00
parent 8fa23e5e19
commit 161c58e7db

View file

@ -21,6 +21,9 @@
<p>{{ '{:,d}'.format(total) }} paintings found</p>
<a href="#" id="toggle-filters">toggle filters</a>
<div id="filters">
{% for key, values in facets.items() %}
<p>{{ prop_labels[key] }}:
{% for v in values %}
@ -28,8 +31,8 @@
{% if not loop.last %}|{% endif %}
{% endfor %}
</p>
{% endfor %}
</div>
<div class="card-columns">
{% for item in items %}
@ -56,3 +59,15 @@
</div>
{% endblock %}
{% block script %}
<script>
$('#filters').hide();
$('#toggle-filters').click((event) => {
event.preventDefault();
$('#filters').toggle()
});
</script>
{% endblock %}