Navigation and custom sections (Developer Portfolio)
Add section: <title lines: each becomes an empty section after the skills, <section id="<slug" with <h2Title</h2. Slugs are lower case with runs of other characters turned into - and trimmed (About me → about-me); a repeated slug gets -2, -3… (Projects and Skills take their slugs first). Print a navigation bar as the very first line: <nav<a href="slug"Title</a | …</nav for every section in order.
Input: As before.
Output: As before.
Difficulty: Medium. Write your answer in the browser editor, run the examples, then submit it against hidden tests. Python and JavaScript are free; other languages are part of licode Club.
Hint
- Allocate ids with one function that remembers the slugs already used.