🐛 (blogarticle) Show headline as h3 on homepage
All checks were successful
Deploy / deploy (push) Successful in 5s

This commit is contained in:
Marcel Kapfer 2024-03-20 20:14:52 +01:00
parent cd1330bcbe
commit 88f8c6a9a6
Signed by: mmk2410
GPG key ID: CADE6F0C09F21B09
3 changed files with 7 additions and 2 deletions

View file

@ -1,5 +1,10 @@
<article>
<?php if ($main): ?>
<h2><a href="<?= $article->url() ?>"><?= $article->title() ?></a></h2>
<?php else: ?>
<h3><a href="<?= $article->url() ?>"><?= $article->title() ?></a></h3>
<?php endif ?>
<p id="date"><?= $article->date()->toDate('Y-m-d') ?></p>
<p>
<div class="tagories">

View file

@ -5,7 +5,7 @@
<?= $page->text()->kirbytext() ?>
<?php foreach($articles as $article): ?>
<?php snippet('article', ['article' => $article]) ?>
<?php snippet('article', ['article' => $article, 'main' => true]) ?>
<?php endforeach ?>
<?php if ($articles->pagination()->hasPages()): ?>

View file

@ -22,7 +22,7 @@
<h2>Latest Posts</h2>
<?php foreach(page('blog')->children()->listed()->flip()->limit(3) as $article): ?>
<?php snippet('article', ['article' => $article]) ?>
<?php snippet('article', ['article' => $article, 'main' => false]) ?>
<?php endforeach ?>
<a class="btn" href="<?= page('blog')->url() ?>">Read more posts</a>