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