new entry sorting; style updates
[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 <link href="https://fonts.googleapis.com/css?family=Inconsolata&subset=latin-ext" rel="stylesheet">
20 <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
21 <link rel="shortcut icon" href="<?= $baseUrl . "favicon.ico" ?>">
22 </head>
23 <body>
24 <div class="page">
25 <?php include __DIR__."/sidebar.phtml" ?>
26 <?php if (isset($exception)) : ?>
27 <?= \mdref\ExceptionHandler::htmlException($exception) ?>
28 <?php elseif (isset($entry)) : ?>
29 <?php include __DIR__."/mdref.phtml" ?>
30 <?php else: ?>
31 <?php include __DIR__."/index.phtml" ?>
32 <?php endif; ?>
33
34 <?php if (@$_SERVER["SERVER_NAME"] != "localhost") : ?>
35
36 <div id="disqus_thread"></div>
37 <script>
38 var disqus_shortname = 'mdref';
39 var disqus_identifier = '<?=$ref?>';
40 (function() {
41 var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
42 dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
43 (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
44 })();
45 </script>
46 <?php endif; ?>
47
48 <footer>
49 <?php include __DIR__."/footer.phtml" ?>
50
51 </footer>
52 <?php if (isset($baseUrl)) : ?>
53
54 <script src="index.js"></script>
55 <?php endif; ?>
56
57 </div>
58 </body>
59 </html>