Put miles and feet first, and give the site a proper mark
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:
1 parent
c7e8e58dce
commit
19fabadd49
27 files changed
+480
-189
No files matched your search
@@ -123,12 +123,12 @@ def parts_caveat(elev):
|
||||
|
||||
|
||||
def plain_elevation(m):
|
||||
""""2,025 m (6,644 ft)", for a sentence or a text alternative."""
|
||||
return f"{words.fmt_int(m)} m ({words.fmt_int(m / words.M_PER_FT)} ft)"
|
||||
""""6,644 ft (2,025 m)", for a sentence or a text alternative."""
|
||||
return f"{words.fmt_int(words.m_to_ft(m))} ft ({words.fmt_int(m)} m)"
|
||||
|
||||
|
||||
def plain_length(km):
|
||||
return f"{words.fmt_km1(km)} km ({words.fmt_int(words.km_to_mi(km))} mi)"
|
||||
return f"{words.fmt_int(words.km_to_mi(km))} mi ({words.fmt_km1(km)} km)"
|
||||
|
||||
|
||||
def is_sea_level(point):
|
||||
@@ -204,7 +204,7 @@ LEFT, RIGHT, TOP, BOTTOM = 58, 14, 14, 40
|
||||
|
||||
def profile_svg(elev, loop=False):
|
||||
"""The profile as inline SVG, drawn now, not by a script. Both unit systems
|
||||
are drawn; CSS shows one, through the same len__km / len__mi pair and the
|
||||
are drawn; CSS shows one, through the same len__mi / len__km pair and the
|
||||
reader's unit preference as every length on the site."""
|
||||
profile = elev.get("profile") or []
|
||||
if len(profile) < 2:
|
||||
@@ -283,4 +283,4 @@ def profile_svg(elev, loop=False):
|
||||
return Markup(
|
||||
f'<svg class="elev-profile" viewBox="0 0 {W} {H}" role="img" '
|
||||
f'aria-label="{esc(summary_sentence(elev, loop))}" focusable="false">'
|
||||
f"{axis_group('km')}{axis_group('mi')}{axes}{line}{marks}</svg>")
|
||||
f"{axis_group('mi')}{axis_group('km')}{axes}{line}{marks}</svg>")
|
||||
Reference in new issue
Block a user