Link to unread feed on main page (#13)

This commit is contained in:
Daniel J. Summers 2024-05-23 19:00:19 -04:00
parent 49c209f7cd
commit 1bdaa1be46
2 changed files with 4 additions and 3 deletions

View File

@ -20,7 +20,7 @@ if (array_key_exists('refresh', $_GET)) {
}
$query = $db->prepare(<<<'SQL'
SELECT item.id, item.title AS item_title, coalesce(item.updated_on, item.published_on) AS as_of,
SELECT item.id, item.feed_id, item.title AS item_title, coalesce(item.updated_on, item.published_on) AS as_of,
feed.title AS feed_title
FROM item
INNER JOIN feed ON feed.id = item.feed_id
@ -42,7 +42,8 @@ page_head('Your Unread Items'); ?>
if ($item) {
while ($item) { ?>
<p><?=hx_get("/item?id={$item['id']}", strip_tags($item['item_title']))?><br>
<?=htmlentities($item['feed_title'])?><br><small><em><?=date_time($item['as_of'])?></em></small><?php
<small><?=date_time($item['as_of'])?> &bull;
<?=hx_get("/feed/items?id={$item['feed_id']}&unread", htmlentities($item['feed_title']))?></small><?php
$item = $result->fetchArray(SQLITE3_ASSOC);
}
} else { ?>