Files
xamxam/templates/head.php

33 lines
1.3 KiB
PHP

<!-- head.php - Shared HTML head section -->
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="">
<meta name="description" content="">
<title><?= isset($pageTitle) ? htmlspecialchars($pageTitle) . ' - Posterg' : 'Posterg' ?></title>
<link rel="icon" type="image/svg+xml" href="/assets/admin_favicon.svg">
<link rel="stylesheet" href="assets/modern-normalize.min.css">
<link rel="stylesheet" href="assets/common.css">
<?php if (isset($additionalCSS)): ?>
<?php foreach ((array)$additionalCSS as $css): ?>
<link rel="stylesheet" href="<?= htmlspecialchars($css) ?>">
<?php endforeach; ?>
<?php endif; ?>
<?php if (php_sapi_name() === 'cli-server'): ?>
<!-- Live reload for development -->
<script>
(function poll() {
fetch('/live-reload.php')
.then(r => r.json())
.then(d => {
if (d.changed) location.reload();
else setTimeout(poll, 1000);
})
.catch(() => setTimeout(poll, 2000));
})();
</script>
<?php endif; ?>
</head>