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>
This commit is contained in:
1 parent
c42cfbbe73
commit
abfbeb00bd
77 files changed
+9287
No files matched your search
@@ -0,0 +1,13 @@
|
||||
/* Runs in <head>, before first paint: marks that JavaScript runs, and applies the
|
||||
reader's saved theme and length order. Saved by app.js (footer switches). */
|
||||
(function () {
|
||||
'use strict';
|
||||
var root = document.documentElement;
|
||||
root.classList.add('js');
|
||||
try {
|
||||
var theme = localStorage.getItem('lh-theme');
|
||||
var units = localStorage.getItem('lh-units');
|
||||
if (theme === 'light' || theme === 'dark') root.dataset.theme = theme;
|
||||
if (units === 'mi') root.dataset.units = 'mi';
|
||||
} catch (e) { /* storage blocked: defaults apply */ }
|
||||
})();
|
||||
Reference in new issue
Block a user