Put miles and feet first, and give the site a proper mark
Mirror to forge / mirror (push) Canceled after 0s
Validate / validate (push) Canceled after 0s
Validate / site (push) Canceled after 0s
Validate / deploy (push) Canceled after 0s

Units. Miles and feet now come first everywhere unless the reader
chooses kilometres and metres: paired figures, the time estimate, the
elevation profile, page descriptions and the map scale. The length
filter and the length scale use round mile steps (round kilometre steps
for a reader who chose them). The lists defined by length are now
"Under 100 miles" and "The longest" at 1,000 miles or more; the old
/lists/under-100-km/ address redirects. The records stay metric.

Branding. The tab icon was a bare red blaze that read as a red block;
it is now a mountain with a trail up it, with PNG sizes for browsers
and phones that need them. The home page opens with the mark, the name
and what the site offers. Link previews get a real 1200x630 image:
the old one was an SVG, which Reddit, Slack and iMessage do not draw.

The decorative contour lines now stay inside the content column and
thin out to nothing on every side, where they used to run to the right
edge of a wide window and stop dead at the bottom of the band.

Tests updated for the new trail counts.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-14 20:37:14 -07:00
1 parent c7e8e58dce
commit 19fabadd49
27 files changed
+480 -189

No files matched your search

+7 -2
View File
@@ -109,12 +109,17 @@ class TimeTest(unittest.TestCase):
rec = fake(1, km=300) # 300 km at 20 to 30 km a day: 10 to 15 days
self.assertEqual(facets.time_days(rec), (10, 15, True))
self.assertEqual(facets.time_text(rec), "About 1 to 2 weeks")
self.assertEqual(facets.estimate_note(rec), "Estimated from the length, at 20 to 30 km (12 to 19 mi) a day.")
note = facets.estimate_note(rec) # miles first: both in the HTML, CSS orders them
self.assertTrue(note.startswith("Estimated from the length, at "))
self.assertLess(note.index('<span class="len__mi">12 to 19 mi</span>'),
note.index('<span class="len__km">20 to 30 km</span>'))
self.assertTrue(note.endswith(" a day."))
self.assertEqual(facets.time_band(rec), "two-weeks")
# cross-country is slower: 12 to 20 km a day
rec = fake(2, km=300, hike={"travel": "mostly-cross-country"})
self.assertEqual(facets.time_days(rec), (15, 25, True))
self.assertIn("12 to 20 km", facets.estimate_note(rec))
self.assertIn("7 to 12 mi", facets.estimate_note(rec))
self.assertEqual(facets.time_band(rec), "month")
def test_every_trail_has_a_time_and_its_label(self):
@@ -276,7 +281,7 @@ class BuiltVocabularyTest(unittest.TestCase):
n = len(re.findall(r'<li class="entry" ', doc))
self.assertEqual(n, len(records.load_records(ROOT)))
self.assertIn(f"<strong>{n}</strong> of {n} trails", doc)
self.assertIn(f"{n} long-distance trails", doc)
self.assertIn(f"{n} trails. Narrow them", doc)
def test_route_badges_link_to_the_routes_list(self):
for rel in ("index.html", "routes/index.html"):