Node-Study-Guide / openjs-nodejs-application-developer-study-guide

Resources and notes to help prepare for the Node JS Application Developer (JSNAD) certification exam
http://nodestudyguide.com/
81 stars 17 forks source link

Track progress #17

Closed donovanh closed 5 years ago

donovanh commented 5 years ago

This adds some logic to keep track (using localhost) of a user's progress. I don't know if we need to go as far as adding external database / user authentication. This is a simple approach that keeps track of which topics have been covered using their URL as identifier.

It's handled in the post template so won't need added to any posts, as long as they state the layout: post.njk in the front matter.

progress 2019-11-11 19_14_35

(We should to not to change urls).

Future improvement might be to add a percentage progress bar on the home page or footer.

donovanh commented 5 years ago

I think I could adapt this a bit to handle sections with multiple pages. We could set a front matter key for the section ID - and if we set it to the link that corresponds with the menu url (e.g. /buffers-and-streams/ then the button within the section regardless of sup-page, would mark the entire section done.

Then again maybe this isn't granular enough and each section needs it's own percent-completed amount. In which case we'd need to extend the topics object in _data to include sub-pages and then work that into the percentage completed.