This application is single page, meaning only one HTML file, the text content viewable by the user, is used. CSS and Javascript are used for styling and DOM manipulation."
There are 5 separate event listeners, one used for page load notification and the others for navigation.
Data was collected and compiled from web sources into the attached db.json file. The application is programmed so the user can navigate from, and back to the home page, the facts page, and the about me page. When the user clicks on the "Read the Facts" button, a list of 10 facts about ADHD, fetched from the attached db.json file, are iterated through using javascript and then rendered to the facts page.
The user can share their input (feedback, story, etc.) by populating a simple form that captures their data, posts it to the db.json file and renders their new comment to the page. This data will persist to the local JSON Server and is now viewable by the current user and to future users.
To run this application:
-
locate and click the "code" button
-
copy the SSH version of the provided link address.
-
create and name a local directory ("mkdir name-of-file") in your computer's terminal, then clone the repo to that file:
- type "get clone https://github.com/ROsmundson/adhd-spa"
- open your new directory and enter command "code ."
You now have access to the application files.
-
To make the page interactive , go to your terminal, navigate to the correct file, enter command "json-server -w db.json" into your terminal. You now have access to the facts database and the page is interactive.
-
type 'open index.html to view the application.