Create the ability to create blog pages and blog-posts.

This commit is contained in:
2026-04-20 09:31:28 +10:00
parent 87999e63f8
commit c34cd57610
6 changed files with 131 additions and 0 deletions

21
templates/blog.php Normal file
View File

@@ -0,0 +1,21 @@
<?= snippet("header") ?>
<?= snippet("page/title") ?>
<?php if (count($posts)) : ?>
<div class="row">
<div class="col-12">
<?php foreach ($posts as $post) : ?>
<?= snippet("collection/post", ["post" => $post]) ?>
<?php endforeach ?>
</div>
</div>
<?php else : ?>
<div class="alert alert-info mb-3">
No posts have been created yet!
</div>
<?php endif ?>
<?= snippet("page/pagination", ["pagination" => $posts->pagination()]) ?>
<?= snippet("footer") ?>