Compare commits

...

2 commits

Author SHA1 Message Date
b134829e8c
Add arrow navigation to route page 2022-12-31 14:00:34 +02:00
c231586b6d
Fix a.no-custom-a 2022-12-31 13:57:20 +02:00
3 changed files with 8 additions and 8 deletions

View file

@ -162,7 +162,7 @@ p, ul {
margin: 0 8px;
}
p.link, a:not(.no-a-custom) {
p.link, a:not(.no-a-custom):not(.no-custom-a) {
font-size: 17px;
font-weight: 700;
}
@ -199,18 +199,18 @@ li.items:not(.disabled):hover:not(:focus) {
background-color: lightskyblue;
}
a:not(.no-a-custom) {
a:not(.no-a-custom):not(.no-custom-a) {
display: block;
padding: 8px;
color: black;
}
a.no-a-custom {
a.no-a-custom, a.no-custom-a {
color: inherit;
text-decoration: inherit;
}
a.inline:not(.no-a-custom) {
a.inline:not(.no-a-custom):not(.no-custom-a) {
display: inline;
padding: 2px;
}

View file

@ -225,7 +225,7 @@ function onItineraries(data) {
var departureLink = document.createElement('a')
departureHeading.appendChild(departureLink)
departureLink.textContent = train.from
departureLink.classList.add('no-custom-a')
departureLink.classList.add('no-custom-a', 'items')
var departureUrl = new URL('/view-station.html', window.location.origin)
departureUrl.searchParams.set('station', train.from)
departureLink.href = departureUrl.toString()
@ -237,7 +237,7 @@ function onItineraries(data) {
var trainLink = document.createElement('a')
trainP.appendChild(trainLink)
trainIdSpan(train.trainRank, train.trainNumber, trainLink)
trainLink.classList.add('no-custom-a')
trainLink.classList.add('no-custom-a', 'items')
var trainUrl = new URL('/view-train.html', window.location.origin)
trainUrl.searchParams.set('train', train.trainNumber)
trainLink.href = trainUrl.toString()
@ -256,7 +256,7 @@ function onItineraries(data) {
var arrivalLink = document.createElement('a')
arrivalHeading.appendChild(arrivalLink)
arrivalLink.textContent = train.to
arrivalLink.classList.add('no-custom-a')
arrivalLink.classList.add('no-custom-a', 'items')
var arrivalUrl = new URL('/view-station.html', window.location.origin)
arrivalUrl.searchParams.set('station', train.from)
arrivalLink.href = arrivalUrl.toString()

2
sw.js
View file

@ -1,4 +1,4 @@
const VERSION = 'v26'
const VERSION = 'v27'
const API_ORIGIN = 'https://scraper.infotren.dcdev.ro/'
const API_TRAINS = `${API_ORIGIN}v3/trains`
const API_STATIONS = `${API_ORIGIN}v3/stations`