This is the project from the second course in the Nanodegree, using JavaScript (ES6) to interact with the DOM. The goal is to make an interactive navigation bar. It has the following features:
- Interactive build: it builds on DOM load, for every section on the document.
- Section highlight: it has a different style to show which section the user is viewing.
- Auto-hide: it hides when scrolling stop as to not disturb the reading, and shows again when needed (hover or scrolling).
- Back to top button: shows only when the user hits the bottom of the page, and scrolls to the top, hiding itself again.
- Collapsible sections: the sections hide or unhide when their header is clicked.
You can see it in action here. Here is a screenshot:
This code is licensed under the MIT license (see file in the repo)
The text is from Nietzsche's On Truth and Lie in an Extra-Moral Sense, and it is taken from this PDF, which was linked on Wikipedia. There is no copyright notice, but I consider this fair use, as it's for educational purposes.