projects
/
mdref
/
mdref
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
fix cli-server
[mdref/mdref]
/
views
/
layout.phtml
diff --git
a/views/layout.phtml
b/views/layout.phtml
index 6ef8686ad87315b52694b7e11fb7d5c563830909..6cc571ba21b44ef569da08627d54063b57b7a4fc 100644
(file)
--- a/
views/layout.phtml
+++ b/
views/layout.phtml
@@
-5,27
+5,34
@@
<title>
<?php if (!empty($title)) : ?>
<?= $title ?> -
<title>
<?php if (!empty($title)) : ?>
<?= $title ?> -
+ <?php elseif (isset($entry)) : ?>
+ <?= $entry ?> -
<?php endif; ?>
mdref
</title>
<?php endif; ?>
mdref
</title>
- <base href="<?= $baseUrl ?>">
- <link rel="stylesheet" href="index.css">
+ <?php if (isset($baseUrl)) : ?>
+ <base href="<?= $baseUrl ?>">
+ <meta http-equiv="Content-Location" content="<?= $baseUrl . $ref ?>">
+ <link rel="stylesheet" href="index.css">
+ <?php endif; ?>
+
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
</head>
<body>
<?php include __DIR__."/sidebar.phtml" ?>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
</head>
<body>
<?php include __DIR__."/sidebar.phtml" ?>
-
- <?php if (isset($html)) : ?>
+ <?php if (isset($exception)) : ?>
+ <?= \mdref\ExceptionHandler::htmlException($exception) ?>
+ <?php elseif (isset($entry)) : ?>
<?php include __DIR__."/mdref.phtml" ?>
<?php else: ?>
<?php include __DIR__."/index.phtml" ?>
<?php endif; ?>
<?php include __DIR__."/mdref.phtml" ?>
<?php else: ?>
<?php include __DIR__."/index.phtml" ?>
<?php endif; ?>
- <?php if ($_SERVER["SERVER_NAME"] != "localhost") : ?>
+ <?php if (
@
$_SERVER["SERVER_NAME"] != "localhost") : ?>
<div id="disqus_thread"></div>
<script>
var disqus_shortname = 'mdref';
<div id="disqus_thread"></div>
<script>
var disqus_shortname = 'mdref';
- var disqus_identifier = '<?=$
permUrl
?>';
+ var disqus_identifier = '<?=$
ref
?>';
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
@@
-37,6
+44,8
@@
<footer>
<?php include __DIR__."/footer.phtml" ?>
</footer>
<footer>
<?php include __DIR__."/footer.phtml" ?>
</footer>
- <script src="index.js"></script>
+ <?php if (isset($baseUrl)) : ?>
+ <script src="index.js"></script>
+ <?php endif; ?>
</body>
</html>
</body>
</html>