merge head/nav templates into unified head.php + header.php; semantic CSS for nav

This commit is contained in:
Pontoporeia
2026-03-31 22:22:56 +02:00
parent 4ff959a72d
commit 780b1b2a13
24 changed files with 162 additions and 137 deletions

View File

@@ -16,7 +16,8 @@ if (empty($_SESSION['csrf_token'])) {
$_SESSION['csrf_token'] = bin2hex(random_bytes(32));
}
?>
<?php require_once APP_ROOT . '/templates/admin/head.php'; ?>
<?php $isAdmin = true; $bodyClass = 'admin-body'; require_once APP_ROOT . '/templates/head.php'; ?>
<?php include APP_ROOT . '/templates/header.php'; ?>
<main class="admin-main" id="main-content">
<h1 class="admin-page-title">Compte administrateur</h1>

View File

@@ -39,7 +39,8 @@ function wasSelected($key, $value) {
return $formData[$key] == $value;
}
?>
<?php require_once APP_ROOT . '/templates/admin/head.php'; ?>
<?php $isAdmin = true; $bodyClass = 'admin-body'; require_once APP_ROOT . '/templates/head.php'; ?>
<?php include APP_ROOT . '/templates/header.php'; ?>
<main class="admin-main" id="main-content">
<h1 class="admin-page-title">Ajouter un TFE</h1>

View File

@@ -61,7 +61,8 @@ try {
die("Erreur lors du chargement: " . $e->getMessage());
}
?>
<?php require_once APP_ROOT . '/templates/admin/head.php'; ?>
<?php $isAdmin = true; $bodyClass = 'admin-body'; require_once APP_ROOT . '/templates/head.php'; ?>
<?php include APP_ROOT . '/templates/header.php'; ?>
<main class="admin-main" id="main-content">
<h1 class="admin-page-title">Modifier un TFE</h1>

View File

@@ -317,7 +317,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_FILES['csv_file'])) {
$_SESSION['csrf_token'] = bin2hex(random_bytes(32));
}
?>
<?php require_once APP_ROOT . '/templates/admin/head.php'; ?>
<?php $isAdmin = true; $bodyClass = 'admin-body'; require_once APP_ROOT . '/templates/head.php'; ?>
<?php include APP_ROOT . '/templates/header.php'; ?>
<main class="admin-main" id="main-content">
<h1 class="admin-page-title">Importer une liste de TFE</h1>

View File

@@ -30,7 +30,8 @@ try {
die("Erreur lors du chargement de la liste.");
}
?>
<?php require_once APP_ROOT . '/templates/admin/head.php'; ?>
<?php $isAdmin = true; $bodyClass = 'admin-body'; require_once APP_ROOT . '/templates/head.php'; ?>
<?php include APP_ROOT . '/templates/header.php'; ?>
<script>
function toggleAll(src) {

View File

@@ -23,7 +23,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$pageTitle = 'Connexion';
?>
<?php require_once APP_ROOT . '/templates/admin/head.php'; ?>
<?php $isAdmin = true; $bodyClass = 'admin-body'; require_once APP_ROOT . '/templates/head.php'; ?>
<?php include APP_ROOT . '/templates/header.php'; ?>
<div class="admin-login-wrap">
<div class="admin-login-box">

View File

@@ -78,7 +78,8 @@ var easyMDE = new EasyMDE({
});
JS;
?>
<?php require_once APP_ROOT . '/templates/admin/head.php'; ?>
<?php $isAdmin = true; $bodyClass = 'admin-body'; require_once APP_ROOT . '/templates/head.php'; ?>
<?php include APP_ROOT . '/templates/header.php'; ?>
<main class="admin-main" id="main-content">
<h1 class="admin-page-title">Éditer : <?= htmlspecialchars($page['title']) ?></h1>

View File

@@ -18,7 +18,8 @@ try {
$success = $_SESSION['success'] ?? null;
unset($_SESSION['success']);
?>
<?php require_once APP_ROOT . '/templates/admin/head.php'; ?>
<?php $isAdmin = true; $bodyClass = 'admin-body'; require_once APP_ROOT . '/templates/head.php'; ?>
<?php include APP_ROOT . '/templates/header.php'; ?>
<main class="admin-main" id="main-content">
<h1 class="admin-page-title">Pages statiques</h1>

View File

@@ -313,8 +313,9 @@ if ($activeTab === 'nginx_config') {
}
}
require_once APP_ROOT . '/templates/admin/head.php';
$isAdmin = true; $bodyClass = 'admin-body'; require_once APP_ROOT . '/templates/head.php';
?>
<?php include APP_ROOT . '/templates/header.php'; ?>
<style>
/* ── System page tabs ──────────────────────────────────────────────────── */

View File

@@ -22,7 +22,8 @@ $error = $_SESSION['admin_error'] ?? null;
$success = $_SESSION['admin_success'] ?? null;
unset($_SESSION['admin_error'], $_SESSION['admin_success']);
?>
<?php require_once APP_ROOT . '/templates/admin/head.php'; ?>
<?php $isAdmin = true; $bodyClass = 'admin-body'; require_once APP_ROOT . '/templates/head.php'; ?>
<?php include APP_ROOT . '/templates/header.php'; ?>
<main class="admin-main" id="main-content">
<h1 class="admin-page-title">Mots-clés (<?= count($tags) ?>)</h1>

View File

@@ -62,7 +62,8 @@ function formatFileSize($bytes) {
// Set page title for header
$pageTitle = "Récapitulatif TFE";
?>
<?php require_once APP_ROOT . '/templates/admin/head.php'; ?>
<?php $isAdmin = true; $bodyClass = 'admin-body'; require_once APP_ROOT . '/templates/head.php'; ?>
<?php include APP_ROOT . '/templates/header.php'; ?>
<main class="admin-main" id="main-content">
<h1 class="admin-page-title">Récapitulatif TFE</h1>