2025-11-01 16:11:33 +01:00
|
|
|
<?php if (!empty($pageContent)): ?>
|
2025-11-27 21:31:47 +01:00
|
|
|
<div class="list-intro">
|
|
|
|
|
<?= $pageContent ?>
|
|
|
|
|
</div>
|
2025-11-01 16:11:33 +01:00
|
|
|
<?php endif; ?>
|
|
|
|
|
|
2025-11-27 21:31:47 +01:00
|
|
|
<div class="grid">
|
|
|
|
|
<?php foreach ($items as $item): ?>
|
|
|
|
|
<article class="card">
|
|
|
|
|
<?php if (!empty($item['cover'])): ?>
|
|
|
|
|
<img src="<?= htmlspecialchars($item['cover']) ?>" alt="">
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
<h3><a href="<?= htmlspecialchars($item['url']) ?>"><?= htmlspecialchars($item['title']) ?></a></h3>
|
|
|
|
|
|
|
|
|
|
<?php if (($metadata['show_date'] ?? true) && !empty($item['date'])): ?>
|
|
|
|
|
<time><?= htmlspecialchars($item['date']) ?></time>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
<?php if (!empty($item['summary'])): ?>
|
|
|
|
|
<p><?= htmlspecialchars($item['summary']) ?></p>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
</article>
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
</div>
|
2025-11-01 16:11:33 +01:00
|
|
|
|
|
|
|
|
<style>
|
2025-11-27 21:31:47 +01:00
|
|
|
.grid {
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
|
|
|
|
|
gap: var(--space-m);
|
|
|
|
|
}
|
2025-11-01 16:11:33 +01:00
|
|
|
|
2025-11-27 21:31:47 +01:00
|
|
|
.card {
|
|
|
|
|
border: 1px solid var(--color-border);
|
|
|
|
|
border-radius: 0.5rem;
|
|
|
|
|
padding: var(--space-s);
|
|
|
|
|
|
|
|
|
|
& img {
|
|
|
|
|
margin-block-end: var(--space-s);
|
|
|
|
|
border-radius: 0.25rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
& h3 {
|
|
|
|
|
margin-block-start: 0;
|
|
|
|
|
}
|
2025-11-01 16:11:33 +01:00
|
|
|
}
|
|
|
|
|
</style>
|