mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
- templates/public/head.php: emit <meta name="description"> when $metaDescription is set - index.php: title → 'Posterg – Mémoires de l\'ERG'; description = site blurb - tfe.php: title → '[Titre] – [Auteur] – Posterg'; description = synopsis excerpt (strip_tags, truncate 160) - search.php: description = répertoire purpose blurb - apropos.php: description = about-page blurb - licence.php: description = licences blurb Fixes WCAG 2.4.2 (Page Titled) for index.php and tfe.php. All descriptions properly htmlspecialchars-escaped at render time.
26 lines
1.0 KiB
PHP
26 lines
1.0 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title><?= htmlspecialchars($pageTitle ?? 'Posterg') ?></title>
|
|
<?php if (!empty($metaDescription)): ?>
|
|
<meta name="description" content="<?= htmlspecialchars($metaDescription) ?>">
|
|
<?php endif; ?>
|
|
<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 foreach ($extraCss ?? [] as $css): ?>
|
|
<link rel="stylesheet" href="<?= htmlspecialchars($css) ?>">
|
|
<?php endforeach; ?>
|
|
<?php if (php_sapi_name() === 'cli-server'): ?>
|
|
<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>
|