38 lines
No EOL
1 KiB
PHP
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(file_get_contents($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>
|