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:
@@ -15,7 +15,7 @@ $_thesisId = $_GET['id'] ?? null;
|
||||
<nav aria-label="Navigation admin">
|
||||
<ul class="nav-left-links">
|
||||
<li><a href="/" target="_blank" rel="noopener noreferrer" class="nav-logo">
|
||||
<img src="/assets/icons/sign-out.svg" width="16" height="16" alt="" aria-hidden="true">XAMXAM<span class="sr-only"> (site public, nouvel onglet)</span>
|
||||
<?= icon('sign-out') ?>XAMXAM<span class="sr-only"> (site public, nouvel onglet)</span>
|
||||
</a></li>
|
||||
</ul>
|
||||
<ul class="nav-right-links">
|
||||
@@ -29,7 +29,7 @@ $_thesisId = $_GET['id'] ?? null;
|
||||
</a></li>
|
||||
<li><a href="/admin/parametres.php" <?= in_array($_currentPage, ['parametres.php', 'system.php', 'status.php', 'logs.php']) ? 'aria-current="page"' : '' ?>>Paramètres</a></li>
|
||||
<?php if ($_isAdmin && AdminAuth::hasPassword()): ?>
|
||||
<li data-nav-logout><a href="/admin/logout.php" aria-label="Déconnexion"><img src="/assets/icons/sign-in.svg" width="20" height="20" alt="" aria-hidden="true"><span class="sr-only">Déconnexion</span></a></li>
|
||||
<li data-nav-logout><a href="/admin/logout.php" aria-label="Déconnexion"><?= icon('sign-in') ?><span class="sr-only">Déconnexion</span></a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</nav>
|
||||
@@ -90,7 +90,7 @@ $_thesisId = $_GET['id'] ?? null;
|
||||
|
||||
<?php if ($_isAdmin && !$_isLogin): ?>
|
||||
<div class="admin-mobile-block">
|
||||
<img src="/assets/icons/desktop-monitor.svg" width="48" height="48" alt="" aria-hidden="true">
|
||||
<?= icon('desktop-monitor') ?>
|
||||
<h2>Section administrateur</h2>
|
||||
<p>L'administration n'est pas accessible sur mobile. Veuillez utiliser un ordinateur.</p>
|
||||
</div>
|
||||
@@ -106,7 +106,7 @@ $searchBarValue = $searchBarValue ?? $_GET['query'] ?? '';
|
||||
role="search" aria-label="Recherche" class="header-search-form">
|
||||
<label for="site-search-input" class="sr-only">Recherche</label>
|
||||
<div class="header-search-input-wrap">
|
||||
<img src="/assets/icons/search.svg" width="24" height="24" alt="" aria-hidden="true" class="header-search-icon">
|
||||
<?= icon('search', 0, 'header-search-icon') ?>
|
||||
<input
|
||||
id="site-search-input"
|
||||
type="text"
|
||||
|
||||
Reference in New Issue
Block a user