mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
merge head/nav templates into unified head.php + header.php; semantic CSS for nav
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 ──────────────────────────────────────────────────── */
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -34,13 +34,10 @@ $ogTags = [
|
||||
'site_name' => 'Posterg – ERG',
|
||||
];
|
||||
$extraCss = ['/assets/css/apropos.css'];
|
||||
$bodyClass = 'apropos-body';
|
||||
?>
|
||||
<?php include APP_ROOT . '/templates/public/head.php'; ?>
|
||||
<body class="apropos-body">
|
||||
<a href="#main-content" class="skip-link">Aller au contenu principal</a>
|
||||
|
||||
<?php include APP_ROOT . '/templates/nav.php'; ?>
|
||||
<?php include APP_ROOT . '/templates/search-bar.php'; ?>
|
||||
<?php include APP_ROOT . '/templates/head.php'; ?>
|
||||
<?php include APP_ROOT . '/templates/header.php'; ?>
|
||||
|
||||
<main class="apropos-main" id="main-content">
|
||||
<div class="apropos-layout">
|
||||
|
||||
@@ -21,8 +21,12 @@
|
||||
/* font-family inherited from common.css body */
|
||||
}
|
||||
|
||||
/* Admin nav (dark version of site-nav) */
|
||||
.admin-nav {
|
||||
/* Admin header / nav */
|
||||
.admin-body header {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.admin-body header nav {
|
||||
background: linear-gradient(
|
||||
to bottom,
|
||||
var(--admin-purple) 0%,
|
||||
@@ -32,10 +36,9 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2.5rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.admin-nav__logo {
|
||||
.admin-body header nav > a {
|
||||
font-size: 0.88rem;
|
||||
letter-spacing: 0.12em;
|
||||
text-transform: uppercase;
|
||||
@@ -44,8 +47,7 @@
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
/* Nav link list */
|
||||
.admin-nav__list {
|
||||
.admin-body header nav ul {
|
||||
list-style: none;
|
||||
margin: 0 0 0 auto;
|
||||
padding: 0;
|
||||
@@ -54,7 +56,7 @@
|
||||
gap: 2.5rem;
|
||||
}
|
||||
|
||||
.admin-nav__list a {
|
||||
.admin-body header nav ul a {
|
||||
font-size: 0.85rem;
|
||||
letter-spacing: 0.1em;
|
||||
text-transform: uppercase;
|
||||
@@ -64,23 +66,23 @@
|
||||
transition: opacity 0.15s;
|
||||
}
|
||||
|
||||
.admin-nav__list a:hover,
|
||||
.admin-nav__list a[aria-current="page"] {
|
||||
.admin-body header nav ul a:hover,
|
||||
.admin-body header nav ul a[aria-current="page"] {
|
||||
opacity: 1;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.admin-nav__list a[aria-current="page"] {
|
||||
.admin-body header nav ul a[aria-current="page"] {
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.6);
|
||||
padding-bottom: 1px;
|
||||
}
|
||||
|
||||
/* Logout link — visually subdued, last in list */
|
||||
.admin-nav__logout a {
|
||||
/* Logout — visually subdued */
|
||||
.admin-body header nav ul [data-nav-logout] a {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.admin-nav__logout a:hover {
|
||||
.admin-body header nav ul [data-nav-logout] a:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,9 +49,13 @@ a:hover {
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
NAV BAR (shared across all public pages)
|
||||
HEADER / NAV BAR (public pages)
|
||||
============================================================ */
|
||||
.site-nav {
|
||||
header {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
header nav {
|
||||
background: linear-gradient(
|
||||
to bottom,
|
||||
var(--purple) 0%,
|
||||
@@ -61,11 +65,9 @@ a:hover {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-shrink: 0;
|
||||
/* height: 3ch; */
|
||||
}
|
||||
|
||||
.site-nav__logo {
|
||||
header nav > a {
|
||||
font-family: "police1", sans-serif;
|
||||
font-size: 0.95rem;
|
||||
letter-spacing: 0.12em;
|
||||
@@ -75,7 +77,7 @@ a:hover {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.site-nav ul {
|
||||
header nav ul {
|
||||
display: flex;
|
||||
gap: 3rem;
|
||||
align-items: center;
|
||||
@@ -84,7 +86,7 @@ a:hover {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.site-nav ul a {
|
||||
header nav ul a {
|
||||
font-size: 0.85rem;
|
||||
letter-spacing: 0.12em;
|
||||
text-transform: uppercase;
|
||||
@@ -94,11 +96,11 @@ a:hover {
|
||||
transition: opacity 0.15s;
|
||||
}
|
||||
|
||||
.site-nav ul a:hover {
|
||||
header nav ul a:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.site-nav ul a[aria-current="page"] {
|
||||
header nav ul a[aria-current="page"] {
|
||||
opacity: 1;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.6);
|
||||
padding-bottom: 1px;
|
||||
|
||||
@@ -60,13 +60,10 @@ $ogTags = [
|
||||
'site_name' => 'Posterg – ERG',
|
||||
];
|
||||
$extraCss = ['/assets/css/main.css'];
|
||||
$bodyClass = 'home-body';
|
||||
?>
|
||||
<?php include APP_ROOT . '/templates/public/head.php'; ?>
|
||||
<body class="home-body">
|
||||
<a href="#main-content" class="skip-link">Aller au contenu principal</a>
|
||||
|
||||
<?php include APP_ROOT . '/templates/nav.php'; ?>
|
||||
<?php include APP_ROOT . '/templates/search-bar.php'; ?>
|
||||
<?php include APP_ROOT . '/templates/head.php'; ?>
|
||||
<?php include APP_ROOT . '/templates/header.php'; ?>
|
||||
|
||||
<?php if ($year): ?>
|
||||
<p class="filter-info" role="status">
|
||||
|
||||
@@ -30,13 +30,10 @@ $ogTags = [
|
||||
'site_name' => 'Posterg – ERG',
|
||||
];
|
||||
$extraCss = ['/assets/css/apropos.css'];
|
||||
$bodyClass = 'apropos-body';
|
||||
?>
|
||||
<?php include APP_ROOT . '/templates/public/head.php'; ?>
|
||||
<body class="apropos-body">
|
||||
<a href="#main-content" class="skip-link">Aller au contenu principal</a>
|
||||
|
||||
<?php include APP_ROOT . '/templates/nav.php'; ?>
|
||||
<?php include APP_ROOT . '/templates/search-bar.php'; ?>
|
||||
<?php include APP_ROOT . '/templates/head.php'; ?>
|
||||
<?php include APP_ROOT . '/templates/header.php'; ?>
|
||||
|
||||
<main class="apropos-main" id="main-content">
|
||||
<div class="prose apropos-single">
|
||||
|
||||
@@ -110,13 +110,10 @@ $ogTags = [
|
||||
'site_name' => 'Posterg – ERG',
|
||||
];
|
||||
$extraCss = ['/assets/css/search.css'];
|
||||
$bodyClass = 'search-body';
|
||||
?>
|
||||
<?php include APP_ROOT . '/templates/public/head.php'; ?>
|
||||
<body class="search-body">
|
||||
<a href="#main-content" class="skip-link">Aller au contenu principal</a>
|
||||
|
||||
<?php include APP_ROOT . '/templates/nav.php'; ?>
|
||||
<?php include APP_ROOT . '/templates/search-bar.php'; ?>
|
||||
<?php include APP_ROOT . '/templates/head.php'; ?>
|
||||
<?php include APP_ROOT . '/templates/header.php'; ?>
|
||||
|
||||
<?php if ($validationError): ?>
|
||||
<div class="search-error">⚠ <?= htmlspecialchars($validationError) ?></div>
|
||||
|
||||
@@ -57,13 +57,10 @@ unset($_ogBaseUrl, $_ogImage);
|
||||
// --- End Open Graph ----------------------------------------------------------
|
||||
|
||||
$extraCss = ['/assets/css/tfe.css'];
|
||||
$bodyClass = 'tfe-body';
|
||||
?>
|
||||
<?php include APP_ROOT . '/templates/public/head.php'; ?>
|
||||
<body class="tfe-body">
|
||||
<a href="#main-content" class="skip-link">Aller au contenu principal</a>
|
||||
|
||||
<?php include APP_ROOT . '/templates/nav.php'; ?>
|
||||
<?php include APP_ROOT . '/templates/search-bar.php'; ?>
|
||||
<?php include APP_ROOT . '/templates/head.php'; ?>
|
||||
<?php include APP_ROOT . '/templates/header.php'; ?>
|
||||
|
||||
<main class="tfe-main" id="main-content">
|
||||
<article class="tfe-layout">
|
||||
|
||||
Reference in New Issue
Block a user