Give every page of trails one layout, with the map beside the rows, and set no tables
Every page that shows a set of trails (home, places, lists, Routes, authors, Triple Crown, rankings, newest) has the same layout: the trails as rows with their map beside them from 900 px wide up, and a short map band above the rows when narrower. The home page gets its headline back on the contour ground, with the ten lists as one line of links. A trail page has its actions in its head and the map in a fixed frame beside At a glance. No page sets a table: every set of trails is the standard trail row, and other sets are rows in the same language. Route authors' names link to their pages from route rows and trail pages, the Routes page says how many routes by how many authors, and the Lists index has a Route authors entry. No trail's facts changed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
59f912c47c
commit
298f1b9fd9
28 files changed
+843
-541
No files matched your search
@@ -1346,6 +1346,8 @@
|
||||
'time-asc': 'time-desc', 'time-desc': 'time-asc', 'climb-desc': 'climb-asc', 'climb-asc': 'climb-desc' };
|
||||
/* The Saved page's list also has the order saved (rows numbered in data-order by section 1c). */
|
||||
if (savedPage) SORT_KEYS.saved = 1;
|
||||
/* A ranking (/numbers/) has its rank as an order (rows numbered in data-rank by the page). */
|
||||
if (document.querySelector('.entry[data-rank]')) SORT_KEYS.rank = 1;
|
||||
|
||||
function normalizeSortKey(value, dflt) {
|
||||
if (SORT_KEYS[value]) return value;
|
||||
@@ -1363,6 +1365,7 @@
|
||||
var bo = b.dataset.order ? Number(b.dataset.order) : Infinity;
|
||||
return cmpNum(ao, bo) || cmpStr(an, bn);
|
||||
}
|
||||
if (key === 'rank') return cmpNum(Number(a.dataset.rank || Infinity), Number(b.dataset.rank || Infinity));
|
||||
if (key === 'name') return cmpStr(an, bn);
|
||||
if (key === 'name-desc') return cmpStr(bn, an);
|
||||
if (key === 'climb-desc' || key === 'climb-asc') {
|
||||
@@ -1501,6 +1504,15 @@
|
||||
if (toggle) toggle.setAttribute('aria-expanded', open ? 'true' : 'false');
|
||||
}
|
||||
if (toggle) toggle.addEventListener('click', function () { showPanels(!panels.hasAttribute('data-open')); });
|
||||
/* The open panels lie over the rows: Show the trails, Escape, or a click outside the form closes them. */
|
||||
var done = form.querySelector('.filters__done');
|
||||
if (done) done.addEventListener('click', function () { showPanels(false); if (toggle) toggle.focus(); });
|
||||
form.addEventListener('keydown', function (e) {
|
||||
if (e.key === 'Escape' && panels && panels.hasAttribute('data-open')) { showPanels(false); if (toggle) toggle.focus(); }
|
||||
});
|
||||
document.addEventListener('click', function (e) {
|
||||
if (panels && panels.hasAttribute('data-open') && !form.contains(e.target)) showPanels(false);
|
||||
});
|
||||
|
||||
/* The count is the one live region. Keep it quiet through the first
|
||||
application below so nothing is announced on load, and write to it
|
||||
|
||||
Reference in new issue
Block a user