Skip to content

Commit

Permalink
Update timetablepage template for maps
Browse files Browse the repository at this point in the history
  • Loading branch information
brendannee committed Sep 7, 2024
1 parent 0168228 commit 5c0d14c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed
- Fix path to template folder
- Update timetablepage template for maps

## [2.9.2] - 2024-09-06

Expand Down
7 changes: 4 additions & 3 deletions views/default/timetablepage.pug
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ include formatting_functions.pug
if config.showCalendarExceptions && timetable.calendarDates.excludedDates.length
.excluded-dates= `${config.serviceNotProvidedOnText}: ${timetable.calendarDates.excludedDates.join(', ')}`

script.
const { geojsons, tripIds, routes, stops, gtfsRealtimeUrls } = !{JSON.stringify(prepareMapData(timetablePage, config))};
createMaps();
if config.showMap
script.
const { geojsons, tripIds, routes, stops, gtfsRealtimeUrls } = !{JSON.stringify(prepareMapData(timetablePage, config))};
createMaps();
4 changes: 2 additions & 2 deletions views/default/timetablepage_full.pug
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ block extraHeader
script(src=`${config.assetPath}js/timetable-menu.js`)

if config.showMap
link(href="https://api.mapbox.com/mapbox-gl-js/v3.6.0/mapbox-gl.css" rel="stylesheet")

if config.hasGtfsRealtime
script(src=`${config.assetPath}js/pbf.js`)
script(src=`${config.assetPath}js/gtfs-realtime.browser.proto.js`)
Expand All @@ -17,8 +19,6 @@ block extraHeader
mapboxgl.accessToken = '#{config.mapboxAccessToken}';
script(src=`${config.assetPath}js/timetable-map.js`)

link(href="https://api.mapbox.com/mapbox-gl-js/v3.6.0/mapbox-gl.css" rel="stylesheet")

link(rel="stylesheet" href=`${config.assetPath}css/timetable_styles.css`)
if config.outputFormat === 'pdf'
link(rel="stylesheet" href=`${config.assetPath}css/timetable_pdf_styles.css`)
Expand Down

0 comments on commit 5c0d14c

Please sign in to comment.