fix #1; upgrade jquery
[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/2.1.4/jquery.min.js"></script>
20 </head>
21 <body>
22 <div class="page">
23 <?php include __DIR__."/sidebar.phtml" ?>
24 <?php if (isset($exception)) : ?>
25 <?= \mdref\ExceptionHandler::htmlException($exception) ?>
26 <?php elseif (isset($entry)) : ?>
27 <?php include __DIR__."/mdref.phtml" ?>
28 <?php else: ?>
29 <?php include __DIR__."/index.phtml" ?>
30 <?php endif; ?>
31
32 <?php if (@$_SERVER["SERVER_NAME"] != "localhost") : ?>
33 <div id="disqus_thread"></div>
34 <script>
35 var disqus_shortname = 'mdref';
36 var disqus_identifier = '<?=$ref?>';
37 (function() {
38 var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
39 dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
40 (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
41 })();
42 </script>
43 <?php endif; ?>
44
45 <footer>
46 <?php include __DIR__."/footer.phtml" ?>
47 </footer>
48 <?php if (isset($baseUrl)) : ?>
49 <script src="index.js"></script>
50 <?php endif; ?>
51 </div>
52 </body>
53 </html>