mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
Extract last 3 inline styles from admin templates into CSS classes
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.
This commit is contained in:
@@ -42,7 +42,7 @@ try {
|
||||
<td><?= htmlspecialchars($p['updated_at'] ?? '—') ?></td>
|
||||
<td>
|
||||
<a href="/admin/pages-edit.php?slug=<?= urlencode($p['slug']) ?>"
|
||||
class="admin-btn" style="font-size:.8rem;padding:.3rem .75rem;">Éditer</a>
|
||||
class="admin-btn admin-btn--sm">Éditer</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
@@ -138,14 +138,14 @@ $pageTitle = "Récapitulatif TFE";
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
|
||||
<div style="margin-top:1.5rem;display:flex;gap:.75rem;flex-wrap:wrap;">
|
||||
<div class="admin-action-bar">
|
||||
<a href="/admin/edit.php?id=<?= $thesisId ?>" class="admin-btn">Modifier</a>
|
||||
<a href="/admin/add.php" class="admin-btn-secondary">Ajouter un autre TFE</a>
|
||||
<a href="/admin/" class="admin-btn-secondary">Retour à la liste</a>
|
||||
</div>
|
||||
|
||||
<?php else: ?>
|
||||
<p style="color:var(--text-secondary);">Aucune donnée à afficher.</p>
|
||||
<p class="admin-muted">Aucune donnée à afficher.</p>
|
||||
<p><a href="/admin/add.php" class="admin-btn-secondary">Retour au formulaire</a></p>
|
||||
<?php endif; ?>
|
||||
</main>
|
||||
|
||||
@@ -622,6 +622,17 @@
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.admin-action-bar {
|
||||
margin-top: 1.5rem;
|
||||
display: flex;
|
||||
gap: 0.75rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.admin-muted {
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
/* ── Section titles (account, etc.) ─────────────────────────────────────── */
|
||||
.admin-section-title {
|
||||
font-size: 1rem;
|
||||
|
||||
Reference in New Issue
Block a user