mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
Replace .admin-hint / .admin-field-hint with .admin-body form small
- admin.css: remove .admin-hint and .admin-field-hint class rules; add .admin-body form small with the same font-size/color/margin properties plus display:block so it stacks below sibling inputs; stub comment left where .admin-field-hint was to document the change - add.php: 5× <p class="admin-hint"> → <small> - edit.php: 3× <p class="admin-hint"> → <small> - import.php: <div class="admin-hint"> → <small> (block hint below CSV input) - pages-edit.php: class="admin-hint" removed from already-correct <small> - account.php: <p class="admin-field-hint"> → <small> Hint text is now styled purely via the semantic element selector; no class required on any hint element in admin templates.
This commit is contained in:
4
TODO.md
4
TODO.md
@@ -9,7 +9,7 @@
|
|||||||
- [ ] **`admin.css`**: Replace `.admin-form-row` with `.admin-body form > div` or `.admin-body form > .row` — form rows are always direct `<div>` children of `<form>`
|
- [ ] **`admin.css`**: Replace `.admin-form-row` with `.admin-body form > div` or `.admin-body form > .row` — form rows are always direct `<div>` children of `<form>`
|
||||||
- [ ] **`admin.css`**: Replace `.admin-label` with `.admin-body form label` — every label in admin forms
|
- [ ] **`admin.css`**: Replace `.admin-label` with `.admin-body form label` — every label in admin forms
|
||||||
- [ ] **`admin.css`**: Replace `.admin-input` / `.admin-select` / `.admin-textarea` with `.admin-body form input[type="text"]`, `.admin-body form select`, `.admin-body form textarea` — leverage native element selectors
|
- [ ] **`admin.css`**: Replace `.admin-input` / `.admin-select` / `.admin-textarea` with `.admin-body form input[type="text"]`, `.admin-body form select`, `.admin-body form textarea` — leverage native element selectors
|
||||||
- [ ] **`admin.css`**: Replace `.admin-hint` with `.admin-body form small` — use `<small>` instead of `<p class="admin-hint">`
|
- [x] **`admin.css`**: Replace `.admin-hint` with `.admin-body form small` — use `<small>` instead of `<p class="admin-hint">`
|
||||||
- [ ] **`admin.css`**: Replace `.admin-table` with `.admin-body table` — only one table per admin page
|
- [ ] **`admin.css`**: Replace `.admin-table` with `.admin-body table` — only one table per admin page
|
||||||
- [ ] **`admin.css`**: Replace `.admin-fieldset` / `.admin-fieldset-legend` with `.admin-body fieldset` / `.admin-body legend`
|
- [ ] **`admin.css`**: Replace `.admin-fieldset` / `.admin-fieldset-legend` with `.admin-body fieldset` / `.admin-body legend`
|
||||||
- [x] **`main.css`**: Replace `.card__caption` with `.home-body .cards-container li p` or target `li > a > p` directly
|
- [x] **`main.css`**: Replace `.card__caption` with `.home-body .cards-container li p` or target `li > a > p` directly
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
- [x] **`system.php`**: Move inline `<style>` block to `system.css` (already in TODO, reinforced here)
|
- [x] **`system.php`**: Move inline `<style>` block to `system.css` (already in TODO, reinforced here)
|
||||||
|
|
||||||
### Template HTML changes to match
|
### Template HTML changes to match
|
||||||
- [ ] In all admin templates, replace `<p class="admin-hint">` with `<small>` elements
|
- [x] In all admin templates, replace `<p class="admin-hint">` with `<small>` elements
|
||||||
- [x] In `tfe.php`, remove `class="tfe-meta-list"` — target via `article dl`
|
- [x] In `tfe.php`, remove `class="tfe-meta-list"` — target via `article dl`
|
||||||
- [x] In `tfe.php`, remove `class="tfe-media-block"` — target via `aside figure`
|
- [x] In `tfe.php`, remove `class="tfe-media-block"` — target via `aside figure`
|
||||||
- [x] In `tfe.php`, remove `class="tfe-file-caption"` — target via `aside figcaption`
|
- [x] In `tfe.php`, remove `class="tfe-file-caption"` — target via `aside figcaption`
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ if (empty($_SESSION['csrf_token'])) {
|
|||||||
<input class="admin-input" type="password" id="new_password"
|
<input class="admin-input" type="password" id="new_password"
|
||||||
name="new_password" required autocomplete="new-password"
|
name="new_password" required autocomplete="new-password"
|
||||||
minlength="12">
|
minlength="12">
|
||||||
<p class="admin-field-hint">Minimum 12 caractères.</p>
|
<small>Minimum 12 caractères.</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ function wasSelected($key, $value) {
|
|||||||
<input class="admin-input" type="text" id="tag" name="tag"
|
<input class="admin-input" type="text" id="tag" name="tag"
|
||||||
placeholder="sociologie, anthropologie, ..."
|
placeholder="sociologie, anthropologie, ..."
|
||||||
value="<?= old('tag') ?>">
|
value="<?= old('tag') ?>">
|
||||||
<p class="admin-hint">Séparez par des virgules. Max 10 mots-clés.</p>
|
<small>Séparez par des virgules. Max 10 mots-clés.</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -262,7 +262,7 @@ function wasSelected($key, $value) {
|
|||||||
<input class="admin-input" type="text" id="duration_info" name="duration_info"
|
<input class="admin-input" type="text" id="duration_info" name="duration_info"
|
||||||
placeholder="Ex : 84 pages"
|
placeholder="Ex : 84 pages"
|
||||||
value="<?= old('duration_info') ?>">
|
value="<?= old('duration_info') ?>">
|
||||||
<p class="admin-hint">Durée (minutes) ou nombre de pages.</p>
|
<small>Durée (minutes) ou nombre de pages.</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -279,7 +279,7 @@ function wasSelected($key, $value) {
|
|||||||
<label class="admin-label">Image de couverture :</label>
|
<label class="admin-label">Image de couverture :</label>
|
||||||
<div class="admin-file-input">
|
<div class="admin-file-input">
|
||||||
<input type="file" id="couverture" name="couverture" accept="image/jpeg,image/png">
|
<input type="file" id="couverture" name="couverture" accept="image/jpeg,image/png">
|
||||||
<p class="admin-hint">JPG, PNG. Taille max : 10 MB.</p>
|
<small>JPG, PNG. Taille max : 10 MB.</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -288,7 +288,7 @@ function wasSelected($key, $value) {
|
|||||||
<label class="admin-label">Image bannière (accueil) :</label>
|
<label class="admin-label">Image bannière (accueil) :</label>
|
||||||
<div class="admin-file-input">
|
<div class="admin-file-input">
|
||||||
<input type="file" id="banner" name="banner" accept="image/jpeg,image/png,image/webp">
|
<input type="file" id="banner" name="banner" accept="image/jpeg,image/png,image/webp">
|
||||||
<p class="admin-hint">JPG, PNG ou WEBP. Format paysage recommandé (4:1). Max 5 MB.</p>
|
<small>JPG, PNG ou WEBP. Format paysage recommandé (4:1). Max 5 MB.</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -298,7 +298,7 @@ function wasSelected($key, $value) {
|
|||||||
<div class="admin-file-input">
|
<div class="admin-file-input">
|
||||||
<input type="file" id="files" name="files[]" multiple
|
<input type="file" id="files" name="files[]" multiple
|
||||||
accept=".pdf,.jpg,.jpeg,.png,.mp4,.zip">
|
accept=".pdf,.jpg,.jpeg,.png,.mp4,.zip">
|
||||||
<p class="admin-hint">PDF, JPG, PNG, MP4, ZIP. Max 50 MB par fichier.</p>
|
<small>PDF, JPG, PNG, MP4, ZIP. Max 50 MB par fichier.</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -223,13 +223,13 @@ try {
|
|||||||
<div class="admin-form-row">
|
<div class="admin-form-row">
|
||||||
<label class="admin-label" for="access_type_id">Visibilité / Accès :</label>
|
<label class="admin-label" for="access_type_id">Visibilité / Accès :</label>
|
||||||
<select class="admin-select" id="access_type_id" name="access_type_id">
|
<select class="admin-select" id="access_type_id" name="access_type_id">
|
||||||
<option value="">— Non défini —</option>
|
<option value="">- Non défini -</option>
|
||||||
<?php foreach ($accessTypes as $at): ?>
|
<?php foreach ($accessTypes as $at): ?>
|
||||||
<option value="<?= (int)$at['id'] ?>"
|
<option value="<?= (int)$at['id'] ?>"
|
||||||
<?= ($currentAccessTypeId == $at['id']) ? 'selected' : '' ?>>
|
<?= ($currentAccessTypeId == $at['id']) ? 'selected' : '' ?>>
|
||||||
<?= htmlspecialchars($at['name']) ?>
|
<?= htmlspecialchars($at['name']) ?>
|
||||||
<?php if (!empty($at['description'])): ?>
|
<?php if (!empty($at['description'])): ?>
|
||||||
— <?= htmlspecialchars(mb_strimwidth($at['description'], 0, 60, '…')) ?>
|
- <?= htmlspecialchars(mb_strimwidth($at['description'], 0, 60, '...')) ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</option>
|
</option>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
@@ -241,14 +241,14 @@ try {
|
|||||||
<div>
|
<div>
|
||||||
<textarea class="admin-textarea" id="context_note" name="context_note"
|
<textarea class="admin-textarea" id="context_note" name="context_note"
|
||||||
rows="4" maxlength="1500"><?= htmlspecialchars($currentContextNote ?? '') ?></textarea>
|
rows="4" maxlength="1500"><?= htmlspecialchars($currentContextNote ?? '') ?></textarea>
|
||||||
<p class="admin-hint">Visible publiquement pour les TFE Interne ou Interdit. Max 1 500 caractères.</p>
|
<small>Visible publiquement pour les TFE Interne ou Interdit. Max 1 500 caractères.</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="admin-form-row">
|
<div class="admin-form-row">
|
||||||
<label class="admin-label" for="license_id">Licence :</label>
|
<label class="admin-label" for="license_id">Licence :</label>
|
||||||
<select class="admin-select" id="license_id" name="license_id">
|
<select class="admin-select" id="license_id" name="license_id">
|
||||||
<option value="">— Inconnue —</option>
|
<option value="">- Inconnue -</option>
|
||||||
<?php foreach ($licenseTypes as $lt): ?>
|
<?php foreach ($licenseTypes as $lt): ?>
|
||||||
<option value="<?= $lt['id'] ?>"
|
<option value="<?= $lt['id'] ?>"
|
||||||
<?= ($currentLicenseId == $lt['id']) ? 'selected' : '' ?>>
|
<?= ($currentLicenseId == $lt['id']) ? 'selected' : '' ?>>
|
||||||
@@ -306,7 +306,7 @@ try {
|
|||||||
<div>
|
<div>
|
||||||
<input class="admin-input" type="text" id="tag" name="tag"
|
<input class="admin-input" type="text" id="tag" name="tag"
|
||||||
value="<?= htmlspecialchars($thesis['keywords'] ?? '') ?>">
|
value="<?= htmlspecialchars($thesis['keywords'] ?? '') ?>">
|
||||||
<p class="admin-hint">Séparer par des virgules. Max 10.</p>
|
<small>Séparer par des virgules. Max 10.</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -336,7 +336,7 @@ try {
|
|||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<input type="file" name="banner" accept="image/jpeg,image/png,image/webp">
|
<input type="file" name="banner" accept="image/jpeg,image/png,image/webp">
|
||||||
<p class="admin-hint">JPG, PNG ou WEBP. Format paysage recommandé (4:1). Max 5 MB.</p>
|
<small>JPG, PNG ou WEBP. Format paysage recommandé (4:1). Max 5 MB.</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -345,10 +345,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_FILES['csv_file'])) {
|
|||||||
<label class="admin-label">Fichier CSV :</label>
|
<label class="admin-label">Fichier CSV :</label>
|
||||||
<div class="admin-file-input">
|
<div class="admin-file-input">
|
||||||
<input type="file" id="csv_file" name="csv_file" accept=".csv" required>
|
<input type="file" id="csv_file" name="csv_file" accept=".csv" required>
|
||||||
<div class="admin-hint" style="margin-top:.5rem;">
|
<small style="margin-top:.5rem;">
|
||||||
Colonnes attendues : Identifiant, Titre, Sous-titre, Auteur·ice(s), Contact, Promoteur·ice(s), Format, Année, AP, Orientation, Finalité, Mots-clés, Synopsis, Contexte, Remarques, Langue, Autorisation, License, taille, Points sur 20, lien BAIU<br>
|
Colonnes attendues : Identifiant, Titre, Sous-titre, Auteur·ice(s), Contact, Promoteur·ice(s), Format, Année, AP, Orientation, Finalité, Mots-clés, Synopsis, Contexte, Remarques, Langue, Autorisation, License, taille, Points sur 20, lien BAIU<br>
|
||||||
— Deux premières lignes ignorées (en-tête) — Séparateur : virgule — Encodage : UTF-8
|
— Deux premières lignes ignorées (en-tête) — Séparateur : virgule — Encodage : UTF-8
|
||||||
</div>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ JS;
|
|||||||
<div>
|
<div>
|
||||||
<textarea class="admin-textarea" id="content" name="content"
|
<textarea class="admin-textarea" id="content" name="content"
|
||||||
rows="20"><?= htmlspecialchars($page['content'] ?? '') ?></textarea>
|
rows="20"><?= htmlspecialchars($page['content'] ?? '') ?></textarea>
|
||||||
<small class="admin-hint">Appuyez sur <kbd>Échap</kbd> pour quitter l'éditeur au clavier.</small>
|
<small>Appuyez sur <kbd>Échap</kbd> pour quitter l'éditeur au clavier.</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -201,10 +201,11 @@
|
|||||||
border-color: var(--admin-purple);
|
border-color: var(--admin-purple);
|
||||||
}
|
}
|
||||||
|
|
||||||
.admin-hint {
|
.admin-body form small {
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
color: var(--admin-text-muted);
|
color: var(--admin-text-muted);
|
||||||
margin-top: 0.15rem;
|
margin-top: 0.15rem;
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Checkboxes & radios */
|
/* Checkboxes & radios */
|
||||||
@@ -821,11 +822,7 @@
|
|||||||
border-bottom: 1px solid var(--admin-border);
|
border-bottom: 1px solid var(--admin-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.admin-field-hint {
|
/* .admin-field-hint replaced by .admin-body form small */
|
||||||
font-size: 0.8rem;
|
|
||||||
color: var(--admin-text-muted);
|
|
||||||
margin: 0.3rem 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.admin-danger-zone {
|
.admin-danger-zone {
|
||||||
background: rgba(180, 0, 0, 0.07);
|
background: rgba(180, 0, 0, 0.07);
|
||||||
|
|||||||
Reference in New Issue
Block a user