mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
- Flat purple-gradient nav bar with POSTERG/RÉPERTOIRE/À PROPOS links - Full-width search bar with icon, bottom-border only, below nav - Home: white bg, media card grid (thumbnail + author/title label below) - Répertoire: 4-column index (Années/Catégories/Étudiantes/Mots-clés) - TFE: 2-column layout (large text left, media right) - À Propos: 2-column, large monospace text, new apropos.php page - Admin: dark theme (#1a1a1a), purple gradient nav, bottom-border inputs - New shared partials: templates/nav.php, templates/search-bar.php - Rewrote all CSS: common, main, search, tfe, apropos, admin
36 lines
1.7 KiB
PHP
36 lines
1.7 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="stylesheet" href="/assets/modern-normalize.min.css">
|
||
<link rel="stylesheet" href="/assets/admin.css">
|
||
<?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">
|
||
<nav class="admin-nav">
|
||
<a href="/admin/" class="admin-nav__logo">Posterg</a>
|
||
<?php
|
||
$currentPage = basename($_SERVER['PHP_SELF']);
|
||
$thesisId = $_GET['id'] ?? null;
|
||
?>
|
||
<a href="/admin/" class="admin-nav__link <?= $currentPage === 'index.php' ? 'active' : '' ?>">Liste des TFE</a>
|
||
<a href="/admin/add.php" class="admin-nav__link <?= $currentPage === 'add.php' ? 'active' : '' ?>">Ajouter un TFE</a>
|
||
<a href="/admin/import.php" class="admin-nav__link <?= $currentPage === 'import.php' ? 'active' : '' ?>">Importer une liste de TFE</a>
|
||
<?php if ($thesisId && in_array($currentPage, ['edit.php', 'thanks.php'])): ?>
|
||
<a href="/admin/edit.php?id=<?= intval($thesisId) ?>" class="admin-nav__link <?= $currentPage === 'edit.php' ? 'active' : '' ?>">Modifier</a>
|
||
<?php endif; ?>
|
||
<?php if (defined('ADMIN_PASSWORD_HASH')): ?>
|
||
<a href="/admin/logout.php" class="admin-nav__link" style="margin-left:auto;opacity:.6;">Déconnexion</a>
|
||
<?php endif; ?>
|
||
</nav>
|