@@ -38,24 +38,58 @@ <h1>{{ category.name }}</h1>
3838</ header >
3939{% endblock %}
4040{% block content %}
41- < section class ="results-section category-results " id ="category-index ">
41+ < script type ="application/json " id ="filter-urls "> { { filter_urls_json | safe } } </ script >
42+ < section class ="results-section " id ="library-index ">
4243 < div class ="results-intro section-shell " data-reveal >
4344 < div >
44- < h2 > Python Projects in {{ category.name }} </ h2 >
45+ < h2 > Search every project in one place </ h2 >
4546 </ div >
4647 < p class ="results-note ">
47- Sorted by GitHub stars when available. Click any row for details.
48+ Press < kbd > /</ kbd > to search. Tap a tag to filter. Click any row for
49+ details.
4850 </ p >
4951 </ div >
5052
51- < h2 class ="sr-only "> {{ category.name }} results</ h2 >
53+ < div class ="controls section-shell " data-reveal >
54+ < h2 class ="sr-only "> Search and filter</ h2 >
55+ < div class ="search-wrap ">
56+ < svg
57+ class ="search-icon "
58+ width ="16 "
59+ height ="16 "
60+ viewBox ="0 0 24 24 "
61+ fill ="none "
62+ stroke ="currentColor "
63+ stroke-width ="2.5 "
64+ stroke-linecap ="round "
65+ stroke-linejoin ="round "
66+ >
67+ < circle cx ="11 " cy ="11 " r ="8 " />
68+ < line x1 ="21 " y1 ="21 " x2 ="16.65 " y2 ="16.65 " />
69+ </ svg >
70+ < input
71+ type ="search "
72+ class ="search "
73+ placeholder ="Search {{ entries | length }} projects in {{ category.name }}... "
74+ aria-label ="Search projects "
75+ />
76+ </ div >
77+ < div class ="filter-bar " aria-live ="polite ">
78+ < span > Filtering for < strong class ="filter-value "> </ strong > </ span >
79+ < button class ="filter-clear " aria-label ="Clear filter ">
80+ Clear filter
81+ </ button >
82+ </ div >
83+ </ div >
84+
85+ < h2 class ="sr-only "> Results</ h2 >
5286 < div
5387 class ="table-wrap "
5488 tabindex ="0 "
5589 role ="region "
56- aria-label ="{{ category.name }} libraries table "
90+ aria-label ="Libraries table "
5791 >
58- < table class ="table category-table ">
92+ < table class ="table ">
5993 < thead >
6094 < tr >
6195 < th class ="col-num "> < span class ="sr-only "> Row number</ span > </ th >
@@ -69,7 +103,11 @@ <h2 class="sr-only">{{ category.name }} results</h2>
69103 < button type ="button " class ="sort-btn "> Last Commit</ button >
70104 </ th >
71105 < th class ="col-cat "> Tags</ th >
72- < th class ="col-arrow "> < span class ="sr-only "> Details</ span > </ th >
106+ < th class ="col-arrow ">
107+ < button class ="back-to-top " aria-label ="Back to top ">
108+ Top ↑
109+ </ button >
110+ </ th >
73111 </ tr >
74112 </ thead >
75113 < tbody >
@@ -79,7 +117,7 @@ <h2 class="sr-only">{{ category.name }} results</h2>
79117 data-tags ="{{ entry.categories | join('||') }}{% if entry.subcategories %}||{{ entry.subcategories | map(attribute='value') | join('||') }}{% endif %}||{{ entry.groups | join('||') }}{% if entry.source_type == 'Built-in' %}||Built-in{% endif %} "
80118 tabindex ="0 "
81119 aria-expanded ="false "
82- aria-controls ="category- expand-{{ loop.index }} "
120+ aria-controls ="expand-{{ loop.index }} "
83121 >
84122 < td class ="col-num "> {{ loop.index }}</ td >
85123 < td class ="col-name ">
@@ -145,7 +183,7 @@ <h2 class="sr-only">{{ category.name }} results</h2>
145183 </ td >
146184 < td class ="col-arrow "> < span class ="arrow "> →</ span > </ td >
147185 </ tr >
148- < tr class ="expand-row " id ="category- expand-{{ loop.index }} ">
186+ < tr class ="expand-row " id ="expand-{{ loop.index }} ">
149187 < td > </ td >
150188 < td colspan ="4 ">
151189 < div class ="expand-content ">
@@ -188,6 +226,14 @@ <h2 class="sr-only">{{ category.name }} results</h2>
188226 </ tbody >
189227 </ table >
190228 </ div >
229+
230+ < div class ="no-results " hidden >
231+ < p > No projects match your search or filter.</ p >
232+ < p class ="no-results-hint ">
233+ Try a broader term, or
234+ < button class ="no-results-clear "> browse all projects</ button > .
235+ </ p >
236+ </ div >
191237</ section >
192238
193239< section class ="final-cta " data-reveal >
@@ -203,7 +249,13 @@ <h2>Know a project that belongs here?</h2>
203249 rel ="noopener "
204250 > Submit a project</ a
205251 >
206- < a href ="/ " class ="hero-action hero-action-secondary "> Browse all</ a >
252+ < a
253+ href ="https://github.com/vinta/awesome-python "
254+ class ="hero-action hero-action-secondary "
255+ target ="_blank "
256+ rel ="noopener "
257+ > Star the repository</ a
258+ >
207259 </ div >
208260 </ div >
209261</ section >
0 commit comments