diff --git a/js/train-detail.js b/js/train-detail.js
index 0596262..1e8d1ab 100644
--- a/js/train-detail.js
+++ b/js/train-detail.js
@@ -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) {
${public_dep} |
`
-}
-
-async function reset() {
- const titleImg = document.getElementById('titleimg')
- const displayBox = document.getElementById('train_data')
- titleImg.style = ''
- displayBox.innerHTML = ''
}
\ No newline at end of file
diff --git a/styles/train-detail.css b/styles/train-detail.css
index 187e18b..c17be98 100644
--- a/styles/train-detail.css
+++ b/styles/train-detail.css
@@ -1,16 +1,23 @@
+.titleimg {
+ width: 150px;
+ height: 98px;
+ padding-bottom: 0;
+}
+
#data_headcode {
- color: var(--second-text-color);
- font-size: 25px;
- font-weight:bolder;
+ color: var(--second-text-color);
+ font-size: 25px;
+ font-weight: bolder;
+ margin-bottom: 5px
}
-
+
#data_piscode {
- color: var(--second-text-color);
+ margin: 5px;
+ color: var(--second-text-color)
}
-
+
#data_table {
- color: var(--second-text-color);
- width: 200px;
- margin: auto;
-}
-
\ No newline at end of file
+ color: var(--second-text-color);
+ width: 200px;
+ margin: auto
+}
\ No newline at end of file
diff --git a/train-detail.html b/train-detail.html
index 14070be..f091034 100644
--- a/train-detail.html
+++ b/train-detail.html
@@ -38,7 +38,6 @@