mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 11:09:18 +02:00
admin/thanks.php:
- <div style="margin-top:1.5rem;display:flex;gap:.75rem;flex-wrap:wrap;"> → class="admin-action-bar"
- <p style="color:var(--text-secondary);"> → class="admin-muted"
admin/pages.php:
- Éditer button style="font-size:.8rem;padding:.3rem .75rem;" → class="admin-btn admin-btn--sm"
admin.css (Thesis info sections block):
- Added .admin-action-bar { margin-top:1.5rem; display:flex; gap:0.75rem; flex-wrap:wrap }
- Added .admin-muted { color: var(--text-secondary) }
The only remaining inline style in any admin PHP file is the dynamic
--disk-pct/--disk-color custom properties on the disk bar in system.php,
which carry PHP runtime values and cannot be moved to static CSS.
54 lines
1.6 KiB
PHP
54 lines
1.6 KiB
PHP
<?php
|
|
require_once __DIR__ . "/../../config/bootstrap.php";
|
|
require_once __DIR__ . '/../../src/AdminAuth.php';
|
|
AdminAuth::requireLogin();
|
|
|
|
require_once __DIR__ . '/../../src/Database.php';
|
|
|
|
$pageTitle = "Pages statiques";
|
|
|
|
try {
|
|
$db = new Database();
|
|
$pages = $db->getAllPages();
|
|
} catch (Exception $e) {
|
|
error_log("Error loading pages: " . $e->getMessage());
|
|
die("Erreur lors du chargement des pages.");
|
|
}
|
|
|
|
// Flash messages are consumed by the flash-messages partial below.
|
|
?>
|
|
<?php $isAdmin = true; $bodyClass = 'admin-body'; require_once APP_ROOT . '/templates/head.php'; ?>
|
|
<?php include APP_ROOT . '/templates/header.php'; ?>
|
|
|
|
<main id="main-content">
|
|
<h1>Pages statiques</h1>
|
|
|
|
<?php include APP_ROOT . '/templates/partials/flash-messages.php'; ?>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">Slug</th>
|
|
<th scope="col">Titre</th>
|
|
<th scope="col">Mis à jour</th>
|
|
<th scope="col">Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($pages as $p): ?>
|
|
<tr>
|
|
<td><code><?= htmlspecialchars($p['slug']) ?></code></td>
|
|
<td><?= htmlspecialchars($p['title']) ?></td>
|
|
<td><?= htmlspecialchars($p['updated_at'] ?? '—') ?></td>
|
|
<td>
|
|
<a href="/admin/pages-edit.php?slug=<?= urlencode($p['slug']) ?>"
|
|
class="admin-btn admin-btn--sm">Éditer</a>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</main>
|
|
|
|
<?php require_once APP_ROOT . '/templates/admin/footer.php'; ?>
|