Show the search box and filters on every park, range and wilderness page, however few trails it has
The bar was written only for a set of ten trails or more (home.FILTER_MIN, added with the list and place filters on 2026-11-17), which left the Wind River Range (7 trails), Yosemite (9) and the Ansel Adams Wilderness (5) with neither a search box nor Filters. Place pages now always get it, and a set that nothing can narrow gets the search box alone, with no Filters button and no empty panel. State and province pages keep the ten-trail threshold for now. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
30d03b8069
commit
d90fa49df5
4 files changed
+57
-10
No files matched your search
+2
-1
@@ -308,6 +308,7 @@ class PageKind:
|
||||
nav: object
|
||||
in_name: object = None
|
||||
phrase: object = None
|
||||
always_filters: bool = False # the filter bar whatever the number of trails
|
||||
|
||||
|
||||
def _state_kicker(info):
|
||||
@@ -431,7 +432,7 @@ def place_page(info, records, site, kind, *, facet_pages=(), place_links=""):
|
||||
</div></header>
|
||||
</div></div>
|
||||
<div class="container section place">
|
||||
{home.browse_view(home.listing(recs, top=2, where=kind.where, wholly=wholly), home.overview_map(recs, f"Map of the trails {phrase}", place=kind.box(info)),
|
||||
{home.browse_view(home.listing(recs, top=2, where=kind.where, wholly=wholly, always=kind.always_filters), home.overview_map(recs, f"Map of the trails {phrase}", place=kind.box(info)),
|
||||
about=f"{summary.facts(recs, records, place=place)}{summary.details(recs)}",
|
||||
about_title=f"About the trails {phrase}")}
|
||||
{nav}{place_links}
|
||||
|
||||
Reference in new issue
Block a user