From 2b24def0392adb5063e1ab2674c5c6ece6b64e5d Mon Sep 17 00:00:00 2001 From: Mohamad Damaj Date: Fri, 14 Jul 2023 00:54:42 +0300 Subject: [PATCH] Revert to a functional state (blog) --- site/blog/index.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/site/blog/index.php b/site/blog/index.php index b549f00..f170c0a 100644 --- a/site/blog/index.php +++ b/site/blog/index.php @@ -14,27 +14,20 @@

NOTE: for people who want to use an RSS reader, here is the rss.xml

-channel->item); - -// Reverse the order of the items so that the latest post is displayed first -$items = array_reverse($items); - // Loop through the items and display them -foreach ($items as $item) { +foreach ($xml->channel->item as $item) { // Add a box around the article echo '
'; - // Highlight the title and date + // Highlight the title echo '

' . $item->title . '

'; - echo '

' . date('F j, Y', strtotime($item->pubDate)) . '

'; // Split the content into sentences $sentences = preg_split('/(?<=[.?!])\s+(?=[a-z])/i', $item->description);