feat: style empty search results message for better visibility

This commit is contained in:
Fabian Schieder 2026-03-18 16:09:41 +01:00
parent c336345845
commit 5bde452437
2 changed files with 8 additions and 2 deletions

View File

@ -41,9 +41,9 @@ if ($searchTerm !== '' && $searchLen >= 2) {
<h2>Suchergebnisse für <?= htmlspecialchars($searchTerm) ?>“</h2> <h2>Suchergebnisse für <?= htmlspecialchars($searchTerm) ?>“</h2>
<?php if ($resultSearch->num_rows <= 0): ?> <?php if ($resultSearch->num_rows <= 0): ?>
<p style="color: var(--text-secondary); margin-top: 8px;">Keine Produkte gefunden.</p> <p class="search-empty">Keine Produkte gefunden.</p>
<?php else: ?> <?php else: ?>
<div class="product-grid" style="margin-top: 14px;"> <div class="product-grid">
<?php while ($product = $resultSearch->fetch_assoc()): ?> <?php while ($product = $resultSearch->fetch_assoc()): ?>
<?php $productId = (int)$product['productID']; ?> <?php $productId = (int)$product['productID']; ?>
<a class="product-card" href="productpage.php?id=<?= $productId ?>"> <a class="product-card" href="productpage.php?id=<?= $productId ?>">

View File

@ -727,6 +727,12 @@ a:hover {
gap: 1.6rem; gap: 1.6rem;
} }
/* Hinweistext bei leeren Suchergebnissen */
.search-empty {
color: var(--text-secondary);
margin: 0.5rem 2rem 0;
}
/* ========================================================== /* ==========================================================
PRODUCT CARD (global) PRODUCT CARD (global)
========================================================== */ ========================================================== */