template.index.php
Главный шаблон
Вызывается из:
Исходный код
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">
<head>
<title><?=$Main->displayTitle()?></title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="Keywords" content=""><meta name="Description" content=""><meta name="Last-Modified" content="">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0">
<meta property="og:type" content="website">
<meta property="og:site_name" content="<?=htmlspecialchars($Conf->get("title"))?>">
<?php
if (!$Page->created) {
$host = $_SERVER['HTTP_HOST'];
?>
<meta property="og:url" content="<?=$Request->getCanonical()?>">
<meta property="og:title" content="<?=$Page->displayTitle()?>">
<?php if ($Page->image) { ?>
<meta property="og:image" content="<?="http://$host$Page->image"?>">
<?php } ?>
<?php if ($Page->info['description']) { ?>
<meta property="og:description" content="<?=htmlspecialchars($Page->info['description'])?>">
<?php } elseif ($Page->brief) { ?>
<meta property="og:description" content="<?=htmlspecialchars($Page->brief)?>">
<?php } ?>
<?php
}
?>
<meta name="apple-mobile-web-app-title" content="<?=htmlspecialchars($Conf->get("title"))?>">
<meta name="apple-mobile-web-app-status-bar-style" content="white">
<meta name="theme-color" content="#09c">
<link rel="apple-touch-icon" type="image/png" href="/images/favicon-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="/images/favicon-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="/images/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/images/favicon-16x16.png" sizes="16x16">
<link rel="canonical" href="<?="http://{$_SERVER['HTTP_HOST']}" . $Page->href() . (($page = intval($_GET['page'])) && $page > 1 ? "?page=$page" : "")?>">
<link rel="stylesheet" href="/style.css?<?=date("YmdHis", @filemtime("$root/style.css"))?>" type="text/css">
<script type="text/javascript" src="/modules.js?<?=date("YmdHis", @filemtime("$root/modules.js"))?>" data-main="/script.js?<?=date("YmdHis", @filemtime("$root/script.js"))?>"></script>
</head>
<?php
$isForm = !!$Form->html;
$isMain = $Page->isMain() && !$isForm;
?>
<body class="uk-height-1-1 uk-flex uk-flex-column uk-flex-stretch uk-background-muted">
<header>
<div class="uk-navbar-container uk-navbar-transparent uk-background-secondary uk-light">
<div class="uk-container uk-navbar">
<div class="uk-navbar-left">
<br>
</div>
</div>
</div>
<div class="uk-navbar-container uk-navbar-transparent uk-navbar-primary uk-background-default">
<?php
if ($Auth->admin) print $Main->displayPanel(array(
'edit' => array(
'href' => '?a=conf&form=conf_header',
'title' => $Main->translate('Редактировать блок'),
'image' => 'edit',
'modal' => 'Y',
'can' => 'block|edit',
),
));
?>
<div class="uk-container uk-navbar">
<div class="uk-navbar-left">
<a href="/" class="uk-navbar-item uk-logo uk-display-block uk-padding-small-top uk-padding-small"><img src="/images/sitepro.svg" width="182" height="60" alt="Сайт PRO" class="uk-display-block"></a>
</div>
<div class="uk-navbar-right">
<div class="uk-visible@l">
<menu class="uk-navbar-nav">
<?=$Main->displayMenuHead()?>
</menu>
</div>
<button type="button" class="uk-navbar-toggle uk-text-large uk-hidden@l"><i class="las la-bars"></i></button>
</div>
</div>
</div>
<aside uk-offcanvas="flip: true; overlay: true">
<div class="uk-offcanvas-bar">
<button type="button" class="uk-offcanvas-close uk-text-large"><i class="las la-times"></i></button>
<div class="uk-card uk-card-muted">
<div class="uk-card-header"></div>
<div class="uk-card-body uk-padding-remove">
<menu class="uk-nav uk-nav-divider"></menu>
</div>
</div>
</div>
</aside>
<script>
<?=@file_get_contents($root . '/script/header.js')?>
</script>
</header>
<main>
<?php if ($isForm || !$Page->getInfo('no-container')) { ?><section class="uk-section uk-background-muted"><div class="uk-container"><?php } ?>
<?php if (!$Page->getInfo('no-path')) if ($html = $Main->displayPath()) { ?><ul class="uk-breadcrumb" itemscope itemtype="https://schema.org/BreadcrumbList"><?=$html?></ul><?php } ?>
<?php if ($html = $Main->displayH1()) { ?><h1<?=$Page->getInfo('no-h1') ? ' class="uk-hidden"' : ''?>><?=$html?></h1><?php } ?>
<div class="uk-clearfix">
<?=$Main->displayPage()?>
</div>
<?php if ($isForm || !$Page->getInfo('no-container')) { ?></div></section><?php } ?>
</main>
<footer class="uk-margin-auto-top">
<div class="uk-section uk-background-secondary uk-light">
<div class="uk-container">
<br>
</div>
</div>
</footer>
<script>
cmsRequire(['jquery'], function($) {
$(window).data('fastready', true).triggerHandler('fastready');
});
</script>
</body>
</html>