A project completed for the DECI Web Development Track.
This project transforms a static landing page into a fully interactive and dynamic web page.
The page automatically generates navigation links based on existing sections, highlights the section currently visible to the user, saves comments locally, and provides smooth interactions such as a disappearing navigation bar and a scroll-to-top button.
- The JavaScript file scans all
<section>elements and creates matching navigation links. - Whenever a new section is added to the HTML, the navigation bar updates automatically.
Two methods were implemented to detect which section is currently in the viewport:
- Bounding rectangle checks.
- Intersection Observer API (final method used).
The visible section is highlighted with an active class.
- On large screens, the navbar hides when the user stops scrolling.
- Reappears when the mouse moves to the top of the page or on hover.
- On small screens, a hamburger menu toggles the navigation visibility.
- Users can submit comments including:
- Name
- Comment text
- Input validation is applied.
- Comments are stored using
localStorage, allowing them to persist between page reloads.
- Appears when the user scrolls down.
- Returns to the top smoothly when clicked.
. ├── index.html ├── css/ │ ├── styles.css │ └── favicon.ico └── js/ └── app.js
- Download or clone the project.
- Open
index.htmldirectly in your browser. - Add more
<section>elements to test the dynamic behavior.
No server setup is required.
- DOM Manipulation
- Handling scroll events
- Intersection Observer API
- Responsive behavior with JavaScript
- Form validation
- Using Local Storage
- Building clean interactive UI components
This project was originally developed as part of DECI coursework, where the main objective was to convert a static landing page into a fully dynamic and user-interactive website using vanilla JavaScript.