This commit is contained in:
2026-01-23 12:35:53 +01:00
parent 3f01cbd8aa
commit b22348ebba
5 changed files with 30 additions and 1 deletions
+16 -1
View File
@@ -28,6 +28,12 @@ $allOccasionLabels = [
'ROIS' => 'Reis', 'ROIS' => 'Reis',
]; ];
$occasionIcons = [
'TIO' => '/modules/christmas-list/assets/img/tio.png',
'NOEL' => '/modules/christmas-list/assets/img/santa.png',
'ROIS' => '/modules/christmas-list/assets/img/reis.png',
];
// Récup toutes les données pour lannée // Récup toutes les données pour lannée
$stmt = $pdo->prepare(" $stmt = $pdo->prepare("
SELECT * SELECT *
@@ -68,7 +74,16 @@ foreach ($gifts as $gift) {
<?php foreach ($allOccasionLabels as $occCode => $occLabel): ?> <?php foreach ($allOccasionLabels as $occCode => $occLabel): ?>
<div class="cl-occasion-block"> <div class="cl-occasion-block">
<h3 class="cl-occasion-title"><?= htmlspecialchars($occLabel) ?></h3> <h3 class="cl-occasion-title">
<?php if (!empty($occasionIcons[$occCode])): ?>
<img class="cl-occasion-icon"
src="<?= htmlspecialchars($occasionIcons[$occCode]) ?>"
alt=""
aria-hidden="true">
<?php endif; ?>
<?= htmlspecialchars($occLabel) ?>
</h3>
<div class="cl-occasion-children-tables"> <div class="cl-occasion-children-tables">
<?php <?php
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

+14
View File
@@ -336,3 +336,17 @@
.cl-detail-wrapper .pf-table td { .cl-detail-wrapper .pf-table td {
padding: 4px 4px; padding: 4px 4px;
} }
/* Icône devant le titre de fête */
.cl-occasion-title {
display: flex;
align-items: center;
gap: 8px;
}
.cl-occasion-icon {
width: 20px;
height: 20px;
object-fit: contain;
flex: 0 0 20px;
filter: none; /* garde les couleurs des SVG/PNG */
}