minor visual improvements; add back edit link
[mdref/mdref] / views / layout.phtml
1 <!doctype html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>
6 <?php if (!empty($title)) : ?>
7 <?= $title ?> -
8 <?php elseif (isset($entry)) : ?>
9 <?= $entry ?> -
10 <?php endif; ?>
11 mdref
12 </title>
13 <base href="<?= $baseUrl ?>">
14 <meta http-equiv="Content-Location" content="<?= $baseUrl . $ref ?>">
15 <link rel="stylesheet" href="index.css">
16 <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
17 </head>
18 <body>
19 <?php include __DIR__."/sidebar.phtml" ?>
20 <?php if (isset($exception)) : ?>
21 <?= \mdref\ExceptionHandler::htmlException($exception) ?>
22 <?php elseif (isset($entry)) : ?>
23 <?php include __DIR__."/mdref.phtml" ?>
24 <?php else: ?>
25 <?php include __DIR__."/index.phtml" ?>
26 <?php endif; ?>
27
28 <?php if ($_SERVER["SERVER_NAME"] != "localhost") : ?>
29 <div id="disqus_thread"></div>
30 <script>
31 var disqus_shortname = 'mdref';
32 var disqus_identifier = '<?=$ref?>';
33 (function() {
34 var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
35 dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
36 (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
37 })();
38 </script>
39 <?php endif; ?>
40
41 <footer>
42 <?php include __DIR__."/footer.phtml" ?>
43 </footer>
44 <script src="index.js"></script>
45 </body>
46 </html>