From 853d253a7dc0c7de6438310cd94a7ece2da9397c Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Fri, 12 Dec 2025 10:34:56 +0500 Subject: feat: store posts in text format --- index.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 6126901..a7b36dd 100644 --- a/index.php +++ b/index.php @@ -1,14 +1,17 @@ query("SELECT id, title, posted_at FROM statuses ORDER BY posted_at DESC LIMIT 1"); -$last_status = $stmt->fetch(PDO::FETCH_ASSOC) ?: null; + +$posts = get_posts(); +if (!empty($posts)) { + $last_post = $posts[0]; +} ?> @@ -58,12 +61,12 @@ $last_status = $stmt->fetch(PDO::FETCH_ASSOC) ?: null; - +
-

Last status posted ago:

-

[more...] [rss]

+

Last post was ago:

+

[more...] [rss]

-- cgit v1.2.3