Starter code taken from udacity fend.
It uses javascript to dynamically create navbar links based on the content, when a section is in the viewport it show the active state of that section.
During the scrolling the navbar is automatically hidden and showed according the direction of the scrolling.