67 lines
2.4 KiB
PHTML
67 lines
2.4 KiB
PHTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8"/>
|
|
<?php
|
|
$title = isset($this->context->subTitle)
|
|
? sprintf('%s – %s', $this->context->title, $this->context->subTitle)
|
|
: $this->context->title
|
|
?>
|
|
<title><?php echo $title ?></title>
|
|
<?php foreach (array_unique($this->context->stylesheets) as $name): ?>
|
|
<link rel="stylesheet" type="text/css" href="<?php echo \Chibi\UrlHelper::absoluteUrl('/media/css/' . $name) ?>"/>
|
|
<?php endforeach ?>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1"/>
|
|
|
|
<meta property="og:title" content="<?php echo $title ?>"/>
|
|
<meta property="og:url" content="<?php echo \Chibi\UrlHelper::currentUrl() ?>"/>
|
|
<?php if (!empty($this->context->pageThumb)): ?>
|
|
<meta property="og:image" content="<?php echo $this->context->pageThumb ?>"/>
|
|
<?php endif ?>
|
|
</head>
|
|
|
|
<body>
|
|
<script type="text/javascript">
|
|
var lastSearchQuery = <?php echo json_encode(isset($this->context->transport->lastSearchQuery) ? $this->context->transport->lastSearchQuery : '') ?>;
|
|
</script>
|
|
|
|
<nav id="top-nav">
|
|
<div class="main-wrapper">
|
|
<?php $this->renderFile('top-navigation') ?>
|
|
</nav>
|
|
|
|
<section id="content">
|
|
<div class="main-wrapper">
|
|
<?php echo $this->renderView() ?>
|
|
<div class="clear"></div>
|
|
</div>
|
|
</section>
|
|
|
|
<footer>
|
|
<div class="main-wrapper">
|
|
<span>Load: <?php echo sprintf('%.05f', microtime(true) - $this->context->startTime) ?>s</span>
|
|
<span>Queries: <?php echo count(queryLogger()->getLogs()) ?></span>
|
|
<span><a href="<?php echo SZURU_LINK ?>">szurubooru v<?php echo SZURU_VERSION ?></a></span>
|
|
<?php if (PrivilegesHelper::confirm(Privilege::ListLogs)): ?>
|
|
<span><a href="<?php echo \Chibi\UrlHelper::route('log', 'list') ?>">Logs</a></span>
|
|
<?php endif ?>
|
|
</div>
|
|
<?php if ($this->config->misc->debugQueries): ?>
|
|
<hr>
|
|
<div class="main-wrapper">
|
|
<pre class="debug"><?php echo join('<br>', array_map(function($x) { return preg_replace('/\s+/', ' ', $x); }, queryLogger()->getLogs())) ?></pre>
|
|
</div>
|
|
<?php endif ?>
|
|
</footer>
|
|
|
|
<?php foreach (array_unique($this->context->scripts) as $name): ?>
|
|
<script type="text/javascript" src="<?php echo \Chibi\UrlHelper::absoluteUrl('/media/js/' . $name) ?>"></script>
|
|
<?php endforeach ?>
|
|
<script type="text/javascript">
|
|
$(function()
|
|
{
|
|
$('body').trigger('dom-update');
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|