Implement responsive grid layout Add CSS variables for consistent theming Create button component with states Improve header and footer structure Add page load time measurement Enhance list template with styling Update template structure with semantic HTML Implement dynamic CSS file loading Add favicon support Improve navigation with active state Add page and section class names to body Implement conditional date display in list items
55 lines
1.5 KiB
PHP
55 lines
1.5 KiB
PHP
<?php if (!empty($pageContent)): ?>
|
|
<article class="list-intro">
|
|
<?= $pageContent ?>
|
|
</article>
|
|
<?php endif; ?>
|
|
|
|
<article>
|
|
<?php foreach ($items as $item): ?>
|
|
<article>
|
|
<?php if ($item['cover']): ?>
|
|
<a href="<?= htmlspecialchars($item['url']) ?>">
|
|
<img src="<?= htmlspecialchars($item['cover']) ?>" alt="<?= htmlspecialchars($item['title']) ?>">
|
|
</a>
|
|
<?php endif; ?>
|
|
<h1>
|
|
<a href="<?= htmlspecialchars($item['url']) ?>">
|
|
<?= htmlspecialchars($item['title']) ?>
|
|
</a>
|
|
</h1>
|
|
<?php if (($metadata['show_date'] ?? true) && !empty($item['date'])): ?>
|
|
<p><?= htmlspecialchars($item['date']) ?></p>
|
|
<?php endif; ?>
|
|
<?php if ($item['summary']): ?>
|
|
<p><?= htmlspecialchars($item['summary']) ?></p>
|
|
<?php endif; ?>
|
|
<a href="<?= htmlspecialchars($item['url']) ?>" class="button"><?= htmlspecialchars($translations['read_more'] ?? 'Read more') ?></a>
|
|
</article>
|
|
<?php endforeach; ?>
|
|
</article>
|
|
|
|
<style>
|
|
main > article {
|
|
> article {
|
|
background-color: white;
|
|
padding: 0;
|
|
padding-bottom: 1.3rem;
|
|
margin-bottom: 1.5rem;
|
|
overflow: hidden;
|
|
|
|
> :not(img, a) {
|
|
padding-left: 1rem;
|
|
padding-right: 1rem;
|
|
}
|
|
|
|
h1 {
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
> .button {
|
|
margin-left: 1rem;
|
|
margin-top: 1rem;
|
|
}
|
|
}
|
|
}
|
|
</style>
|