Initial commit
This commit is contained in:
+115
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
/**
|
||||
* AegisOne Engineering — Общий шаблон <head> и <header> для публичных страниц
|
||||
*
|
||||
* Подключается после установки переменных:
|
||||
* $pageKey — ключ из массива $SEO
|
||||
* $canonical — канонический URL (с ведущим слешем, напр. /audit/)
|
||||
*
|
||||
* Дополнительно (опционально):
|
||||
* $robots — значение <meta name="robots"> (по умолчанию не выводится)
|
||||
*
|
||||
* Стек:
|
||||
* config.php → seo.php → form-handler.php → header.php → контент → footer.php
|
||||
*/
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title><?= $SEO[$pageKey]['title'] ?></title>
|
||||
<meta name="description" content="<?= $SEO[$pageKey]['description'] ?>">
|
||||
<meta name="keywords" content="<?= $SEO[$pageKey]['keywords'] ?>">
|
||||
<link rel="canonical" href="https://<?= $_SERVER['HTTP_HOST'] ?><?= $canonical ?? '/' ?>">
|
||||
<?php if (!empty($robots)): ?>
|
||||
<meta name="robots" content="<?= $robots ?>">
|
||||
<?php endif; ?>
|
||||
<link rel="icon" type="image/x-icon" href="/assets/img/favicon.ico">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/assets/img/favicon-16x16.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/assets/img/favicon-32x32.png">
|
||||
<link rel="apple-touch-icon" href="/assets/img/apple-touch-icon.png">
|
||||
<link rel="manifest" href="/site.webmanifest">
|
||||
<meta name="msapplication-TileImage" content="/assets/img/android-chrome-192x192.png">
|
||||
<link rel="stylesheet" href="/style.php">
|
||||
<script>
|
||||
(function(){
|
||||
var t=localStorage.getItem('theme')||'system';
|
||||
var d=t==='system'?(window.matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light'):t;
|
||||
document.documentElement.setAttribute('data-theme',d);
|
||||
})();
|
||||
</script>
|
||||
<?php if (file_exists(__DIR__ . '/analytics.php')) require __DIR__ . '/analytics.php'; ?>
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "Organization",
|
||||
"name": "<?= SITE_LEGAL_NAME ?>",
|
||||
"description": "Инженерные решения для безопасности бизнеса",
|
||||
"url": "https://<?= SITE_DOMAIN ?>",
|
||||
"logo": "https://<?= SITE_DOMAIN ?>/logo.php",
|
||||
"telephone": "<?= PHONE_MAIN ?>",
|
||||
"email": "<?= SITE_MAIL ?>",
|
||||
"contactPoint": {
|
||||
"@type": "ContactPoint",
|
||||
"telephone": "<?= PHONE_MAIN ?>",
|
||||
"contactType": "sales",
|
||||
"availableLanguage": ["Russian"]
|
||||
},
|
||||
"address": {
|
||||
"@type": "PostalAddress",
|
||||
"addressLocality": "Краснодар",
|
||||
"addressRegion": "Краснодарский край",
|
||||
"postalCode": "350072",
|
||||
"streetAddress": "ул. Московская, д. 81/1, пом. 25"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<?php if (file_exists(__DIR__ . '/analytics-body.php')) require __DIR__ . '/analytics-body.php'; ?>
|
||||
<div class="cookie-banner" id="cookie-banner">
|
||||
<div class="container cookie-banner__inner">
|
||||
<p>Мы используем cookie-файлы. Продолжая использовать сайт, вы соглашаетесь с <a href="/politica.php">политикой обработки персональных данных</a>.</p>
|
||||
<button class="btn" id="cookie-accept">Принять</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<header class="header">
|
||||
<div class="container header__inner">
|
||||
<div class="header__logo">
|
||||
<a href="/"><img src="/logo.php" alt="<?= SITE_NAME ?>"></a>
|
||||
</div>
|
||||
<nav class="header__nav">
|
||||
<ul class="header__menu">
|
||||
<?php if ($pageKey === 'main'): ?>
|
||||
<li><a href="#problems">Проблемы</a></li>
|
||||
<li><a href="#services">Услуги</a></li>
|
||||
<li><a href="#about">О нас</a></li>
|
||||
<li><a href="#cases">Кейсы</a></li>
|
||||
<li><a href="#faq">Вопросы</a></li>
|
||||
<li><a href="#contacts">Контакты</a></li>
|
||||
<?php else: ?>
|
||||
<li><a href="/#services">Услуги</a></li>
|
||||
<li><a href="/#about">О нас</a></li>
|
||||
<li><a href="/#cases">Кейсы</a></li>
|
||||
<li><a href="/blog/">Блог</a></li>
|
||||
<li><a href="#faq">Вопросы</a></li>
|
||||
<li><a href="#contacts">Контакты</a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</nav>
|
||||
<div class="header__phone">
|
||||
<a href="tel:+<?= PHONE_MAIN_LINK ?>"><?= PHONE_MAIN ?></a>
|
||||
</div>
|
||||
<div class="theme-switcher" id="theme-switcher" title="Сменить тему оформления">
|
||||
<button class="theme-switcher__btn" id="theme-btn" aria-label="Переключить тему">
|
||||
<span class="theme-switcher__icon" id="theme-icon"></span>
|
||||
</button>
|
||||
<div class="theme-switcher__tooltip" id="theme-tooltip"></div>
|
||||
</div>
|
||||
<button class="burger" id="burger">
|
||||
<span></span><span></span><span></span>
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
Reference in New Issue
Block a user