File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ <h2 id="more-help">Where can I get more help?</h2>
141141
142142 < footer class ="site-footer ">
143143 < div class ="container footer-inner ">
144- < p > Maintained by the PyScript community · < a href ="https://github.com/pyscript/pyscript- packages " target ="_blank "> GitHub</ a > </ p >
144+ < p > Maintained by the PyScript community · < a href ="https://github.com/pyscript/packages " target ="_blank "> GitHub</ a > </ p >
145145 </ div >
146146 </ footer >
147147 </ body >
Original file line number Diff line number Diff line change 44It fetches the top 100 PyPI packages and displays them with their
55PyScript support status.
66"""
7+ import js
78from pyscript import fetch
89from pyscript .web import page , a
910
11+ def get_package_name ():
12+ """
13+ Extract the package name from the query string.
14+
15+ Package names are case insensitive, so we convert to lowercase.
16+ """
17+ query_string = js .window .location .search
18+ url_params = js .URLSearchParams .new (query_string )
19+ package_name = url_params .get ("q" )
20+ if package_name :
21+ return package_name .strip ().lower ()
22+ return None
23+
24+ package_name = get_package_name ()
25+
26+ if package_name :
27+ js .window .location .replace (f"./package?package={ package_name } " )
28+
1029top100 = await fetch ("./api/top_100_pypi_packages.json" ).json ()
1130
1231target = page ["#top100" ]
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ <h2 class="section-title">📊 Popular Python Packages</h2>
8080
8181 < footer class ="site-footer ">
8282 < div class ="container footer-inner ">
83- < p > Maintained by the PyScript community · < a href ="https://github.com/pyscript/pyscript- packages " target ="_blank "> GitHub</ a > </ p >
83+ < p > Maintained by the PyScript community · < a href ="https://github.com/pyscript/packages " target ="_blank "> GitHub</ a > </ p >
8484 </ div >
8585 </ footer >
8686
Original file line number Diff line number Diff line change 4343
4444 < footer class ="site-footer ">
4545 < div class ="container footer-inner ">
46- < p > Maintained by the PyScript community · < a href ="https://github.com/pyscript/pyscript- packages " target ="_blank "> GitHub</ a > </ p >
46+ < p > Maintained by the PyScript community · < a href ="https://github.com/pyscript/packages " target ="_blank "> GitHub</ a > </ p >
4747 </ div >
4848 </ footer >
4949 </ body >
You can’t perform that action at this time.
0 commit comments