7d7adc6190059e3de01184671a3337ff965e5a76
[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 property="og:title" content="<?= $esc(
14 !empty($title)
15 ? $title
16 : (
17 isset($entry)
18 ? (
19 $entry->isFunction() || $entry->isNsClass()
20 ? $entry->getNsName()
21 : $entry->getName()
22 )
23 : "mdref"
24 )
25 ) ?>">
26 <meta name="viewport" content="width=1200, initial-scale=0.5">
27 <?php if (isset($baseUrl)) : ?>
28 <base href="<?= $baseUrl ?>">
29 <meta http-equiv="Content-Location" content="<?= $baseUrl . $ref ?>">
30 <link rel="stylesheet" href="index.css">
31 <?php endif; ?>
32
33 <link rel="shortcut icon" href="<?= $baseUrl . "favicon.ico" ?>">
34 </head>
35 <body>
36 <div class="page">
37 <?php include __DIR__."/sidebar.phtml" ?>
38 <?php if (isset($exception)) : ?>
39 <?= \mdref\ExceptionHandler::htmlException($exception) ?>
40 <?php elseif (isset($entry)) : ?>
41 <?php include __DIR__."/mdref.phtml" ?>
42 <?php else: ?>
43 <?php include __DIR__."/index.phtml" ?>
44 <?php endif; ?>
45 <?php if (isset($entry) && ($comments = $entry->getRepo()->getCommentProvider())) : ?>
46
47 <div class="comments">
48 <?php foreach ($comments as $providerName => $providerData) : ?>
49 <?php include __DIR__."/comments.$providerName.phtml" ?>
50 <?php endforeach; ?>
51
52 </div>
53 <?php endif; ?>
54
55 <footer>
56 <?php include __DIR__."/footer.phtml" ?>
57
58 </footer>
59 <?php if (isset($baseUrl)) : ?>
60
61 <script src="index.js" defer></script>
62 <?php endif; ?>
63
64 </div>
65 </body>
66 </html>