Layout.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8"/>
  5. <title>MicroMVC</title>
  6. <!--[if lt IE 9]>
  7. <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
  8. <![endif]-->
  9. <link rel="stylesheet" media="all" href="style.css"/>
  10. <?php
  11. //Print all CSS files
  12. if( ! empty($css)) foreach($css as $file) print '<link rel="stylesheet" media="all" href="'. $file. '" />';
  13. //Print all JS files
  14. if( ! empty($javascript)) foreach($javascript as $file) print '<script type="text/javascript" src="'. $file. '"></script>';
  15. //Print any other header data
  16. if( ! empty($head_data)) print $head_data;
  17. ?>
  18. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  19. </head>
  20. <body lang="en">
  21. <?php if( ! empty($sidebar)) { ?>
  22. <div id="content">
  23. <?php print $content; ?>
  24. </div>
  25. <div id="sidebar">
  26. <?php print $sidebar; ?>
  27. </div>
  28. <?php } else { // Else they want to do the content layout themselves... ?>
  29. <div id="page">
  30. <?php print $content; ?>
  31. </div>
  32. <?php } ?>
  33. <?php if(isset($pagination)) print $pagination;?>
  34. <?php if(isset($debug)) print '<div id="debug">'. $debug. '</div>';?>
  35. </body>
  36. </html>