all the website mainly done

This commit is contained in:
0xa0
2026-07-21 20:45:47 +02:00
parent 20f9aca26b
commit 30609c3bb3
15 changed files with 2127 additions and 25 deletions
+31
View File
@@ -0,0 +1,31 @@
<?php
require __DIR__ . '/inc/posts.php';
$post = load_post($_GET['slug'] ?? '');
if (!$post) {
http_response_code(404);
require __DIR__ . '/inc/header.php';
?>
<p class="back-link"><a href="/blog.php">&larr; go back</a></p>
<h1>404</h1>
<p>no such post.</p>
<?php
require __DIR__ . '/inc/footer.php';
exit;
}
$page_title = $post['title'] . ' · ' . SITE_TITLE;
require __DIR__ . '/inc/header.php';
?>
<p class="back-link"><a href="/blog.php">&larr; go back</a></p>
<article class="post">
<h1 class="post-title">[ <?= htmlspecialchars($post['title']) ?> ]</h1>
<div class="post-meta"><?= post_date_display($post['date']) ?></div>
<div class="post-body"><?= render_markdown($post['body']) ?></div>
</article>
<p class="back-link"><a href="/blog.php">&larr; go back</a></p>
<?php require __DIR__ . '/inc/footer.php'; ?>