Last active
August 29, 2015 14:15
-
-
Save wethu/b57dc60bd59e075fdd67 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Header template | |
| */ | |
| ?><!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <title><?php echo $site_title; ?></title> | |
| <!-- style.css should be shared styles across all pages --> | |
| <link rel="stylesheet" type="text/css" src="style.css" /> | |
| <!-- $stylesheet was set in our index.php file which will only be included on that page --> | |
| <link rel="stylesheet" type="text/css" src="<?php echo $stylesheet; ?>" /> | |
| </head> | |
| <body> | |
| <div class="page"><!-- Begin page content --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| body { | |
| background-color: blue; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| body { | |
| background-color: red; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // This is page 1, with a body that wants to be styled a certain way | |
| $stylesheet = "page-one-styles.css"; | |
| $site_title = "Page One"; | |
| include('header.php'); | |
| <!-- this is inside .page --> | |
| <p>Hello this is page 1</p> | |
| include('footer.php'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // This is page 2, with a body that wants to be styled another way | |
| $stylesheet = "page-two-styles.css"; // notice i'm including a different stylesheet file | |
| $site_title = "Page Two"; | |
| include('header.php'); | |
| <!-- this is inside .page --> | |
| <p>Hello this is page 2</p> | |
| include('footer.php'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| body { | |
| width: 960px; | |
| margin: 0 auto; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment