1
0
Fork 0
template/site-header.php

68 lines
3.5 KiB
PHP
Raw Normal View History

2024-04-25 21:55:08 +02:00
<?php
require_once 'site-settings.php';
echo '<!DOCTYPE html>';
2024-04-28 14:31:08 +02:00
echo '<html lang="'.$config_sitelang.'">';
2024-04-25 21:55:08 +02:00
echo '<head>';
echo '<title>';
echo (empty($site_title) ? 'Template' : $site_title);
echo '</title>';
echo '<meta charset="UTF-8">';
echo '<meta name="theme-color" content="#272e33">';
echo '<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes, maximum-scale=3">';
echo (count($robots) == 0 ? null : '<meta name="robots" content="'.implode(',', $robots).'">');
echo (count($google) == 0 ? null : '<meta name="robots" content="'.implode(',', $google).'">');
2024-04-28 14:31:08 +02:00
echo '<meta name="description" content="'.$lang['metadata']['description'].'">';
2024-04-25 21:55:08 +02:00
echo '<meta http-equiv="cache-control" content="cache">';
echo '<meta http-equiv="expires" content="'.(60*60*24).'">';
2024-04-28 14:31:08 +02:00
echo '<meta property="og:locale" content="'.$lang['metadata']['locale'].'">';
2024-04-25 21:55:08 +02:00
echo '<meta property="og:title" content="'.$site_title.'">';
echo '<meta property="og:site_name" content="'.$site_title.'">';
echo '<meta property="og:type" content="website">';
echo '<meta property="og:url" content="'.$site_url_current.'">';
2024-04-28 14:31:08 +02:00
echo '<meta property="og:description" content="'.$lang['metadata']['description'].'">';
2024-04-25 21:55:08 +02:00
if(!empty($metadata_image)) {
echo '<meta property="og:image" content="'.$metadata_image.'">';
echo '<meta property="og:image:secure_url" content="'.$metadata_image.'">';
echo '<meta property="og:image:height" content="'.($filename == null ? '512' : '256').'">';
echo '<meta property="og:image:width" content="'.($filename == null ? '512' : '256').'">';
echo '<meta property="og:image:type" content="image/jpeg">';
}
2024-04-28 14:31:08 +02:00
echo '<meta property="twitter:card" content="summary_large_image">';
2024-04-25 21:55:08 +02:00
echo '<meta property="twitter:url" content="'.$site_url_current.'">';
echo '<meta property="twitter:title" content="'.$site_title.'">';
2024-04-28 14:31:08 +02:00
echo '<meta property="twitter:description" content="'.$lang['metadata']['description'].'">';
2024-04-25 21:55:08 +02:00
echo (empty($metadata_image) ? null : '<meta property="twitter:image" content="'.$metadata_image.'">');
echo '<link rel="canonical" href="'.$site_url_current.'">';
echo '<link href="'.$site_url.'" rel="me">';
echo (file_exists('manifest.json') ? '<link rel="manifest" href="'.url('manifest.json').'" crossorigin="use-credentials">' : null);
echo '<link type="image/x-icon" rel="icon" href="'.$site_favicon.'">';
echo (empty($site_url_cdn) ? null : '<link rel="dns-prefetch" href="'.$site_url_cdn.'" crossorigin="">');
2024-04-28 14:31:08 +02:00
echo '<link type="text/css" rel="stylesheet preload" as="style" href="'.url((file_exists('css/desktop.min.css') ? 'css/desktop.min.css' : 'css/desktop.css?'.time())).'">';
echo (!file_exists('css/pages/'.str_replace('.php', '.css', $filename)) ? null : '<link type="text/css" rel="stylesheet preload" as="style" href="'.url((file_exists('css/pages/minified/'.str_replace('.php', '.css', $filename)) ? 'css/pages/minified/'.str_replace('.php', '.css', $filename) : 'css/pages/'.str_replace('.php', '.css', $filename).'?'.time())).'">');
echo '<link type="text/css" rel="stylesheet preload" as="style" href="'.url((file_exists('css/portable.min.css') ? 'css/portable.min.css' : 'css/portable.css?'.time())).'">';
2024-04-25 21:55:08 +02:00
echo '</head>';
echo '<body';
echo ' data-folder="'.(empty($config_folder) ? '/' : '/'.$config_folder.'/').'"';
echo ' data-debugging="'.($debugging == false ? 'n' : 'y').'"';
echo '>';
echo '<section id="website">';
echo '<main>';
?>