Book Image

Web Design Blueprints

Book Image

Web Design Blueprints

Overview of this book

The book delivers simple instructions on how to design and build modern Web using the latest trends in web development. You will learn how to design responsive websites, created with modern Flat User Interface design patterns, build deep-scrolling websites with parallax 3D effects, and roll-your-own single-page applications. Finally, you'll work through an awesome chapter that combines them all. Each chapter features actual lines of code that you can apply right away.
Table of Contents (12 chapters)
Web Design Blueprints
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Performing housekeeping


There are some scripts that are to run on the home page and they are living in the wrong places. The first one is the clock script in the index.html HEAD SCRIPT element. We don't want that there. It only runs in the home page, and it isn't in our separation of concerns methodology. So cut the script out of the index script tag and paste it into the home.js file.  

In the routing.js file there is a function called home.loadSections. This is also outside of its home. When we created it, we noted it with a TODO to move later. So now cut it out and paste it into the home.js file.

Now the /app/home/home.js file has the full home object including home.dayArray, home.monthArray, the home.getTime function, the home.correctDigit function, and the home.loadSections function. It should be followed by calls to the home.loadSections and home.getTime functions.

The home function should look like the following example without much more modification:

console.log(id)
var home = {};
home...