diff --git a/about.html b/about.html index 2e43a6b..2a0ebc7 100644 --- a/about.html +++ b/about.html @@ -13,7 +13,13 @@ -

About

+
+
+ +
+

About

+
+

InfoTren

diff --git a/base.css b/base.css index b8112d4..7123c97 100644 --- a/base.css +++ b/base.css @@ -71,6 +71,22 @@ footer .rsk { text-align: end; } +header { + display: flex; + align-items: center; +} + +header .left, header .right { + flex-grow: 1; + flex-basis: 0; +} + +header .back { + margin: 4px; + height: 24px; + cursor: pointer; +} + h1 { font-size: 17px; font-weight: 400; @@ -236,7 +252,7 @@ input { } body { - font-family: -apple-system, BlinkMacSystemFont, Ubuntu, 'Segoe UI', 'Roboto', Sans-Serif; + font-family: -apple-system, BlinkMacSystemFont, Ubuntu, 'Segoe UI', 'Roboto', Sans-Serif, sans-serif; } .tabs { diff --git a/common/back.js b/common/back.js index 909bf61..e61770d 100755 --- a/common/back.js +++ b/common/back.js @@ -1,8 +1,15 @@ window.addEventListener('load', function (e) { - this.document.body.addEventListener('keydown', function (e) { + document.body.addEventListener('keydown', function (e) { if (e.key == 'Backspace' && (e.target.tagName.toUpperCase() !== 'INPUT' || e.target.value.length === 0)) { e.preventDefault() window.history.back() } }) + + var backButton = document.getElementById('back-button') + if (backButton) { + backButton.addEventListener('click', function (e) { + window.history.back() + }) + } }) diff --git a/common/back.svg b/common/back.svg new file mode 100644 index 0000000..a5d7375 --- /dev/null +++ b/common/back.svg @@ -0,0 +1,83 @@ + + + + + + + + + + + + + Back + + + + + diff --git a/manifest.json b/manifest.json index a9bf2a4..19bef63 100644 --- a/manifest.json +++ b/manifest.json @@ -1,9 +1,10 @@ { + "id": "ro.dcdev.infotren.kai", "name": "Info Tren: Romanian Railways", "short_name": "Info Tren", "theme_color": "#0000ff", "background_color": "#ffffff", - "display": "minimal-ui", + "display": "standalone", "scope": "/", "start_url": "/", "shortcuts": [ @@ -12,6 +13,12 @@ "short_name": "My train", "description": "Find information about a train", "url": "/train.html" + }, + { + "name": "Station Departures/Arrivals", + "short_name": "Departures/Arrivals", + "description": "View the departures and arrivals boards of a station", + "url": "/station.html" } ] } diff --git a/station.html b/station.html index 1a055b6..d91292d 100644 --- a/station.html +++ b/station.html @@ -16,7 +16,13 @@ -

Station Information

+
+
+ +
+

Station Information

+
+

diff --git a/sw.js b/sw.js index 43b2484..3e99c77 100755 --- a/sw.js +++ b/sw.js @@ -1,4 +1,4 @@ -const VERSION = 'v16' +const VERSION = 'v17' const API_ORIGIN = 'https://scraper.infotren.dcdev.ro/' const API_TRAINS = `${API_ORIGIN}v3/trains` const API_STATIONS = `${API_ORIGIN}v3/stations` diff --git a/train.html b/train.html index 2dd7f66..827be93 100644 --- a/train.html +++ b/train.html @@ -16,7 +16,13 @@ -

Train Information

+
+
+ +
+

Train Information

+
+

diff --git a/view-station.html b/view-station.html index 2fc8bda..ce14a0a 100644 --- a/view-station.html +++ b/view-station.html @@ -18,7 +18,13 @@ -

View Station

+
+
+ +
+

View Station

+
+