6b18f856574c1146d560f06a90e374dac1cbe214
[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 endif; ?>
9 mdref
10 </title>
11 <base href="<?= $baseUrl ?>">
12 <meta http-equiv="Content-Location" content="<?= $baseUrl . $ref ?>">
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 include __DIR__."/sidebar.phtml" ?>
18 <?php if (isset($exception)) : ?>
19 <?= \mdref\ExceptionHandler::htmlException($exception) ?>
20 <?php elseif (isset($entry)) : ?>
21 <?php include __DIR__."/mdref.phtml" ?>
22 <?php else: ?>
23 <?php include __DIR__."/index.phtml" ?>
24 <?php endif; ?>
25
26 <?php if ($_SERVER["SERVER_NAME"] != "localhost") : ?>
27 <div id="disqus_thread"></div>
28 <script>
29 var disqus_shortname = 'mdref';
30 var disqus_identifier = '<?=$ref?>';
31 (function() {
32 var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
33 dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
34 (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
35 })();
36 </script>
37 <?php endif; ?>
38
39 <footer>
40 <?php include __DIR__."/footer.phtml" ?>
41 </footer>
42 <script src="index.js"></script>
43 </body>
44 </html>