Add notes

This commit is contained in:
Fred Boniface
2023-06-08 11:37:26 +01:00
parent 3b322d8d6e
commit eb0dea084a
3 changed files with 24 additions and 21 deletions

View File

@@ -34,6 +34,11 @@ async function parse(data) {
}
async function displayOptions(data) {
// for (service of data) {
// create a button showing first departure time
// alongside the TOC, the origin and destination.
// maybe implement an accordion?
// }
return data
}
@@ -63,10 +68,9 @@ async function displayOne(object) {
stopRows += await createPublicStopTableRow(stop)
}
const displayBox = document.getElementById('train_data')
const titleImg = document.getElementById('titleimg')
displayBox.innerHTML = ''
displayBox.insertAdjacentHTML('beforeend', dataTableHead + stopRows + dataTableClose)
displayBox.style = 'display:block;'
titleImg.style = 'width:150px;height:98px;padding-bottom:0;'
}
async function createPublicStopTableRow(stop) {
@@ -88,11 +92,4 @@ async function createPublicStopTableRow(stop) {
<td id='public_dep'>${public_dep}</td>
</tr>
`
}
async function reset() {
const titleImg = document.getElementById('titleimg')
const displayBox = document.getElementById('train_data')
titleImg.style = ''
displayBox.innerHTML = ''
}