Hide sort select on larger screens, closes #300

pull/307/head
Simon Willison 2018-05-31 07:43:06 -07:00
rodzic a80e1d50b9
commit 7381af85e6
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 17E2DEA2588B7F52
2 zmienionych plików z 12 dodań i 2 usunięć

Wyświetl plik

@ -35,7 +35,14 @@ table a:link {
table a:visited {
color: #8f54c4;
}
.small-screen-only,
.select-wrapper.small-screen-only {
display: none;
}
@media only screen and (max-width: 576px) {
.small-screen-only {
display: initial;
}
/* Force table to not be like tables anymore */
table.rows-and-columns,
.rows-and-columns thead,
@ -219,6 +226,9 @@ form input[type=submit] {
font-family: Helvetica, sans-serif;
}
@media only screen and (max-width: 576px) {
.select-wrapper.small-screen-only {
display: inline-block;
}
.select-wrapper {
width: 100px;
}

Wyświetl plik

@ -69,7 +69,7 @@
</div>
<div class="filter-row">
{% if is_sortable %}
<div class="select-wrapper">
<div class="select-wrapper small-screen-only">
<select name="_sort" id="sort_by">
<option value="">Sort...</option>
{% for column in display_columns %}
@ -79,7 +79,7 @@
{% endfor %}
</select>
</div>
<label class="sort_by_desc"><input type="checkbox" name="_sort_by_desc"{% if sort_desc %} checked{% endif %}> descending</label>
<label class="sort_by_desc small-screen-only"><input type="checkbox" name="_sort_by_desc"{% if sort_desc %} checked{% endif %}> descending</label>
{% endif %}
{% for facet in sorted_facet_results %}
<input type="hidden" name="_facet" value="{{ facet.name }}">