Rebuild the site for people browsing trails
The site read like a database. It is now a place to find and read about long trails, and everything on it is still derived from the records. - One kind of thing: a trail. A route is a kind of trail, explained where the word first appears. The navigation is Trails, Places, About. - The home page is the catalogue, with filters for where, length, time, season, terrain, kind, walking, shape and GPX. A filter is offered only when at least a third of the trails have a value for it. - Lists (for example National Scenic Trails and Routes) and a Places page that groups states and provinces into regions. - A trail page leads with what a hiker needs: summary, at a glance, map, downloads, elevation profile and where to go next. The dataset's own fields sit in a collapsed "About this data" section. - The trail list is a compact card on phones and beside the filters, and a column table where it has the full page width. - web/serve.py takes --bind, for viewing from another device. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
efb6164737
commit
b817d2097b
21 files changed
+3468
-719
No files matched your search
@@ -2,6 +2,8 @@
|
||||
import os
|
||||
import tomllib
|
||||
|
||||
from . import elevation
|
||||
|
||||
ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
SHIELD_NAMES = ("shield.svg", "shield.png")
|
||||
|
||||
@@ -50,6 +52,7 @@ def load_record(root, tid):
|
||||
"has_line": bool(rec.get("source", {}).get("line_file")),
|
||||
"length_mi": int(round(length_km / 1.609344)),
|
||||
"files": find_files(root, tid, rec),
|
||||
"elevation": elevation.load_file(root, tid),
|
||||
"status": trail_status(rec),
|
||||
}
|
||||
return rec
|
||||
|
||||
Reference in new issue
Block a user