mojotech / stylus-redesign

The workgroup for Stylus' homepage redesign
https://github.com/corysimmons/stylus-redesign
GNU General Public License v3.0
2 stars 0 forks source link

[design] ScrollSpy #2

Closed corysimmons closed 8 years ago

corysimmons commented 10 years ago

I'm redoing Jeet's docs right now and really love the ScrollSpy effect from Bootstrap and LESS docs. I definitely think this should be part of the design.

kizu commented 10 years ago

Yep, this is a nice effect. There are two things to improve in it, btw: we could update the page's title and (maybe) update the url using history API.

corysimmons commented 10 years ago

@kizu I agree. I'm using https://github.com/renettarenula/anchorific.js/ on it. It maintains appropriate links, but I had to disable click events on the anchors to get the local scroll effect.

It might work as you're describing. I haven't had a chance to test it or look at the code.

If it doesn't work that way, I'm not terribly familiar with the History API. I'd tell you I'd learn/do it this weekend but I'm going to be swamped as it is. So if it's trivial to a JS guru like yourself, maybe you could hook @renettarenula up with a PR? The rest of the plugin seems solid.