2015-04-23 10:24:50 +02:00
|
|
|
<!DOCTYPE html>
|
2019-12-05 21:25:58 +01:00
|
|
|
<html class="no-js" lang="<?=$config->getLanguage() ?>">
|
2015-04-23 10:24:50 +02:00
|
|
|
<head>
|
2019-12-05 21:25:58 +01:00
|
|
|
<title><?= $page['title']; ?> <?= ($page['title'] != $config->getTitle()) ? '- ' . $config->getTitle() : "" ?></title>
|
2020-04-24 22:22:57 +02:00
|
|
|
<?php
|
|
|
|
//SEO meta tags...
|
|
|
|
$meta = [];
|
|
|
|
|
2018-02-25 20:12:18 +01:00
|
|
|
if (array_key_exists('attributes', $page) && array_key_exists('description', $page['attributes'])) {
|
2020-04-24 22:22:57 +02:00
|
|
|
$meta['description'] = $page['attributes']['description'];
|
2019-12-05 21:25:58 +01:00
|
|
|
} elseif ($config->hasTagline()) {
|
2020-04-24 22:22:57 +02:00
|
|
|
$meta['description'] = $config->getTagLine();
|
2017-11-07 22:39:34 +01:00
|
|
|
}
|
2018-02-25 20:12:18 +01:00
|
|
|
if (array_key_exists('attributes', $page) && array_key_exists('keywords', $page['attributes'])) {
|
2020-04-24 22:22:57 +02:00
|
|
|
$meta['keywords'] = $page['attributes']['keywords'];
|
2017-11-07 22:39:34 +01:00
|
|
|
}
|
2018-02-25 20:12:18 +01:00
|
|
|
if (array_key_exists('attributes', $page) && array_key_exists('author', $page['attributes'])) {
|
2020-04-24 22:22:57 +02:00
|
|
|
$meta['author'] = $page['attributes']['author'];
|
2019-12-05 21:25:58 +01:00
|
|
|
} elseif ($config->hasAuthor()) {
|
2020-04-24 22:22:57 +02:00
|
|
|
$meta['author'] = $config->getAuthor();
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach ($meta as $name => $content) {
|
|
|
|
echo " <meta name=\"{$name}\" content=\"{$content}\">\n";
|
2017-11-07 22:39:34 +01:00
|
|
|
}
|
|
|
|
?>
|
2015-04-23 10:24:50 +02:00
|
|
|
<meta charset="UTF-8">
|
2017-10-19 21:20:58 +02:00
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
|
|
2019-12-05 21:25:58 +01:00
|
|
|
<link rel="icon" href="<?= $config->getTheme()->getFavicon(); ?>" type="image/x-icon">
|
2017-10-19 21:20:58 +02:00
|
|
|
|
2015-04-23 10:24:50 +02:00
|
|
|
<!-- Mobile -->
|
|
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
|
2019-08-11 15:15:11 +02:00
|
|
|
<!-- JS -->
|
2019-09-20 23:10:01 +02:00
|
|
|
<script>
|
2020-04-24 22:22:57 +02:00
|
|
|
window.base_url = "<?= $base_url?>";
|
2019-09-20 23:10:01 +02:00
|
|
|
document.documentElement.classList.remove('no-js');
|
|
|
|
</script>
|
2019-08-11 15:15:11 +02:00
|
|
|
|
2015-04-23 10:24:50 +02:00
|
|
|
<!-- Font -->
|
2020-04-24 22:22:57 +02:00
|
|
|
<?php foreach ($config->getTheme()->getFonts() as $font) { ?>
|
|
|
|
<link href='<?= $font; ?>' rel='stylesheet' type='text/css'>
|
|
|
|
<?php } ?>
|
2015-04-23 10:24:50 +02:00
|
|
|
|
|
|
|
<!-- CSS -->
|
2020-04-24 22:22:57 +02:00
|
|
|
<?php foreach ($config->getTheme()->getCSS() as $css) { ?>
|
|
|
|
<link href='<?= $css; ?>' rel='stylesheet' type='text/css'>
|
|
|
|
<?php } ?>
|
2015-04-23 10:24:50 +02:00
|
|
|
</head>
|
2019-09-21 22:00:00 +02:00
|
|
|
<body class="<?= $this->section('classes'); ?>">
|
2015-04-23 10:24:50 +02:00
|
|
|
<?= $this->section('content'); ?>
|
|
|
|
|
2015-07-20 15:59:52 +02:00
|
|
|
<?php
|
2019-12-05 21:25:58 +01:00
|
|
|
if ($config->getHTML()->hasGoogleAnalytics()) {
|
|
|
|
$this->insert('theme::partials/google_analytics', ['analytics' => $config->getHTML()->getGoogleAnalyticsId(), 'host' => $config->hasHost() ? $config->getHost() : '']);
|
2015-07-20 15:59:52 +02:00
|
|
|
}
|
2019-12-05 21:25:58 +01:00
|
|
|
if ($config->getHTML()->hasPiwikAnalytics()) {
|
|
|
|
$this->insert('theme::partials/piwik_analytics', ['url' => $config->getHTML()->getPiwikAnalyticsUrl(), 'id' => $config->getHTML()->getPiwikAnalyticsId()]);
|
2015-07-20 15:59:52 +02:00
|
|
|
}
|
2020-04-24 22:22:57 +02:00
|
|
|
if ($config->getHTML()->hasPlausibleAnalyticsDomain()) {
|
|
|
|
$this->insert('theme::partials/plausible_analytics', ['domain' => $config->getHTML()->getPlausibleAnalyticsDomain()]);
|
|
|
|
}
|
2015-07-20 15:59:52 +02:00
|
|
|
?>
|
2015-04-23 10:24:50 +02:00
|
|
|
|
|
|
|
<!-- JS -->
|
2020-04-24 22:22:57 +02:00
|
|
|
<?php foreach ($config->getTheme()->getJS() as $js) { ?>
|
|
|
|
<script src="<?= $js; ?>"></script>
|
|
|
|
<?php } ?>
|
2015-04-23 10:24:50 +02:00
|
|
|
|
2019-09-09 19:56:14 +02:00
|
|
|
<?php $this->insert('theme::partials/search_script', ['page' => $page, 'base_url' => $base_url]); ?>
|
2015-04-23 10:24:50 +02:00
|
|
|
</body>
|
|
|
|
</html>
|