Use pdf link if available for cover images

This commit is contained in:
Ruben 2025-10-21 20:33:06 +02:00
parent 8f879c998f
commit e4f770626f

View file

@ -9,7 +9,7 @@
<?php foreach ($items as $item): ?>
<article>
<?php if ($item['cover']): ?>
<a href="<?= htmlspecialchars($item['url']) ?>">
<a href="<?= htmlspecialchars($item['pdf'] ?? $item['url']) ?>">
<img src="<?= htmlspecialchars($item['cover']) ?>" alt="<?= htmlspecialchars($item['title']) ?>">
</a>
<?php endif; ?>