add missing layout
[mdref/mdref] / views / layout.phtml
1 <!doctype html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>
6 <?php if (isset($title)) : ?>
7 <?= $title ?> - mdref
8 <?php else: ?>
9 mdref
10 <?php endif; ?>
11 </title>
12 <base href="<?= $baseUrl ?>">
13 <link rel="stylesheet" href="index.css">
14 <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
15 </head>
16 <body>
17 <?php if (isset($listing)) : ?>
18 <div class="sidebar">
19 <ul>
20 <li>&lsh; <a href="">Home</a></li>
21 <?php if (($entry = $listing->getParent())) : ?>
22 <li>&uarr; <a href="<?=$entry->formatUrl()?>"><?=$entry->formatLink()?></a></li>
23 <?php endif; ?>
24 <?php if (($entry = $listing->getSelf()) && ($link = $entry->formatLink())) : ?>
25 <ul><li>&circlearrowright; <?= $link ?>
26 <?php endif; ?>
27 <?php if (count($listing)) : ?>
28 <ul>
29 <?php foreach ($listing as $entry) : ?>
30 <li>&rdsh; <a href="<?=$entry->formatUrl()?>"><?=$entry->formatLink()?></a></li>
31 <?php endforeach; ?>
32 </ul>
33 <?php endif; ?>
34 <?php if (strlen($listing)) : ?>
35 </li></ul>
36 <?php endif; ?>
37 </ul>
38 </div>
39 <?php endif; ?>
40
41 <?php if (isset($markdown)) : ?>
42 <?= $markdown ?>
43 <?php if (isset($sublisting) && count($sublisting)) : ?>
44 <h2>Functions:</h2>
45 <ul>
46 <?php foreach($sublisting as $entry) : ?>
47 <li>
48 <h3><a href="<?=$entry->formatUrl()?>"><?=$entry->formatLink(true)?></a></h3>
49 <p><?=$entry->readDescription()?></p>
50 <p><?=$entry->readTitle()?></p>
51 </li>
52 <?php endforeach; ?>
53 </ul>
54 <?php endif; ?>
55 <?php else: ?>
56 <h1>mdref-v<?php readfile("../VERSION"); ?></h1>
57 <?php if (isset($exception)) : ?>
58 <?=\mdref\ExceptionHandler::html($exception, ["h2"], ["p"], ["pre", "style='overflow-x:scroll'"]); ?>
59 <?php else : ?>
60 <pre><?= htmlspecialchars(file_get_contents("../LICENSE")); ?></pre>
61 <?php endif; ?>
62 <?php endif; ?>
63
64 <div id="disqus_thread"></div>
65
66 <footer>
67 <ul>
68 <li><a href="https://github.com/m6w6/mdref">mdref-v<?php readfile("../VERSION") ?></a></li>
69 <li><a href="LICENSE">&copy; <?= implode("-", array_unique([2013, idate("Y")])) ?>
70 All rights reserved.</a></li>
71 </ul>
72 </footer>
73 <script src="index.js"></script>
74 </body>
75 </html>