1
0
Fork 0
mirror of https://gitlab.com/SIGBUS/nyaa.git synced 2024-12-22 18:00:00 +00:00

Fix search bar presentation

Need to fix filters and categories though. Looks
terrible.
This commit is contained in:
Nathan Yam 2017-05-16 19:53:38 +10:00
parent 00c768c722
commit 36416a3597
2 changed files with 38 additions and 5 deletions

View file

@ -99,6 +99,39 @@ table.torrent-list thead th.sorting_desc:after {
} }
} }
.search-container {
display: flex;
flex-direction: column;
}
.form-control.search-bar {
order: 1;
width: 88%;
}
.search-btn {
order: 2;
align-self: flex-end;
top: -34px;
height: 0;
width: auto;
}
#navFilter-category {
order: 3;
}
#navFilter-criteria {
order: 4;
}
@media (min-width: 768px) {
.search-btn {
top: 0;
width: auto;
}
}
/* elasticsearch term highlight */ /* elasticsearch term highlight */
.hlt1 { .hlt1 {
font-style: normal; font-style: normal;

View file

@ -144,16 +144,16 @@
{% 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"> <div class="input-group search-container">
<input type="text" class="form-control" name="q" placeholder="Search..." value="{{ search["term"] if search is defined else '' }}"> <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" id="navFilter"> <div class="input-group-btn" id="navFilter-criteria">
<select class="selectpicker show-tick" title="Filter" data-width="120px" name="f"> <select class="selectpicker show-tick" title="Filter" data-width="120px" name="f">
<option value="0" title="Show all" {% if search is defined and search["quality_filter"] == "0" %}selected{% else %}selected{% endif %}>Show all</option> <option value="0" title="Show all" {% if search is defined and search["quality_filter"] == "0" %}selected{% else %}selected{% endif %}>Show all</option>
<option value="1" title="No remakes" {% if search is defined and search["quality_filter"] == "1" %}selected{% endif %}>No remakes</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> <option value="2" title="Trusted only" {% if search is defined and search["quality_filter"] == "2" %}selected{% endif %}>Trusted only</option>
</select> </select>
</div> </div>
<div class="input-group-btn" id="navFilter"> <div class="input-group-btn" 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'),
@ -202,7 +202,7 @@
{% endfor %} {% endfor %}
</select> </select>
</div> </div>
<div class="input-group-btn"> <div class="input-group-btn search-btn">
<button class="btn btn-primary" type="submit"> <button class="btn btn-primary" type="submit">
<i class="fa fa-search fa-fw"></i> <i class="fa fa-search fa-fw"></i>
</button> </button>