mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-26 08:39:18 +02:00
Migrate all <img>-based icons to inline SVG via PHP helper
Replace every <img src="/assets/icons/..."> with <?= icon('name') ?>
across 26 template files. The PHP helper inlines the SVG markup into the
DOM so CSS color cascades naturally through fill="currentColor".
- Add src/icon.php helper: reads SVG file, sets width/height to 1em,
injects aria-hidden, supports optional CSS class
- Fix 12 icon SVGs that had hardcoded fill="#000000" or missing fill attr
- Replace search.svg with Phosphor fill-based magnifying glass
- Add explicit SVG sizes for admin header nav icons (16px/20px)
- Scope public search icon CSS to form[role=search]:not(.header-search-form)
to avoid breaking admin header layout; change stroke to fill
- Remove <img> filter: brightness(0) invert(1) hacks from admin.css
This commit is contained in:
@@ -28,19 +28,19 @@ try {
|
||||
<strong><span id="langues-selected-count">0</span> langue(s) sélectionnée(s)</strong>
|
||||
<div class="admin-bulk-btns">
|
||||
<button type="button" class="btn btn--sm btn--secondary" onclick="languesCancelSelection()" title="Annuler la sélection">
|
||||
<img src="/assets/icons/x-close.svg" width="32" height="32" alt="" aria-hidden="true">
|
||||
<?= icon('x-close') ?>
|
||||
Annuler
|
||||
</button>
|
||||
<button type="button" class="btn btn--sm btn--red admin-btn-delete"
|
||||
onclick="languesConfirmBulkDelete()"
|
||||
title="Supprimer les langues sélectionnées">
|
||||
<img src="/assets/icons/trash.svg" width="32" height="32" alt="" aria-hidden="true">
|
||||
<?= icon('trash') ?>
|
||||
Supprimer
|
||||
</button>
|
||||
<button type="button" class="btn btn--sm btn--warning admin-btn-merge"
|
||||
onclick="languesConfirmBulkMerge()"
|
||||
title="Fusionner les langues sélectionnées">
|
||||
<img src="/assets/icons/link-chain.svg" width="32" height="32" alt="" aria-hidden="true">
|
||||
<?= icon('link-chain') ?>
|
||||
Fusionner
|
||||
</button>
|
||||
</div>
|
||||
@@ -74,7 +74,7 @@ try {
|
||||
<span class="tag-name-cell"><?= htmlspecialchars($lang['name']) ?></span>
|
||||
<button type="button" class="admin-icon-btn admin-icon-btn--edit" title="Renommer"
|
||||
onclick="languesStartRename(<?= (int)$lang['id'] ?>)">
|
||||
<img src="/assets/icons/pencil-note.svg" width="32" height="32" alt="" aria-hidden="true">
|
||||
<?= icon('pencil-note') ?>
|
||||
</button>
|
||||
</td>
|
||||
<td class="admin-tags-count" style="width:1%;white-space:nowrap"><?= (int)$lang['thesis_count'] ?></td>
|
||||
@@ -87,7 +87,7 @@ try {
|
||||
<input type="hidden" name="language_id" value="<?= (int)$lang['id'] ?>">
|
||||
<button type="button" class="admin-icon-btn admin-icon-btn--delete" title="Supprimer"
|
||||
onclick="languesConfirmDelete(this, <?= htmlspecialchars(json_encode($lang['name']), ENT_QUOTES) ?>)">
|
||||
<img src="/assets/icons/trash.svg" width="32" height="32" alt="" aria-hidden="true">
|
||||
<?= icon('trash') ?>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user