mmk2410.org/site/templates/blog.php
Marcel Kapfer 88f8c6a9a6
All checks were successful
Deploy / deploy (push) Successful in 5s
🐛 (blogarticle) Show headline as h3 on homepage
2024-03-20 20:14:52 +01:00

27 lines
775 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php snippet('layout', slots: true) ?>
<?php slot() ?>
<h1><?= $page->title() ?></h1>
<?= $page->text()->kirbytext() ?>
<?php foreach($articles as $article): ?>
<?php snippet('article', ['article' => $article, 'main' => true]) ?>
<?php endforeach ?>
<?php if ($articles->pagination()->hasPages()): ?>
<nav class="pagination">
<?php if ($articles->pagination()->hasNextPage()): ?>
<a class="page-item next" href="<?= $articles->pagination()->nextPageURL() ?>">
older posts
</a>
<?php endif ?>
<?php if ($articles->pagination()->hasPrevPage()): ?>
<a class="page-item prev" href="<?= $articles->pagination()->prevPageURL() ?>">
newer posts
</a>
<?php endif ?>
</nav>
<?php endif ?>
<?php endslot() ?>