<?php
/**
 * Чистый лейаут - тут нет даже логотипа. Всё прижато к краям без значительных паддингов.
 */
?><!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="ru" prefix="og: http://ogp.me/ns#" xmlns:fb="http://ogp.me/ns/fb#" xmlns:og="http://ogp.me/ns#">
	<head>
		<title><?= App::getConfig('title') ?></title>
		<link rel="shortcut icon" href="/favicon.ico"></link>
		<link rel="icon" href="/favicon.ico"></link>

		<script src="/js/jquery-2.1.0.min.js" type="text/javascript"></script>
		<link href="/css/style.css?ver=<?= App::getConfig('version') ?>" media="all" rel="stylesheet" type="text/css" />

<?php if (isset($data['og']) && $data['og']): ?>
		<meta property="og:title" content="<?= $data['og']['title'] ?>" />
		<meta property="og:description" content="<?= $data['og']['description'] ?>" />
		<meta property="og:site_name" content="<?= $data['og']['site_name'] ?>" />
		<meta property="og:type" content="<?= $data['og']['type'] ?>" />
		<meta property="og:url" content="<?= $data['og']['url'] ?>" />
		<meta property="og:image" content="<?= $data['og']['image'] ?>" />
<?php endif; ?>

<?php if ($vars): ?>
		<script type="text/javascript">
<?php foreach ($vars as $varName => $var): ?>
			var <?= $varName ?> = '<?= $var ?>';
<?php endforeach; ?>
		</script>
<?php endif; ?>

		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="/css/font-ubuntu.css" />

		<link rel="apple-touch-icon" href="/img/touch-icon-iphone.png" />
		<link rel="apple-touch-icon" sizes="76x76" href="/img/touch-icon-ipad.png" />
		<link rel="apple-touch-icon" sizes="120x120" href="/img/touch-icon-iphone-retina.png" />
		<link rel="apple-touch-icon" sizes="152x152" href="/img/touch-icon-ipad-retina.png" />
	</head>
	<body>
		<?= isset($content) && !empty($content) ? $content : 'No content =(' ?>
	</body>

<?php if ($styles): ?>
<?php foreach ($styles as $style): ?>
	<link href="<?= $style ?>" media="all" rel="stylesheet" type="text/css" />
<?php endforeach; ?>
<?php endif; ?>

<?php if ($scripts): ?>
<?php foreach ($scripts as $script): ?>
	<script src="<?= $script ?>" <?= (strpos($script, 'ulogin') !== FALSE) ? 'async':'' ?> type="text/javascript"></script>
<?php endforeach; ?>
<?php endif; ?>
</html>