static generation does not work with overlapping namespaces
[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 <?php if (isset($baseUrl)) : ?>
14 <base href="<?= $baseUrl ?>">
15 <meta http-equiv="Content-Location" content="<?= $baseUrl . $ref ?>">
16 <link rel="stylesheet" href="index.css">
17 <?php endif; ?>
18
19 <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
20 </head>
21 <body>
22 <?php include __DIR__."/sidebar.phtml" ?>
23 <?php if (isset($exception)) : ?>
24 <?= \mdref\ExceptionHandler::htmlException($exception) ?>
25 <?php elseif (isset($entry)) : ?>
26 <?php include __DIR__."/mdref.phtml" ?>
27 <?php else: ?>
28 <?php include __DIR__."/index.phtml" ?>
29 <?php endif; ?>
30
31 <?php if (@$_SERVER["SERVER_NAME"] != "localhost") : ?>
32 <div id="disqus_thread"></div>
33 <script>
34 var disqus_shortname = 'mdref';
35 var disqus_identifier = '<?=$ref?>';
36 (function() {
37 var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
38 dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
39 (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
40 })();
41 </script>
42 <?php endif; ?>
43
44 <footer>
45 <?php include __DIR__."/footer.phtml" ?>
46 </footer>
47 <?php if (isset($baseUrl)) : ?>
48 <script src="index.js"></script>
49 <?php endif; ?>
50 </body>
51 </html>