Table of Contents for
Web Design Blueprints

Version ebook / Retour

Cover image for bash Cookbook, 2nd Edition Web Design Blueprints by Benjamin LaGrone Published by Packt Publishing, 2016
  1. Cover
  2. Table of Contents
  3. Web Design Blueprints
  4. Web Design Blueprints
  5. Credits
  6. About the Author
  7. About the Reviewer
  8. www.PacktPub.com
  9. Preface
  10. What you need for this book
  11. Who this book is for
  12. Conventions
  13. Reader feedback
  14. Customer support
  15. 1. Responsive Web Design
  16. Getting familiar with the basics
  17. Using media queries for responsive design
  18. Working with responsive media
  19. Building responsive layouts
  20. Summary
  21. 2. Flat UI
  22. Flat UI color
  23. Creating a flat UI layout
  24. Summary
  25. 3. Parallax Scrolling
  26. Color classes
  27. Using SVG font icons
  28. Getting the fonts
  29. That's no moon!
  30. OMG, it's full of stars!
  31. Clouds, birds, and airplanes
  32. The rocket
  33. Terra firma
  34. Next up, the CSS
  35. Styling the objects with CSS
  36. Styling the ground objects
  37. Writing the JavaScript effects
  38. Setting the row height
  39. Spreading the objects
  40. Spreading the clouds
  41. Loading the page functions
  42. Smoothening the scroll
  43. Updating elements on the scroller
  44. Collecting the moving elements
  45. Creating functions for the element types
  46. Setting the left positions
  47. Creating the rocket's movement function
  48. Finally, moving the earth
  49. Summary
  50. 4. Single Page Applications
  51. Getting to work
  52. Getting the old files
  53. Object and function conventions
  54. Creating utility functions
  55. Working with the home structure
  56. Setting up other sections
  57. Performing housekeeping
  58. Creating a callBack function for the API
  59. Summary
  60. 5. The Death Star Chapter
  61. Dropping in the parallax game
  62. Loading elements from JSON
  63. What can be done in the shared levels service
  64. Editing the home JavaScript
  65. Creating the other pages – credits and leaderboard
  66. Creating the second level
  67. Summary
  68. Index

Getting the old files

For this application, let's take the Flat UI project we created and turn it into a real working Single Page Application. So go back to the project you built for that project and copy the index.html file you created and paste it into the root directory of the Single Page Application project. If you do not have it, you can get it from the GitHub project page, or from the Packt Publishing book page.

Getting the project set up

To get started, create a new project in your IDE, and we will build the app from there. Let's go over the structure. Inside the base directory, create the folders app, css, images, and lib. The css and images directories will contain the media files for CSS and images. The lib directory will contain any libraries you choose to download and use in your project. Finally, the app directory will contain the JavaScript and templates file structures you make when you build the application:

Getting the project set up

The first thing we can do is create a new CSS file, style.css, inside the css directory. In index.html, copy the CSS from inside the style element and paste it into the style.css file.

Next, create a link in the index.html header to the CSS style sheet, style.css:

<link type="text/css" rel="stylesheet" href="css/style.css" media="all">
Now, try launching index.html in your browser, and if everything is set up correctly, the application should be working like before.
Getting the project set up