mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +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:
@@ -86,7 +86,7 @@
|
||||
<button type="button" class="admin-icon-btn" title="Copier le mot de passe"
|
||||
onclick="event.stopPropagation(); copyTextToClipboard(document.getElementById('pwd-<?= $link['id'] ?>').value)"
|
||||
style="width:24px;height:24px;">
|
||||
<img src="/assets/icons/copy-duplicate.svg" width="16" height="16" alt="" aria-hidden="true">
|
||||
<?= icon('copy-duplicate') ?>
|
||||
</button>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
@@ -100,11 +100,11 @@
|
||||
<div class="admin-actions">
|
||||
<button type="button" class="admin-icon-btn admin-icon-btn--edit" title="Éditer"
|
||||
onclick="event.stopPropagation(); openEditDialog(<?= $link['id'] ?>, <?= htmlspecialchars(json_encode($linkName), ENT_QUOTES) ?>, <?= $hasLinkPassword ? 'true' : 'false' ?>, <?= htmlspecialchars(json_encode($linkExpiresVal), ENT_QUOTES) ?>)">
|
||||
<img src="/assets/icons/pencil-note.svg" width="32" height="32" alt="" aria-hidden="true">
|
||||
<?= icon('pencil-note') ?>
|
||||
</button>
|
||||
<button type="button" class="admin-icon-btn admin-icon-btn--copy" title="Copier l'URL"
|
||||
onclick="event.stopPropagation(); copyUrl(<?= $link['id'] ?>)">
|
||||
<img src="/assets/icons/copy-duplicate.svg" width="32" height="32" alt="" aria-hidden="true">
|
||||
<?= icon('copy-duplicate') ?>
|
||||
</button>
|
||||
<form method="post" action="actions/acces-etudiante.php" class="publish-form" onclick="event.stopPropagation()">
|
||||
<input type="hidden" name="csrf_token" value="<?= htmlspecialchars($_SESSION['csrf_token']) ?>">
|
||||
@@ -114,9 +114,9 @@
|
||||
class="admin-icon-btn <?= $link['is_active'] ? 'admin-icon-btn--unpublish' : 'admin-icon-btn--publish' ?>"
|
||||
title="<?= $link['is_active'] ? 'Désactiver' : 'Activer' ?>">
|
||||
<?php if ($link['is_active']): ?>
|
||||
<img src="/assets/icons/columns.svg" width="32" height="32" alt="" aria-hidden="true">
|
||||
<?= icon('columns') ?>
|
||||
<?php else: ?>
|
||||
<img src="/assets/icons/play-triangle.svg" width="32" height="32" alt="" aria-hidden="true">
|
||||
<?= icon('play-triangle') ?>
|
||||
<?php endif; ?>
|
||||
</button>
|
||||
</form>
|
||||
@@ -127,7 +127,7 @@
|
||||
<input type="hidden" name="id" value="<?= $link['id'] ?>">
|
||||
<button type="button" class="admin-icon-btn admin-icon-btn--archive" title="Archiver"
|
||||
onclick="openArchiveLinkDialog(<?= $link['id'] ?>)">
|
||||
<img src="/assets/icons/monitor.svg" width="32" height="32" alt="" aria-hidden="true">
|
||||
<?= icon('monitor') ?>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
@@ -179,7 +179,7 @@
|
||||
<td class="admin-actions-col">
|
||||
<button type="button" class="admin-icon-btn admin-icon-btn--delete" title="Supprimer"
|
||||
onclick="openDeleteArchivedLinkDialog(<?= $link['id'] ?>)">
|
||||
<img src="/assets/icons/trash.svg" width="16" height="16" alt="" aria-hidden="true">
|
||||
<?= icon('trash') ?>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user