🎨 UI: sections temoignages et vedettes
This commit is contained in:
@@ -10,6 +10,7 @@ $authorName = $testimonial['author_name'] ?? 'Anonyme';
|
||||
$authorRole = $testimonial['author_role'] ?? '';
|
||||
$authorCompany = $testimonial['author_company'] ?? '';
|
||||
$authorPhoto = $testimonial['author_photo'] ?? null;
|
||||
$authorPhotoFallback = $authorPhoto ? str_replace('.webp', '.jpg', $authorPhoto) : null;
|
||||
$projectSlug = $testimonial['project_slug'] ?? null;
|
||||
$showProjectLink = $showProjectLink ?? true;
|
||||
?>
|
||||
@@ -25,12 +26,15 @@ $showProjectLink = $showProjectLink ?? true;
|
||||
|
||||
<footer class="flex items-center gap-4">
|
||||
<?php if ($authorPhoto): ?>
|
||||
<img
|
||||
src="/assets/img/testimonials/<?= htmlspecialchars($authorPhoto, ENT_QUOTES, 'UTF-8') ?>"
|
||||
alt="<?= htmlspecialchars($authorName, ENT_QUOTES, 'UTF-8') ?>"
|
||||
class="w-12 h-12 rounded-full object-cover"
|
||||
loading="lazy"
|
||||
>
|
||||
<picture>
|
||||
<source srcset="/assets/img/testimonials/<?= htmlspecialchars($authorPhoto, ENT_QUOTES, 'UTF-8') ?>" type="image/webp">
|
||||
<img
|
||||
src="/assets/img/testimonials/<?= htmlspecialchars($authorPhotoFallback, ENT_QUOTES, 'UTF-8') ?>"
|
||||
alt="<?= htmlspecialchars($authorName, ENT_QUOTES, 'UTF-8') ?>"
|
||||
class="w-12 h-12 rounded-full object-cover"
|
||||
loading="lazy"
|
||||
>
|
||||
</picture>
|
||||
<?php else: ?>
|
||||
<div class="w-12 h-12 rounded-full bg-primary/20 flex items-center justify-center">
|
||||
<span class="text-primary font-semibold text-lg">
|
||||
@@ -58,4 +62,4 @@ $showProjectLink = $showProjectLink ?? true;
|
||||
</svg>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</blockquote>
|
||||
</blockquote>
|
||||
|
||||
Reference in New Issue
Block a user