1
0
Fork 0
template/site-header.php

60 lines
3.9 KiB
PHP
Raw Normal View History

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