21693f6dfce8a327e9aa2a348d39be6c41e9ec37
[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 rel="shortcut icon" href="<?= $baseUrl . "favicon.ico" ?>">
21 </head>
22 <body>
23 <div class="page">
24 <?php include __DIR__."/sidebar.phtml" ?>
25 <?php if (isset($exception)) : ?>
26 <?= \mdref\ExceptionHandler::htmlException($exception) ?>
27 <?php elseif (isset($entry)) : ?>
28 <?php include __DIR__."/mdref.phtml" ?>
29 <?php else: ?>
30 <?php include __DIR__."/index.phtml" ?>
31 <?php endif; ?>
32 <?php if (isset($entry) && ($comments = $entry->getRepo()->getCommentProvider())) : ?>
33
34 <div class="comments">
35 <?php foreach ($comments as $providerName => $providerData) : ?>
36 <?php include __DIR__."/comments.$providerName.phtml" ?>
37 <?php endforeach; ?>
38
39 </div>
40 <?php endif; ?>
41
42 <footer>
43 <?php include __DIR__."/footer.phtml" ?>
44
45 </footer>
46 <?php if (isset($baseUrl)) : ?>
47
48 <script src="index.js" defer></script>
49 <?php endif; ?>
50
51 </div>
52 </body>
53 </html>