X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=views%2Flayout.phtml;h=43463ca9f7a5c61328870298921972cceeb76395;hb=1a5b9091eb508456beff1dc09e2af3301f880c47;hp=994f7f49c06d905550b16447eedf0604e7f0fd42;hpb=1c8bbda395d74a9428092c440f8d5a4c4252022d;p=mdref%2Fmdref diff --git a/views/layout.phtml b/views/layout.phtml index 994f7f4..43463ca 100644 --- a/views/layout.phtml +++ b/views/layout.phtml @@ -3,7 +3,7 @@ - <?php if (isset($title)) : ?> + <?php if ($title) : ?> <?= $title ?> - mdref <?php else: ?> mdref @@ -14,61 +14,18 @@ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> </head> <body> - <?php if (isset($listing)) : ?> - <div class="sidebar"> - <ul> - <li>↰ <a href="">Home</a></li> - <?php if (($entry = $listing->getParent())) : ?> - <li>↑ <a href="<?=$entry->formatUrl()?>"><?=$entry->formatLink()?></a></li> - <?php endif; ?> - <?php if (($entry = $listing->getSelf()) && ($link = $entry->formatLink())) : ?> - <ul><li>↻ <?= $link ?> - <?php endif; ?> - <?php if (count($listing)) : ?> - <ul> - <?php foreach ($listing as $entry) : ?> - <li>↳ <a href="<?=$entry->formatUrl()?>"><?=$entry->formatLink()?></a></li> - <?php endforeach; ?> - </ul> - <?php endif; ?> - <?php if (strlen($listing)) : ?> - </li></ul> - <?php endif; ?> - </ul> - </div> - <?php endif; ?> + <?php include __DIR__."/sidebar.phtml" ?> - <?php if (isset($markdown)) : ?> - <?= $markdown ?> - <?php if (isset($sublisting) && count($sublisting)) : ?> - <h2>Functions:</h2> - <ul> - <?php foreach($sublisting as $entry) : ?> - <li> - <h3><a href="<?=$entry->formatUrl()?>"><?=$entry->formatLink(true)?></a></h3> - <p><?=$entry->readDescription()?></p> - <p><?=$entry->readTitle()?></p> - </li> - <?php endforeach; ?> - </ul> - <?php endif; ?> + <?php if (isset($html)) : ?> + <?php include __DIR__."/mdref.phtml" ?> <?php else: ?> - <h1>mdref-v<?php readfile("../VERSION"); ?></h1> - <?php if (isset($exception)) : ?> - <?=\mdref\ExceptionHandler::html($exception, ["h2"], ["p"], ["pre", "style='overflow-x:scroll'"]); ?> - <?php else : ?> - <pre><?= htmlspecialchars(file_get_contents("../LICENSE")); ?></pre> - <?php endif; ?> + <?php include __DIR__."/index.phtml" ?> <?php endif; ?> <div id="disqus_thread"></div> <footer> - <ul> - <li><a href="https://github.com/m6w6/mdref">mdref-v<?php readfile("../VERSION") ?></a></li> - <li><a href="LICENSE">© <?= implode("-", array_unique([2013, idate("Y")])) ?> - All rights reserved.</a></li> - </ul> + <?php include __DIR__."/footer.phtml" ?> </footer> <script src="index.js"></script> </body>