KT-personal-website/template/default/posts.php
2024-12-06 11:34:32 +01:00

38 lines
No EOL
1 KiB
PHP

<?php
use App\Blogs\Blogs;
?>
<main class="blog">
<section>
<nav aria-label="breadcrumb" class="breadcrumb">
<ul>
<li><a href="/posts">Posts</a></li>
<li><a href="/posts/<?= $this->page; ?>"><?= $this->page; ?></a></li>
</ul>
</nav>
</section>
<section>
<?php foreach ($getPostList as $key => $post): ?>
<article class="card">
<div class="card-header">
<h3><a href="/post/<?= $key; ?>"><?= $post['title']; ?></a></h3>
</div>
<div>
<?= Blogs::extractLead($post['file']); ?>
</div>
<div class="card-footer">
<time datetime="2024-09-01"><?= $post['created_at']; ?></time>
</div>
</article>
<?php endforeach; ?>
<nav>
<ul class="pagination">
<?= $pagination; ?>
</ul>
</nav>
</section>
</main>