diff --git a/about.html b/about.html index 15f69e2..300c57f 100644 --- a/about.html +++ b/about.html @@ -6,7 +6,12 @@ content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> - Barrierefreie Aufzugs-Liste | Was ist das? + + + + + + hvvstuhl.de | Was ist das?

Barrierefreie Aufzugs-Liste

@@ -25,18 +30,19 @@
-
-

Worum geht's hier?

-

- Diese Seite ermöglicht einen barrierefreien Zugang zu den Aufzugs informationen im HVV. - Der HVV selbst zeigt diese Informationen nur auf einer (vor allem ohne Ortskenntnis) schwer zu navigierenden Karte an: - HVV Webseite zu Aufzügen -

-

- Dieses Projekt wurde unter AGPL-3 entwickelt und ist hier zu finden: - git.kritzl.dev -

-
+
+

Worum geht's hier?

+

+ Diese Seite ermöglicht einen barrierefreien Zugang zu den Aufzugs-Informationen im HVV. + Der HVV selbst zeigt diese Informationen nur auf einer (vor allem ohne Ortskenntnis) schwer zu navigierenden + Karte an: + HVV Webseite zu Aufzügen +

+

+ Dieses Projekt wurde unter der AGPL-3 Lizenz entwickelt und ist hier zu finden: + git.kritzl.dev +

+
\ No newline at end of file diff --git a/elevators.js b/elevators.js index 309ad56..4908cfb 100644 --- a/elevators.js +++ b/elevators.js @@ -232,7 +232,8 @@ async function loadOsmData() { if (!internalData.stations[stationIndex].hasOwnProperty('coordinates')) { const substitute = substituteData.filter(subs => subs.name === internalData.stations[stationIndex].name) - if (substitute.length && substitute.hasOwnProperty('coordinates')) { + console.log(substitute) + if (substitute.length && substitute[0].hasOwnProperty('coordinates')) { internalData.stations[stationIndex]['coordinates'] = substitute[0].coordinates; } } @@ -316,9 +317,23 @@ function sortStations(stationA, stationB) { return 0; } +function sortInt(valueA, valueB) { + const a = parseInt(valueA) + const b = parseInt(valueB) + if (a < b) { + return -1; + } + if (a > b) { + return 1; + } + + // names must be equal + return 0; +} + function sortStationsByDistance(stationA, stationB) { - const distanceA = stationA.distance; // ignore upper and lowercase - const distanceB = stationB.distance; // ignore upper and lowercase + const distanceA = stationA.distance ?? 0; // ignore upper and lowercase + const distanceB = stationB.distance ?? 0; // ignore upper and lowercase if (distanceA < distanceB) { return -1; } @@ -415,7 +430,9 @@ function renderData(location = null) { } } - stations = stations.sort(sortStationsByDistance); + if (sortByDistance) { + stations = stations.sort(sortStationsByDistance); + } for (const stationIndex in stations) { const station = stations[stationIndex]; @@ -478,7 +495,7 @@ function renderData(location = null) { osmTemplate += `
Beschreibung
${node.tags['description']}
`; } if (node.tags.hasOwnProperty('level')) { - osmTemplate += `
Ebenen
${node.tags['level'].split(';').sort().join(', ')}
`; + osmTemplate += `
Ebenen
${node.tags['level'].split(';').sort(sortInt).join(', ')}
`; } if (node.tags.hasOwnProperty('wheelchair')) { osmTemplate += `
Rollstühle
${node.tags['wheelchair'] === 'yes' ? 'Ja' : 'Nein'}
`; @@ -551,7 +568,11 @@ function renderData(location = null) {
${station.types.sort().map(t => `${t}`).join('')}
- ${typeof station.distance !== 'undefined' ? `
${Math.round(station.distance / 100) / 10}
km
` : ''} + ${sortByDistance + ? typeof station.distance !== 'undefined' + ? `
${Math.round(station.distance / 100) / 10}
km
` + : '
? km
' + : ''}

${station.name}

@@ -646,12 +667,13 @@ document.querySelector('#stationsNearMe') if (geolocationPermission !== 'granted') { allowGeolocation(); } else { + sortByDistance = e.target.ariaPressed = true; + // If geolocation is already set. // If not the location watcher will re-render our data. if (geolocation !== null) { renderData(geolocation) } - sortByDistance = e.target.ariaPressed = true; } } } else { diff --git a/icons/192.png b/icons/192.png index cefddc9..a329713 100644 Binary files a/icons/192.png and b/icons/192.png differ diff --git a/icons/512-maskable.png b/icons/512-maskable.png index 7cc4bf2..6122f35 100644 Binary files a/icons/512-maskable.png and b/icons/512-maskable.png differ diff --git a/icons/512-transparent.png b/icons/512-transparent.png index 4ca9254..c6eed8c 100644 Binary files a/icons/512-transparent.png and b/icons/512-transparent.png differ diff --git a/icons/512.png b/icons/512.png index fc7c100..79acdc4 100644 Binary files a/icons/512.png and b/icons/512.png differ diff --git a/icons/favicon-maskable.svg b/icons/favicon-maskable.svg index 922562d..cb8cda2 100644 --- a/icons/favicon-maskable.svg +++ b/icons/favicon-maskable.svg @@ -8,9 +8,43 @@ version="1.1" id="svg1" xml:space="preserve" + inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)" + sodipodi:docname="favicon_source.svg" + inkscape:export-filename="favicon-transparent.png" + inkscape:export-xdpi="130.048" + inkscape:export-ydpi="130.048" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" - xmlns:svg="http://www.w3.org/2000/svg"> + style="fill:#000000;fill-opacity:1;stroke-width:0.0824873" /> diff --git a/icons/favicon.svg b/icons/favicon.svg index 6c0a019..4222b18 100644 --- a/icons/favicon.svg +++ b/icons/favicon.svg @@ -8,16 +8,51 @@ version="1.1" id="svg1" xml:space="preserve" + inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)" + sodipodi:docname="favicon_source.svg" + inkscape:export-filename="favicon-transparent.png" + inkscape:export-xdpi="130.048" + inkscape:export-ydpi="130.048" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" - xmlns:svg="http://www.w3.org/2000/svg"> + style="fill:#ffffff;fill-opacity:1;stroke-width:0.0824873" /> diff --git a/icons/favicon_source.svg b/icons/favicon_source.svg new file mode 100644 index 0000000..028ef75 --- /dev/null +++ b/icons/favicon_source.svg @@ -0,0 +1,85 @@ + + + + diff --git a/index.html b/index.html index 863abc6..2099374 100644 --- a/index.html +++ b/index.html @@ -10,8 +10,8 @@ - - Barrierefreie Aufzugs-Liste + + hvvstuhl.de

Barrierefreie Aufzugs-Liste

@@ -37,15 +37,14 @@
+
-