- Go to the following github page: https://github.com/stefets42/website_optimization
- Click on the green "Clone or download" button
- Copy the address: https://github.com/stefets42/website_optimization.git
- Open the terminal
- Go to the folder where you want to copy this project
- Run the server:
- If you have Python 2, run: python -m SimpleHTTPServer 8000
- If you have Python 3, run: python -m http.server 8000
- On your browser, navigate to: http://localhost:8000/
- As there is a file called index.html in the directory, it should automatically show up
- If not, you should see the files in that directory listed: click on the index.html file and watch it load
- Inlined minified style.css and print.css
- Removed link to Open Sans fonts
- Added async to scripts
- Created randomPizzas variable
- Modified changePizzaSizes
- Replaced querySelectorAll by getElementsByClassName
- Removed the dot from the classname in the getElementsByClassName function
- Moved the scrollTop variable outside of the loop inside the updatePositions function
- Created the height variable
- Dynamically calculated the number of pizzas needed to fill the background
- Replaced document.querySelector by document.getElementById in the changeSliderLabel function
- Saved the array length in the for loop of the changePizzaSizes function
- Declared the pizzasDiv variable outside the loop
- Replaced document.querySelector by document.getElementById
- Moved the DOM call outside the for statement and saved it into a local variable
- Created 2 copies of pizzeria.jpg and optimized each of them for its unique purpose
- Detailed all steps required to successfully run the application locally