Merge remote-tracking branch 'refs/remotes/origin/master'
[mdref/mdref] / views / layout.phtml
index 69c972763648111576548e9fcd1a43de02c722c3..43463ca9f7a5c61328870298921972cceeb76395 100644 (file)
@@ -1,27 +1,32 @@
 <!doctype html>
 <html>
- <head>
-  <meta charset="utf-8">
-  <title><?= $title ?></title>
-  <base href="<?= $baseUrl ?>/">
-  <link rel="stylesheet" href="index.css">
-  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
- </head>
- <body>
-  <div class="sidebar">
-   <?= $listing ?>
-  </div>
+       <head>
+               <meta charset="utf-8">
+               <title>
+                       <?php if ($title) : ?>
+                               <?= $title ?> - mdref
+                       <?php else: ?>
+                               mdref
+                       <?php endif; ?>
+               </title>
+               <base href="<?= $baseUrl ?>">
+               <link rel="stylesheet" href="index.css">
+               <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
+       </head>
+       <body>
+               <?php include __DIR__."/sidebar.phtml" ?>
+               
+               <?php if (isset($html)) : ?>
+                       <?php include __DIR__."/mdref.phtml" ?>
+               <?php else: ?>
+                       <?php include __DIR__."/index.phtml" ?>
+               <?php endif; ?>
 
-  <?= $content ?>
+               <div id="disqus_thread"></div>
 
-  <div id="disqus_thread"></div>
-
-  <footer>
-   <ul>
-       <li><a href="https://github.com/m6w6/mdref">mdref-v<?php readfile("../VERSION")?></a></li>
-       <li><a href="LICENSE">&copy; <?= implode("-", array_unique([2013,idate("Y")]))?></a></li>
-   </ul>
-  </footer>
-  <script src="index.js"></script>
- </body>
+               <footer>
+                       <?php include __DIR__."/footer.phtml" ?>
+               </footer>
+               <script src="index.js"></script>
+       </body>
 </html>