The source code is in the src
folder, while the production code(after minifying css and js files) is in the dist
folder.
- Check out the repository.
- Run a local server.
$> cd /path/to/your-project-folder
$> python -m SimpleHTTPServer 8080
- Open a browser and visit
localhost:8000
.
Here is a list explaining what I've done to get a higher score for index.html
.
- Resize the picture:
views/images/pizzeria.jpg
. Now it has two versions, bigger one(633 pixels * 474 pixels) forpizza.html
, smaller one(100 pixels * 75 pixels) forindex.html
. - Minify the pictures, using TinyPng.
- Load google fonts asychronously using web font loader.
- For css:
- Use media queries for print situations(
media="print"
). - Use
media:none
to remove render blocking css filestyle.css
. - inline css for mobile styles.
- Use media queries for print situations(
- Add
async
to scripts. - Minify css files and js files using gulp and the relative code is in
dist
folder.
- Modify the code in function
updatePositions
, get thescrollPosition
out of the loop. - Decrease the number of pizzas by using the device width.
Modify the code in function changeSliderLabel(size)
. In detail, determineDx
function is deleted and in function changePizzaSizes(size)
, fix the forced synchronous layout problem.
- run
npm install
to install the modules. - run
gulp
to minify css and js files.