gtfs-to-html 2.5.9 → 2.6.1

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.
@@ -4,9 +4,9 @@ include formatting_functions.pug
4
4
  .timetable-page(class=`menu-type-${config.menuType}`)
5
5
  .container.mx-4(class="md:mx-auto")
6
6
  if config.showRouteTitle
7
- h1.timetable-page-label.text-2xl.pt-4.flex.items-center
7
+ h1.timetable-page-label.text-2xl.pt-4.flex.items-center.gap-2
8
8
  each route in _.uniqBy(_.flatMap(timetablePage.consolidatedTimetables, timetable => timetable.routes), 'route_id')
9
- .route-color-swatch-large.mr-2.flex-none(style=`background-color: #${route.route_color}; color: #${route.route_text_color}`)= route.route_short_name || ''
9
+ .route-color-swatch-large.flex-none(style=`background-color: ${formatRouteColor(route)}; color: ${formatRouteTextColor(route)};`)= route.route_short_name || ''
10
10
  div= timetablePage.timetable_page_label
11
11
  if config.effectiveDate
12
12
  .effective-date.text-gray-600.mb-2= `Effective ${config.effectiveDate}`
@@ -16,11 +16,12 @@ include formatting_functions.pug
16
16
  each timetable in timetablePage.consolidatedTimetables
17
17
  .timetable.mb-10(id=`timetable_id_${formatHtmlId(timetable.timetable_id)}` data-day-list=timetable.dayList data-direction-name=timetable.direction_name data-timetable-id=timetable.timetable_id data-direction-id=timetable.direction_id data-route-id=timetable.route_ids.join('_'))
18
18
  if config.showRouteTitle
19
- h2.text-xl= `${timetable.timetable_label} | ${timetable.dayListLong}`
20
- each note in getNotesForTimetableLabel(timetable.notes)
21
- include timetable_note_symbol.pug
22
- if timetable.service_notes !== null
23
- .service-notes= timetable.service_notes
19
+ .mb-2
20
+ h2.text-xl= `${timetable.timetable_label} | ${timetable.dayListLong}`
21
+ each note in getNotesForTimetableLabel(timetable.notes)
22
+ include timetable_note_symbol.pug
23
+ if timetable.service_notes !== null
24
+ .service-notes= timetable.service_notes
24
25
 
25
26
  if config.showMap
26
27
  .map(id=`map_timetable_id_${formatHtmlId(timetable.timetable_id)}`)
@@ -55,8 +56,8 @@ include formatting_functions.pug
55
56
  each note in _.uniqBy(timetable.notes, 'note_id')
56
57
  .note(id=`note-${timetable.timetable_id}-${note.note_id}`)= `${note.symbol} = ${note.note}`
57
58
 
58
- if timetable.calendarDates.includedDates.length
59
+ if config.showCalendarExceptions && timetable.calendarDates.includedDates.length
59
60
  .included-dates= `${config.serviceProvidedOnText}: ${timetable.calendarDates.includedDates.join(', ')}`
60
61
 
61
- if timetable.calendarDates.excludedDates.length
62
+ if config.showCalendarExceptions && timetable.calendarDates.excludedDates.length
62
63
  .excluded-dates= `${config.serviceNotProvidedOnText}: ${timetable.calendarDates.excludedDates.join(', ')}`
@@ -46,6 +46,7 @@ All files starting with `config*.json` are .gitignored - so you can create multi
46
46
  | [`serviceNotProvidedOnText`](#servicenotprovidedontext) | string | The text used to label days where service is not provided. |
47
47
  | [`serviceProvidedOnText`](#serviceprovidedontext) | string | The text used to label days where service is provided. |
48
48
  | [`showArrivalOnDifference`](#showarrivalondifference) | float | Defines a difference between departure and arrival, on which arrival column/row will be shown. |
49
+ | [`showCalendarExceptions`](#showcalendarexecptions) | boolean | Whether or not to show a list of calendar exceptions below each timetable. |
49
50
  | [`showMap`](#showmap) | boolean | Whether or not to show a map of the route on the timetable. |
50
51
  | [`showOnlyTimepoint`](#showonlytimepoint) | boolean | Whether or not all stops should be shown, or only stops with a `timepoint` value in `stops.txt`. |
51
52
  | [`showRouteTitle`](#showroutetitle) | boolean | Whether or not to show the route title at the top of the timetable page. |
@@ -414,6 +415,14 @@ gtfsToHtml(config);
414
415
  "showArrivalOnDifference": 0.2
415
416
  ```
416
417
 
418
+ ### showCalendarExceptions
419
+
420
+ \{Boolean\} Whether or not to show a list of calendar exceptions below each timetable. Uses dates defined in calendar_dates.txt. Defaults to `true`.
421
+
422
+ ```json
423
+ "showCalendarExceptions": true
424
+ ```
425
+
417
426
  ### showMap
418
427
 
419
428
  \{Boolean\} Whether or not to show a map of the route on the timetable. Defaults to `false`.
package/www/package.json CHANGED
@@ -9,8 +9,8 @@
9
9
  "deploy": "docusaurus deploy"
10
10
  },
11
11
  "dependencies": {
12
- "@docusaurus/core": "^3.1.0",
13
- "@docusaurus/preset-classic": "^3.1.0",
12
+ "@docusaurus/core": "^3.1.1",
13
+ "@docusaurus/preset-classic": "^3.1.1",
14
14
  "clsx": "^2.1.0",
15
15
  "react": "^18.2.0",
16
16
  "react-dom": "^18.2.0"