gtfs-to-html 2.10.1 → 2.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/index.js +5 -7
- package/dist/app/index.js.map +1 -1
- package/dist/bin/gtfs-to-html.js +5 -7
- package/dist/bin/gtfs-to-html.js.map +1 -1
- package/dist/index.js +5 -7
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
- package/views/default/css/timetable_styles.css +24 -12
- package/views/default/formatting_functions.pug +19 -0
- package/views/default/timetable_horizontal.pug +2 -1
- package/views/default/timetable_vertical.pug +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gtfs-to-html",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Build human readable transit timetables as HTML, PDF or CSV from GTFS",
|
|
6
6
|
"keywords": [
|
|
@@ -52,18 +52,18 @@
|
|
|
52
52
|
"archiver": "^7.0.1",
|
|
53
53
|
"cli-table": "^0.3.11",
|
|
54
54
|
"csv-stringify": "^6.5.1",
|
|
55
|
+
"dompurify": "^3.2.0",
|
|
55
56
|
"express": "^5.0.1",
|
|
56
|
-
"gtfs": "^4.15.
|
|
57
|
+
"gtfs": "^4.15.6",
|
|
57
58
|
"gtfs-realtime-pbf-js-module": "^1.0.0",
|
|
58
|
-
"insane": "^2.6.2",
|
|
59
59
|
"js-beautify": "^1.15.1",
|
|
60
60
|
"lodash-es": "^4.17.21",
|
|
61
|
-
"marked": "^
|
|
61
|
+
"marked": "^15.0.0",
|
|
62
62
|
"moment": "^2.30.1",
|
|
63
63
|
"pbf": "^4.0.1",
|
|
64
64
|
"pretty-error": "^4.0.0",
|
|
65
65
|
"pug": "^3.0.3",
|
|
66
|
-
"puppeteer": "^23.
|
|
66
|
+
"puppeteer": "^23.7.1",
|
|
67
67
|
"sanitize-filename": "^1.6.3",
|
|
68
68
|
"sqlstring": "^2.3.3",
|
|
69
69
|
"timer-machine": "^1.1.0",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@types/js-beautify": "^1.14.3",
|
|
80
80
|
"@types/lodash-es": "^4.17.12",
|
|
81
81
|
"@types/morgan": "^1.9.9",
|
|
82
|
-
"@types/node": "^
|
|
82
|
+
"@types/node": "^22.9.0",
|
|
83
83
|
"@types/pug": "^2.0.10",
|
|
84
84
|
"@types/puppeteer": "^7.0.4",
|
|
85
85
|
"@types/sanitize-filename": "^1.6.3",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"husky": "^9.1.6",
|
|
90
90
|
"lint-staged": "^15.2.10",
|
|
91
91
|
"prettier": "^3.3.3",
|
|
92
|
-
"tsup": "^8.3.
|
|
92
|
+
"tsup": "^8.3.5",
|
|
93
93
|
"typescript": "^5.6.3"
|
|
94
94
|
},
|
|
95
95
|
"engines": {
|
|
@@ -250,11 +250,18 @@ a:hover {
|
|
|
250
250
|
font-size: 0.875rem;
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
.timetable-page .timetable .
|
|
254
|
-
text-align: center;
|
|
253
|
+
.timetable-page .timetable .table-horizontal th {
|
|
255
254
|
line-height: 1.15;
|
|
256
255
|
}
|
|
257
256
|
|
|
257
|
+
.timetable-page .timetable .trip-header {
|
|
258
|
+
text-align: center;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.timetable-page .timetable .trip-name {
|
|
262
|
+
display: inline-block;
|
|
263
|
+
}
|
|
264
|
+
|
|
258
265
|
.timetable-page .timetable .run-footer {
|
|
259
266
|
text-align: center;
|
|
260
267
|
}
|
|
@@ -543,19 +550,24 @@ a:hover {
|
|
|
543
550
|
}
|
|
544
551
|
|
|
545
552
|
.timetable-page .map-legend {
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
553
|
+
padding: 0 10px;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
@media screen and (min-width: 768px) {
|
|
557
|
+
.timetable-page .map-legend {
|
|
558
|
+
padding: 10px;
|
|
559
|
+
background-color: #fff;
|
|
560
|
+
border-radius: 3px;
|
|
561
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
562
|
+
position: absolute;
|
|
563
|
+
left: 10px;
|
|
564
|
+
bottom: 35px;
|
|
565
|
+
z-index: 1;
|
|
566
|
+
}
|
|
555
567
|
}
|
|
556
568
|
|
|
557
569
|
.timetable-page .map-legend .legend-item {
|
|
558
|
-
padding:
|
|
570
|
+
padding: 4px 0;
|
|
559
571
|
display: flex;
|
|
560
572
|
flex-direction: row;
|
|
561
573
|
align-items: start;
|
|
@@ -118,3 +118,22 @@
|
|
|
118
118
|
return ''
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
+
function formatTripName(trip, index, timetable) {
|
|
122
|
+
let tripName;
|
|
123
|
+
if (timetable.routes.length > 1) {
|
|
124
|
+
tripName = trip.route_short_name;
|
|
125
|
+
} else if (timetable.orientation === 'horizontal') {
|
|
126
|
+
// Only add this to horizontal timetables.
|
|
127
|
+
if (trip.trip_short_name) {
|
|
128
|
+
tripName = trip.trip_short_name;
|
|
129
|
+
} else {
|
|
130
|
+
tripName = `Run #${index + 1}`;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if (timetableHasDifferentDays(timetable)) {
|
|
135
|
+
tripName += ` ${trip.dayList}`;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return tripName;
|
|
139
|
+
}
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
tr
|
|
10
10
|
th.stop-header(scope="col") Stop
|
|
11
11
|
each trip, idx in timetable.orderedTrips
|
|
12
|
-
th.
|
|
12
|
+
th.trip-header(scope="col")
|
|
13
|
+
.trip-name= formatTripName(trip, idx, timetable)
|
|
13
14
|
each note in getNotesForTrip(timetable.notes, trip)
|
|
14
15
|
include timetable_note_symbol.pug
|
|
15
16
|
if timetable.frequencies && !timetable.frequencyExactTimes
|
|
@@ -48,7 +48,8 @@
|
|
|
48
48
|
each trip, idx in timetable.orderedTrips
|
|
49
49
|
tr.trip-row(id=`trip_id_${formatHtmlId(trip.trip_id)}`)
|
|
50
50
|
if timetableHasTripNotes || timetable.routes.length > 1
|
|
51
|
-
td.trip-notes
|
|
51
|
+
td.trip-notes
|
|
52
|
+
.trip-name= formatTripName(trip, idx, timetable)
|
|
52
53
|
each note in getNotesForTrip(timetable.notes, trip)
|
|
53
54
|
include timetable_note_symbol.pug
|
|
54
55
|
if timetable.has_continues_from_route
|