A visitor can save trails with a star on every list row and a Save
button on each trail page. The list is kept in localStorage (lh-saved)
and shown at /saved/, with a map of only those trails and a link that
carries the list in its address (/saved/?t=id,id) so it can be
bookmarked or sent to another device or person. A list opened from a
link never overwrites the visitor's own; "Save these" adds to it. The
page is noindex and left out of the sitemap.
The miles/km switch and the auto/light/dark choice move from the footer
to the header on every page, beside a Saved link that shows the count.
They are hidden without JavaScript.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Trail maps now open on an outdoor style of our own, drawn on the same
OpenFreeMap tiles: hill shading and contour lines from the public
Terrain Tiles, woods, water, footpaths, and peaks with their heights.
Heights and contours follow the visitor's units. A switch on the map
goes back to the plain map and is remembered.
The home page's overview map is unchanged. If the elevation tiles or
the contour script fail, the map still loads without them.
The security policy allows the one elevation-tile path. The contour
add-on (maplibre-contour 0.1.1) is vendored with its licence, and the
elevation data is credited on the map, under it and in the footer.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A trail's page and its row in a list show its abbreviation when the
record has one, and nothing when it has none. Trails that share an
abbreviation both show it, and a search for it lists them all.
A trail with no logo and no abbreviation gets a small neutral mark in
its box, where letters used to be made up for it. "About this data"
lists the abbreviation with a link to the page where it was seen.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A trail's page lists its [[link]] entries under the main buttons, as
"More about this trail": the page's title, then who publishes it. The
official site stays the main button. A trail with no official site
gets its first link in that place, named by its publisher, and that
link is not repeated in the list.
The About page shows the README's new "Other lists of long trails"
section.
Tests updated for the new trail counts, and for there being no trail
left that spans a whole country.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The last change gave the filter panel overscroll-behavior: contain, to
stop a scroll inside the panel carrying on into the page. In Chromium
that rule also applies when the panel has nothing to scroll, so with the
mouse over the filters the wheel moved nothing at all and the trail
list could not be scrolled from there. Firefox, where the change was
tested, does not behave that way.
The rule is removed. Over the panel the wheel now scrolls the panel
while it has further to go, and the page otherwise. Checked in a
Chromium browser by turning the wheel over the panel at two window
heights, with "More filters" open and closed.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The filter panel beside the trail list stuck to the top of the window
only on tall windows, and once "More filters" made it taller than the
window its lower half could not be reached until the page ran out of
trails. It now stays beside the list at any window height and is never
taller than the window: when its fields do not fit, the panel scrolls
on its own, with "Clear search and filters" kept at its foot.
The extra filters were set in two columns inside that narrow panel at
some window widths, which wrapped every choice. Beside the list they
are now one column, and each choice is one line with its count on the
right. The GPX choices have shorter names, the Walking descriptions
moved to a tooltip, and Kind reads "Official (131)".
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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>
Sorting. Every list of trails has a "Sort by" menu: name, length, time
or climb, each in both directions. Where the list is a table, the
Trail, Length, Time and Climb heads sort on click and reverse on a
second click. Lists open by name, A to Z, except the four that are
defined by an order (the longest, under 100 km, a week or less, one to
two weeks). The chosen order is kept in the page address. The pages are
written in their default order, so they are right without JavaScript.
Maps. A trail with no track but a known start and end is drawn as a
dotted straight line between the two with a ring at each; one with a
single known point is drawn as a ring. They follow the filters, the
row highlight and the popup like any track, and that trail's own page
shows a map in place of the empty frame. The legend, the caption and
the popup say the dotted line is not the trail's path. It gives no
download, no GPX status and no elevation.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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>
web/ is a static site generator for the dataset, in Python's standard
library only. `python3 web/build.py --out _site` writes a page for each
of the 138 records, a finder on the home page with a map of the 85
lines, region and route indexes, and the repository's documents as
pages. Each line is offered as the record's GeoJSON and as a GPX
simplified to 5 m, with two archives of everything.
The site's name and address are set in web/site.toml: Long Hikes, at
https://longhikes.org. The dataset keeps its own name.
netlify.toml and web/static/_headers configure the Netlify site
(content types, download dispositions, caching, a content security
policy with no inline script). It is deployed with the Netlify CLI
from a local build, because Netlify cannot build from this forge.
MapLibre GL JS and the two typefaces are vendored under web/assets/;
map tiles come from OpenFreeMap. Tests: python3 -m unittest discover
-s web/tests (164).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>