yui/pure-site — pull request #202 by tilomitra (2014-02-11 02:56:41+00:00)
Title: Add a affixed + scrollspy sidebar to content pages for easy navigation

As I was writing the [Tools](https://github.com/yui/pure-site/pull/201) page, I realized that pages on our site tend to get long. We need some page-level navigation.

This pull request adds an affixed sidebar to every page, and populates it with all the `{{sectionHeading}}` contents. The sidebar is only shown for tablets and up, since phones don't have the screen real-estate for it. Nothing really changes for pages that don't have any section headings (like the Home page).

If you have a `{{sectionHeading}}` and you don't want to include it on the sidebar (for example, the Layouts page), you can add a `ignoreSection` attribute to it. (ex: `{{sectionHeading "Common Layouts" ignoreSection=true}}`).

I'm using the yui-scrollspy and yui-affix plugin written by @juandopazo to make this happen. :smiley:

Here's what it looks like:
![](http://f.cl.ly/items/1R3D160m3W283d1k1L0H/Screen%20Shot%202014-02-10%20at%209.54.56%20PM.png)