mirror of
https://gitlab.com/SIGBUS/nyaa.git
synced 2024-12-23 01:39:59 +00:00
Fix search on mobile.
This commit is contained in:
parent
02c7223f09
commit
428b0bf8c7
|
@ -149,16 +149,7 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
<form class="navbar-form navbar-right form" action="/" method="get">
|
<form class="navbar-form navbar-right form" action="/" method="get">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="input-group search-container">
|
|
||||||
<input type="text" class="form-control search-bar" name="q" placeholder="Search..." value="{{ search["term"] if search is defined else '' }}">
|
|
||||||
<div class="input-group-btn nav-filter" id="navFilter-criteria">
|
|
||||||
<select class="selectpicker show-tick" title="Filter" data-width="120px" name="f">
|
|
||||||
<option value="0" title="No filter" {% if search is defined and search["quality_filter"] == "0" %}selected{% else %}selected{% endif %}>No filter</option>
|
|
||||||
<option value="1" title="No remakes" {% if search is defined and search["quality_filter"] == "1" %}selected{% endif %}>No remakes</option>
|
|
||||||
<option value="2" title="Trusted only" {% if search is defined and search["quality_filter"] == "2" %}selected{% endif %}>Trusted only</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="input-group-btn nav-filter" id="navFilter-category">
|
|
||||||
{% set nyaa_cats = [('1_0', 'Anime', 'Anime'),
|
{% set nyaa_cats = [('1_0', 'Anime', 'Anime'),
|
||||||
('1_1', '- Anime Music Video', 'Anime - AMV'),
|
('1_1', '- Anime Music Video', 'Anime - AMV'),
|
||||||
('1_2', '- English-translated', 'Anime - English'),
|
('1_2', '- English-translated', 'Anime - English'),
|
||||||
|
@ -197,6 +188,49 @@
|
||||||
{% set used_cats = suke_cats %}
|
{% set used_cats = suke_cats %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
<div class="search-container visible-xs visible-sm">
|
||||||
|
<input type="text" class="form-control" name="q" placeholder="Search..." value="{{ search["term"] if search is defined else '' }}">
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<select class="form-control" title="Filter" data-width="120px" name="f">
|
||||||
|
<option value="0" title="No filter" {% if search is defined and search["quality_filter"] == "0" %}selected{% else %}selected{% endif %}>No filter</option>
|
||||||
|
<option value="1" title="No remakes" {% if search is defined and search["quality_filter"] == "1" %}selected{% endif %}>No remakes</option>
|
||||||
|
<option value="2" title="Trusted only" {% if search is defined and search["quality_filter"] == "2" %}selected{% endif %}>Trusted only</option>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<select class="form-control" title="Category" data-width="200px" name="c">
|
||||||
|
<option value="0_0" title="All categories" {% if search is defined and search["category"] == "0_0" %}selected{% else %}selected{% endif %}>
|
||||||
|
All categories
|
||||||
|
</option>
|
||||||
|
{% for cat_id, cat_name, cat_title in used_cats %}
|
||||||
|
<option value="{{ cat_id }}" title="{{ cat_title }}" {% if search is defined and search.category == cat_id %}selected{% endif %}>
|
||||||
|
{{ cat_name }}
|
||||||
|
</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<button class="btn btn-primary form-control" type="submit">
|
||||||
|
<i class="fa fa-search fa-fw"></i> Search
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="input-group search-container hidden-xs hidden-sm">
|
||||||
|
<input type="text" class="form-control search-bar" name="q" placeholder="Search..." value="{{ search["term"] if search is defined else '' }}">
|
||||||
|
<div class="input-group-btn nav-filter" id="navFilter-criteria">
|
||||||
|
<select class="selectpicker show-tick" title="Filter" data-width="120px" name="f">
|
||||||
|
<option value="0" title="No filter" {% if search is defined and search["quality_filter"] == "0" %}selected{% else %}selected{% endif %}>No filter</option>
|
||||||
|
<option value="1" title="No remakes" {% if search is defined and search["quality_filter"] == "1" %}selected{% endif %}>No remakes</option>
|
||||||
|
<option value="2" title="Trusted only" {% if search is defined and search["quality_filter"] == "2" %}selected{% endif %}>Trusted only</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="input-group-btn nav-filter" id="navFilter-category">
|
||||||
<!--
|
<!--
|
||||||
On narrow viewports, there isn't enough room to fit the full stuff in the selectpicker, so we show a full-width one on wide viewports, but squish it on narrow ones.
|
On narrow viewports, there isn't enough room to fit the full stuff in the selectpicker, so we show a full-width one on wide viewports, but squish it on narrow ones.
|
||||||
-->
|
-->
|
||||||
|
|
Loading…
Reference in a new issue