Add item read page (#7)

- Open items links in an external window
- Include "Keep as New" button
This commit is contained in:
2024-04-13 13:39:49 -04:00
parent 9b2190252f
commit ee86eeef13
4 changed files with 147 additions and 11 deletions

View File

@@ -24,14 +24,9 @@ page_head('Welcome'); ?>
<h1>Your Unread Items</h1>
<article><?php
if ($item) {
while ($item) {
try {
$asOf = (new DateTimeImmutable($item['as_of']))->format(DATE_TIME_FORMAT);
} catch (Exception) {
$asOf = '(invalid date)';
} ?>
<p><a href=/item/view?id=<?=$item['id']?>><?=htmlentities($item['item_title'])?></a><br>
<?=htmlentities($item['feed_title'])?><br><small><em><?=$asOf?></em></small><?php
while ($item) { ?>
<p><a href=/item?id=<?=$item['id']?>><?=htmlentities($item['item_title'])?></a><br>
<?=htmlentities($item['feed_title'])?><br><small><em><?=date_time($item['as_of'])?></em></small><?php
$item = $result->fetchArray(SQLITE3_ASSOC);
}
} else { ?>