teotimepacreau / Dynamic-Table-of-content-Day16-Of-100DaysOfCode

Building a dynamic table of content and title generator for a pirate story built with VanillaJS, CSS, HTML

Home Page:https://teotimepacreau.github.io/Dynamic-Table-of-content-Day16-Of-100DaysOfCode/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dynamically generated Table Of Content

Dynamically generated Table Of Content

Project goals

  • Build a dynamic TOC by retrieving h2 ID's and then set anchor link (innerHTML, textContent, Template Literals)

  • Missing IDS are intentionnally set in, so I added function to set custom ID's base on the title of the h2 thanks to object keys (replaceAll(' ', '-').toLowerCase())

  • User can generate a title for the story with the input (parentElement, nextElementSibling, createElement)

🛠️

VanillaJS, CSS, HTML

About

Building a dynamic table of content and title generator for a pirate story built with VanillaJS, CSS, HTML

https://teotimepacreau.github.io/Dynamic-Table-of-content-Day16-Of-100DaysOfCode/


Languages

Language:HTML 55.5%Language:CSS 30.3%Language:JavaScript 14.2%