File tree 5 files changed +30
-15
lines changed
5 files changed +30
-15
lines changed Original file line number Diff line number Diff line change 67
67
< input id ="nav-search " name ="query " type ="text " aria-label ="Find crate by search query " tabindex ="-1 "
68
68
placeholder ="Find crate " {%- if search_query %} value ="{{ search_query }} " {%- endif %} >
69
69
</ div >
70
- {# The sort by select-box #}
71
- < div id ="search-select-nav ">
72
- < label for ="nav-sort ">
73
- {{ "list" | fas }}
74
- </ label >
75
- < select name ="sort " id ="nav-sort " aria-label ="Find crate by the sort by select-box " tabindex ="-1 ">
76
- < option value ="relevance " {%- if search_sort_by and search_sort_by == "relevance " %} selected ="selected " {%- endif %} > Relevance</ option >
77
- < option value ="downloads " {%- if search_sort_by and search_sort_by == "downloads " %} selected ="selected " {%- endif %} > All-Time Downloads</ option >
78
- < option value ="recent-downloads " {%- if search_sort_by and search_sort_by == "recent-downloads " %} selected ="selected " {%- endif %} > Recent Downloads</ option >
79
- < option value ="recent-updates " {%- if search_sort_by and search_sort_by == "recent-updates " %} selected ="selected " {%- endif %} > Recent Updates</ option >
80
- < option value ="new " {%- if search_sort_by and search_sort_by == "new " %} selected ="selected " {%- endif %} > Newly Added</ option >
81
- </ select >
82
- </ div >
83
70
</ form>
84
71
</ div>
85
72
</ div>
Original file line number Diff line number Diff line change 22
22
{%- block body -%}
23
23
< div class ="container ">
24
24
< div class ="recent-releases-container ">
25
+ {%- block sort_by %}{% endblock sort_by -%}
25
26
< ul >
26
27
{# TODO: If there are no releases, then display a message that says so #}
27
28
{%- for release in releases -%}
Original file line number Diff line number Diff line change 1
1
{%- extends "releases/releases.html" -%}
2
2
3
+ {% block sort_by %}
4
+ < div id ="search-select-nav ">
5
+ < div class ="item-end ">
6
+ < span > Sort by</ span >
7
+ < label for ="nav-sort ">
8
+ {{ "list" | fas }}
9
+ </ label >
10
+ < select form ="nav-search-form " name ="sort " id ="nav-sort " aria-label ="Find crate by the sort by select-box " tabindex ="-1 ">
11
+ < option value ="relevance " {%- if search_sort_by and search_sort_by == "relevance " %} selected ="selected " {%- endif %} > Relevance</ option >
12
+ < option value ="downloads " {%- if search_sort_by and search_sort_by == "downloads " %} selected ="selected " {%- endif %} > All-Time Downloads</ option >
13
+ < option value ="recent-downloads " {%- if search_sort_by and search_sort_by == "recent-downloads " %} selected ="selected " {%- endif %} > Recent Downloads</ option >
14
+ < option value ="recent-updates " {%- if search_sort_by and search_sort_by == "recent-updates " %} selected ="selected " {%- endif %} > Recent Updates</ option >
15
+ < option value ="new " {%- if search_sort_by and search_sort_by == "new " %} selected ="selected " {%- endif %} > Newly Added</ option >
16
+ </ select >
17
+ </ div >
18
+ </ div >
19
+ {% endblock sort_by %}
20
+
3
21
{% block pagination %}
4
22
{%- if previous_page_link -%}
5
23
< a class ="pure-button pure-button-normal " href ="{{ previous_page_link|safe }} ">
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ div.nav-container {
99
99
display : flex ;
100
100
flex-direction : row ;
101
101
102
- #search-input-nav , #search-select-nav {
102
+ #search-input-nav {
103
103
max-width : 150px ;
104
104
display : none ;
105
105
border-left : 1px solid var (--color-border );
@@ -130,7 +130,7 @@ div.nav-container {
130
130
}
131
131
}
132
132
133
- input .search-input-nav :focus , select .search-select-nav :focus {
133
+ input .search-input-nav :focus {
134
134
outline : unset ;
135
135
}
136
136
Original file line number Diff line number Diff line change @@ -241,6 +241,15 @@ div.landing {
241
241
}
242
242
}
243
243
244
+ #search-select-nav {
245
+ display : flex ;
246
+ flex-direction : column ;
247
+
248
+ .item-end {
249
+ align-self : flex-end
250
+ }
251
+ }
252
+
244
253
div .recent-releases-container {
245
254
text-align : left ;
246
255
padding-bottom : 50px ;
You can’t perform that action at this time.
0 commit comments