HTML and CSS Reference
In-Depth Information
Copying the Stylesheet and Assets to the Proper Directories
Now that the header markup is in place and referencing the stylesheet, you should copy main.css from Chapter 7 into
the assets/styles/ folder. You should also copy the image sprite to assets/images/ .
the CSS markup and assets will not be mentioned again or printed in this chapter in the interest of
keeping things moving forward. don't forget to copy main.css from Chapter 7, or else the app will not match the
screenshots to follow.
Caution
Building the Home Page
The router is created. The core classes are written. The common markup is ready to roll. All that's left to do is create
the first actual page of the app.
Starting with the simplest page first, let's build the Home page.
Creating the Home Controller
To get started, create a new file in system/controllers/ called class.home.inc.php . Inside, add the following code:
<?php
/**
* Generates output for the Home view
*
* @author Jason Lengstorf <jason@lengstorf.com>
* @author Phil Leggetter <phil@leggetter.co.uk>
*/
class Home extends Controller
{
/**
* Overrides the parent constructor to avoid an error
*
* @return bool TRUE
*/
public function __construct( )
{
return TRUE;
}
/**
* Generates the title of the page
*
* @return string The title of the page
*/
 
 
Search WWH ::




Custom Search