Skip to content

Commit

Permalink
Restore scroll magic IDs, add article credits to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kylerobertduncan committed Sep 11, 2023
1 parent 38de5c9 commit 751ab3f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions articles/yonge-subway-north-extension/article.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
So what is this project, why are we building it, and when can we get on board?
</p>

<p class="zoomIn">
<p id="zoomIn">
Read on for an explainer, and check our map visualization for an idea of what
it might look like when fully built.
</p>
Expand Down Expand Up @@ -73,7 +73,7 @@ <h3>Where will the extension go?</h3>
excavated tunnel tubes.
</p>

<p class="turnNorth">
<p id="turnNorth">
After passing Royal Orchard Blvd., the tunnels will swing east underground,
and then back to the north to pop above ground next to the GO Richmond Hill
Line. The subway will then continue a short distance before terminating at a
Expand Down Expand Up @@ -145,7 +145,7 @@ <h3>Where will the extension go?</h3>
</figcaption>
</figure>

<h3 class="resetView">What’s next for the project?</h3>
<h3 id="resetView">What’s next for the project?</h3>

<p>
Last week, various levels of government and transit authorities came together
Expand Down
2 changes: 1 addition & 1 deletion articles/yonge-subway-north-extension/article.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function addScenes() {
sceneList.forEach((s) => {
scenes.add(s.id, s.camera);
// add a scroll trigger for each scene
module.addScrollTrigger(`.${s.id}`, 0, () => {
module.addScrollTrigger(`#${s.id}`, 0, () => {
scenes.goTo(s.id);
s.function();
});
Expand Down
7 changes: 5 additions & 2 deletions articles/yonge-subway-north-extension/readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# North to Richmond Hill: Breaking down the 8-km Yonge subway extension

**Code and markup by Kyle Duncan**
This article uses Torontoverse's `SceneList` module to direct the user to particular elements of the map visualisation at key points in the article scroll.

It fetches geojson data for the existing and proposed sections of TTC Line 1, and also for two connected major bus and train lines, GO and Viva BRT, and adds those to the map. It programatically builds a legend, identifying the different lines, stops, transit hubs or portals, and grade levels of the proposed extension.

Finally, the particular scenes are created and connected to elements in the article that will be triggered using the [Scroll Magic](http://scrollmagic.io/) plugin.

---

_Article written by [Reece Martin](https://rmtransit.com/)_

0 comments on commit 751ab3f

Please sign in to comment.