szurubooru/src/Views/layout-normal.phtml
Marcin Kurczewski a3c9338386 Added custom favicon and assets support to config
Also, moved title key to [appearance] section
2014-06-10 12:01:15 +02:00

80 lines
2.6 KiB
PHTML

<?php
$this->assets->addStylesheet('../lib/jquery-ui/jquery-ui.css');
$this->assets->addStylesheet('core.css');
$this->assets->addScript('../lib/jquery/jquery.min.js');
$this->assets->addScript('../lib/jquery-ui/jquery-ui.min.js');
$this->assets->addScript('../lib/mousetrap/mousetrap.min.js');
$this->assets->addScript('core.js');
if (!empty(Core::getConfig()->appearance->extraScripts))
foreach (Core::getConfig()->appearance->extraScripts as $path)
$this->assets->addScriptFullPath($path);
if (!empty(Core::getConfig()->appearance->extraStylesheets))
foreach (Core::getConfig()->appearance->extraStylesheets as $path)
$this->assets->addStylesheetFullPath($path);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1"/>
<?php if (!empty(Core::getConfig()->appearance->favicon)): ?>
<link rel="shortcut icon"
type="image/png"
href="<?= \Chibi\Util\Url::makeAbsolute(Core::getConfig()->appearance->favicon) ?>"/>
<?php endif ?>
</head>
<body>
<script type="text/javascript">
var lastSearchQuery = <?= json_encode(
isset($this->context->transport->lastSearchQuery)
? $this->context->transport->lastSearchQuery
:'') ?>;
</script>
<nav id="top-nav">
<div class="main-wrapper">
<?php $this->renderExternal('top-navigation') ?>
</div>
<div class="clear"></div>
</nav>
<section id="content">
<div class="main-wrapper">
<?php $this->renderExternal($this->context->viewName) ?>
</div>
<div class="clear"></div>
</section>
<footer>
<div class="main-wrapper">
<hr/>
<div class="left">
<span>
<a href="<?= Core::getConfig()->misc->githubLink ?>">
<?= PropertyModel::get(PropertyModel::EngineVersion) ?>
</a>
</span>
<span><a href="<?= Core::getRouter()->linkTo(['StaticPagesController', 'apiDocsView']) ?>">API</a></span>
<?php if (Access::check(new Privilege(Privilege::ListLogs))): ?>
<span><a href="<?= Core::getRouter()->linkTo(['LogController', 'listView']) ?>">Logs</a></span>
<?php endif ?>
</div>
<div class="right">
<span><?= TextHelper::useBytesUnits(memory_get_usage()) ?></span>
<span><?= sprintf('%.04f', microtime(true) - $this->context->startTime) ?>s</span>
<span><?= $x = count(Core::getDatabase()->getLogs()) ?> <?= $x != 1 ? 'queries' : 'query' ?></span>
</div>
<div class="clear"></div>
<hr/>
</div>
</footer>
<?php if (Core::getConfig()->misc->debugQueries): ?>
<?php $this->renderExternal('debug') ?>
<?php endif ?>
<div id="small-screen"></div>
</body>
</html>