Keep the filters, switches and saved stars in step, and trim the headline
"Clear search and filters" left the longest-length list on a step: the script rebuilds the length options and did not mark "Any" as the default, which is what a form's reset returns to. The same kind of fault elsewhere: - A length in the address in the other unit (?max=200km for a reader who uses miles) was dropped. It now takes the nearest step, and the address is rewritten on load to say what the controls show. - After Back or a reload a browser may put a form's old values back after the script has run, or show an old copy of the page from its cache. The theme and units switches, the filters, the sort and the saved stars are set again when the page is shown. - A theme or units change now reaches other open tabs. - The popup on the home page's map follows the units and closes when the filters leave its trail out. - The Saved page drops ?t= from the address when the list in it is the visitor's own. The home page's headline no longer says "to compare and download", and its subtitle no longer counts the GPX files. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
46dc81523c
commit
601235d2cb
3 files changed
+120
-25
No files matched your search
+2
-2
@@ -600,7 +600,7 @@ def render(records, site):
|
||||
recs = sorted(records, key=sort_name)
|
||||
total = c["total"]
|
||||
lede = (f"{total} trails. Narrow them by where they are, how long they take, when to walk them "
|
||||
f"and what the country is like. {c['gpx_here']} have a GPX to download.")
|
||||
f"and what the country is like.")
|
||||
contribute = ""
|
||||
if site.repo_url:
|
||||
contribute = (f'<p class="finder__foot">Something wrong, or a trail missing? '
|
||||
@@ -609,7 +609,7 @@ def render(records, site):
|
||||
return f"""<section class="hero hero--short hero--home" aria-labelledby="hero-title">
|
||||
<div class="container hero__inner">
|
||||
<h1 id="hero-title" class="lockup"><img class="lockup__mark" src="/assets/favicon.svg" alt="" width="96" height="96">{esc(site.name)}</h1>
|
||||
<p class="hero__tagline">Long-distance hiking trails of the United States and Canada, to compare and download.</p>
|
||||
<p class="hero__tagline">Long-distance hiking trails of the United States and Canada.</p>
|
||||
<ul class="hero__tags">
|
||||
<li><a href="#finder">Filters</a></li>
|
||||
<li><a href="/lists/with-gpx/">GPX</a></li>
|
||||
|
||||
Reference in new issue
Block a user