mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-07 11:39:18 +02:00
templates/admin/head.php:
- admin-nav__logo now href="/" with target="_blank" rel="noopener noreferrer"
- Left arrow prefix (← via ←, aria-hidden) signals leaving admin
- sr-only suffix "(site public, nouvel onglet)" for screen readers
public/admin/login.php:
- Same treatment on the standalone login nav (was a bare <span>)
public/assets/css/admin.css:
- admin-nav__list: flex:1 removed; margin-left:auto added
→ entire link list now right-justified inside the nav bar,
mirroring the layout of the public site header
- .admin-nav__logout { margin-left:auto } removed (no longer needed;
logout is just the last item in a right-aligned list)
49 lines
2.8 KiB
PHP
49 lines
2.8 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 ?? 'Admin') ?> – Posterg</title>
|
||
<link rel="icon" type="image/svg+xml" href="/assets/admin_favicon.svg">
|
||
<link rel="stylesheet" href="/assets/css/modern-normalize.min.css">
|
||
<link rel="stylesheet" href="/assets/css/admin.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>
|
||
<body class="admin-body">
|
||
<a href="#main-content" class="skip-link">Aller au contenu principal</a>
|
||
<nav class="admin-nav" aria-label="Navigation admin">
|
||
<a href="/" class="admin-nav__logo" target="_blank" rel="noopener noreferrer">
|
||
<span aria-hidden="true">← </span>Posterg<span class="sr-only"> (site public, nouvel onglet)</span>
|
||
</a>
|
||
<?php
|
||
$currentPage = basename($_SERVER['PHP_SELF']);
|
||
$thesisId = $_GET['id'] ?? null;
|
||
?>
|
||
<ul class="admin-nav__list">
|
||
<li><a href="/admin/" <?= $currentPage === 'index.php' ? 'aria-current="page"' : '' ?>>Liste des TFE</a></li>
|
||
<li><a href="/admin/add.php" <?= $currentPage === 'add.php' ? 'aria-current="page"' : '' ?>>Ajouter un TFE</a></li>
|
||
<li><a href="/admin/import.php" <?= $currentPage === 'import.php' ? 'aria-current="page"' : '' ?>>Importer une liste de TFE</a></li>
|
||
<li><a href="/admin/pages.php" <?= in_array($currentPage, ['pages.php','pages-edit.php']) ? 'aria-current="page"' : '' ?>>Pages statiques</a></li>
|
||
<li><a href="/admin/tags.php" <?= $currentPage === 'tags.php' ? 'aria-current="page"' : '' ?>>Mots-clés</a></li>
|
||
<li><a href="/admin/system.php" <?= in_array($currentPage, ['system.php','status.php','logs.php']) ? 'aria-current="page"' : '' ?>>Système</a></li>
|
||
<li><a href="/admin/account.php" <?= $currentPage === 'account.php' ? 'aria-current="page"' : '' ?>>Compte</a></li>
|
||
<?php if ($thesisId && in_array($currentPage, ['edit.php', 'thanks.php'])): ?>
|
||
<li><a href="/admin/edit.php?id=<?= intval($thesisId) ?>" <?= $currentPage === 'edit.php' ? 'aria-current="page"' : '' ?>>Modifier</a></li>
|
||
<?php endif; ?>
|
||
<?php if (defined('ADMIN_PASSWORD_HASH')): ?>
|
||
<li class="admin-nav__logout"><a href="/admin/logout.php">Déconnexion</a></li>
|
||
<?php endif; ?>
|
||
</ul>
|
||
</nav>
|